From Scratch - Create Project

Create an App from Scratch

If you can't, or prefer not to use a Maven Archetype, the following steps will guide you through the creation of a new application from scratch.

Note: For a more in-depth guide on creating a new GWTP application, you can read the Beginner's Tutorial.

Folder Structure

First, start off by creating the initial folder structure. This structure is going to help us separate logical components.


project_root
└─ src
   └─ main
      β”œβ”€ java
      β”‚ └─ com
      β”‚    └─ mydomain
      β”‚       └─ myproject
      β”‚          └─ client
      β”‚             └─ application
      β”‚                └─ home
      └─ webapp
         └─ WEB-INF

Using your terminal, you can easily create all the directories with the following commands:

mkdir -p src/main/java/com/mydomain/myproject/client/application/home
mkdir -p src/main/java/webapp/WEB-INF

Import the Dependencies

In order to use GWTP, you need to import the source code. This can either be done with a dependency management tool (Maven, Gradle, etc.) or manually. We highly recommend using such a tool as it makes managing transitive dependencies a lot easier.

If using Maven you should really skip through the boilerplate and use an archetype.

Last updated

Was this helpful?