Creating Quarkus projects using IntelliJ IDEA

Quarkus projects can be bootstrapped in a variety of ways. You can use the online Web application (https://code.quarkus.io) to create a new Quarkus project, you can use the Maven plugin as discussed in this tutorial: Getting started with QuarkusIO . It is also possible to create a new Quarkus project directly from IntelliJ IDEA using one of its plugins.

Quarkus plugin for IntelliJ IDEA is available both for the Community version of the IDE and the Ultimate Edition. The simplest way to install it, is through the File | Settings | Plugin option, in the top Menu. Search “quarkus” in the plugin list:

Quarkus intellij idea tutorial Quarkus intellij idea tutorial

Click on “Install” and restart the IDE when completed. Now choose to create a New Project:

Quarkus intellij idea tutorial Quarkus intellij idea tutorial

Behind the hood, the plugin will connect to the endpoint URL (https://code.quarkus.io), therefore you need an available connection before continuing. Click Next:

Quarkus intellij idea tutorial Quarkus intellij idea tutorial

Fill-in the Project GAV settings and click Next:

Quarkus intellij idea tutorial Quarkus intellij idea tutorial

Choose the list of extensions that will be automatically included in your project and click Next:

Quarkus intellij idea tutorial Quarkus intellij idea tutorial

Finally enter the project name that will be created using all the above settings:

Quarkus intellij idea tutorial Quarkus intellij idea tutorial

Great. The project is now available in your IDE. As we have requested to include a REST Endpoint named ExampleResource in it, the following class will be included:

package org.acme;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;

@Path("/hello")
public class ExampleResource {

    @GET
    @Produces(MediaType.TEXT_PLAIN)
    public String hello() {
        return "hello";
    }
}

Finally, it’s worth mentioning that, as the plugin interacts with the online Web application, all the Quarkus settings will be automatically the latest available:

<quarkus-plugin.version>1.0.1.Final</quarkus-plugin.version>
<quarkus.platform.artifact-id>quarkus-universe-bom</quarkus.platform.artifact-id>
<quarkus.platform.group-id>io.quarkus</quarkus.platform.group-id>
<quarkus.platform.version>1.0.1.Final</quarkus.platform.version>

That’s all! enjoy Quarkus with IntelliJ IDEA.