Skip to content

Running the project

John Ahlroos edited this page Mar 14, 2019 · 9 revisions

The plugin does not come with a project runner so to run the project you will need to add a third-party runner. On this page are listed some common options:

Gretty

This is one of the most popular runners available. To add it you just need to apply their plugin.

plugins {
    id "org.gretty" version "2.3.1"
}

Once you have added the plugin you can run the project by running the appRun task:

gradle jettyRun

Spring Boot

Another options is to use Spring Boot to package the project into a single runnable JAR.

To do it you need to use their plugin:

plugins {
  id 'org.springframework.boot' version '2.1.3.RELEASE'
}

Then you will need to add the Spring boot dependency to your project

dependencies {
  compile vaadin.springBoot()
}

And you also need a bootstrap class

@SpringBootApplication
public class App {
    public static void main(String[] args) {
        SpringApplication.run(App.class, args);
    }
}

And then run the project in development mode with bootRun:

gradle bootRun

And package the project for production into a runnable jar with bootJar:

gradle bootJar

Payara

Follow the instructions on https://blog.payara.fish/deploying-to-payara-server-using-gradle to deploy up Gradle and Payara.

You can’t perform that action at this time.