Vaadin 7 on Grails 2.x
  • Introduction
  • Project setup
    • Command Line
    • IntelliJ IDEA
    • Eclipse
    • NetBeans
    • Plugin Configuration
    • Clean up
    • Best Practices
  • Database
    • GORM
      • Create Domain Model
      • Transactions
      • LazyInitializationException
      • Open Session In View I.
      • Open Session In View II.
      • Table Container
    • Groovy SQL
      • Create Sql
      • Execute SQLs
    • MyBatis
      • Configuration
      • Basics
    • JdbcTemplate
      • Create Beans
      • Usage
    • Clean Up With Alternatives
  • Architecture
    • Model View Presenter
  • Spring Autowiring
    • Create Simple Application
    • Application With Navigator
  • UI
    • Re-using GORM Validations
    • Async Push
    • Multiple application
    • SASS Compilation
    • Widgetset Compilation
  • Spring Security
    • Spring Security Dependency
    • Spring Security Basics
    • Secured Navigator
  • Localization
    • Localization Basics
    • Custom MessageSource
  • REST
    • Without using root URL
    • Using root URL for Vaadin app
  • Plugin development
    • Github
    • Development
Powered by GitBook
On this page
  • Create application
  • Step 1
  • Step 2
  • Step 3
  • Step 4
  • Step 5
  • Step 6

Was this helpful?

  1. Project setup

Command Line

PreviousProject setupNextIntelliJ IDEA

Last updated 5 years ago

Was this helpful?

Working example project, which results from this tutorial, can be downloaded from .

Using to create a new application is probably the most reliable way. We can basically say that if you are not able to create project using the command line, you will be not able to work with Grails at all and you need to re-install Grails or fix its configuration.

Create application

These instructions are supposed to be executed by using the command line.

Step 1

Open your console and run grails create-app my-app that will create new directory called my-app with sample Grails application.

Step 2

Go to that directory cd my-app and open that folder in a text editor of your choice.

Step 3

Open BuildConfig.groovy and add latest version of plugin into compile scope compile ":vaadin:7.6.1".

BuildConfig.groovy

Step 4

Now we need to run grails vaadin-quickstart, so Vaadin plugin can generate sample application for us.

Step 5

We want to prevent Grails to take over URL mapping. Open UrlMappings.groovy and make sure the URL mapping is empty.

    class UrlMappings {
        static mappings = {
        }
}

Step 6

Generated Vaadin sample code

We are ready to start up the application. Run grails run-app command. Vaadin application running on will become accessible after a while.

github.com/vaadin-on-grails/quickstart-app
Grails command line
vaadin
http://localhost:8080/my-app
Generated Vaadin sample code