NetBeans
Working example project, which results from this tutorial, can be downloaded from github.com/vaadin-on-grails/quickstart-app.
You need to install full version of NetBeans (where Groovy is included).
Then you need to install Grails plugin for NetBeans. Search for grails
and mark Groovy and Grails
plugin as selected.
Click on Install
button and finish the instalation which will require restart Netbeans IDE.
Step 1
Open New Project
window to create Grails application. Select Grails Application
and click on Next
.
Step 2
Type name of the project and finish the wizard.
Also configure Grails version that will be used for your project.
Step 3
Open BuildConfig.groovy
and add dependency to vaadin plugin compile ":vaadin:7.6.1"
.
The latest version of the plugin is always available on http://grails.org/plugin/vaadin
Open commands window in Netbeans.
Run grails compile
command. It will download Vaadin plugin together with all mandatory dependencies.
Then click on Refresh Commands
button and run grails vaadin-quickstart
that will generate sample code to easier project configuration.
The command vaadin-quickstart
will generate MyUI.groovy
and remove URL mapping inside UrlMapping.groovy
.
Optional
We want to prevent Grails to take over URL mapping. Open UrlMappings.groovy
and make sure the URL mapping is empty.
Step 5
We are ready to start up the application. Run grails run-app
command.
Vaadin application running on http://localhost:8080/my-app will become accessible after a while.
Last updated