# After having created the Maven- / Gradle- project...

## Three steps to execute

After having created the project you need to...

- (1) import the project into your Java IDE

- (2) build it one time

- (3) reload the project within the CaptainCasa tool-set.

## In more detail – step by step

### Import the project into your Java-IDE

- User the normal Import-options of your IDE

  - Example “Eclipse”: select “File > Import...” from the menu, then select the type of the project and define the root directory of the project:

  - Example “IntelliJ”: select “File > Open Project...” from the menu, then select the project directory:

  - Example “NetBeans”: select “File > Open Project...” from the menu, then select the project directory:

### Build the project

#### Maven

- Execute “clean package”.

- Example “Eclipse”: right click the project and select “Run as > Maven build”. Define the goals “clean package” in the following dialog:

- Example “IntelliJ”: select the “clean” and “package” tasks in the view “Maven” and start the task by using the right mouse button:

- Example “NetBeans”: right click the project and select “Run Maven > Goals...”. Define goals “clean package” in the following dialog.

As result you should see some result output within the project's “/target” directory – this output includes an un-packaged version of the web application with all its resolved dependencies. You may take a look into the “/WEB-INF/lib” folder to see the resolved “.jar”-files.

#### Gradle

- Execute “clean” and “build”.

- Example “Eclipse”: Select the “build” task from the view “Gradle Tasks”and start by using right mouse button:

- Example “IntelliJ”: Select the “build” task from the view “Gradle” and start by using right mouse button:

- Example “NetBeans”: Select the “build” task from the “Navigator” and start by using right mouse button:

As result you should see some result output within the project's “/build/libs” directory – the .war-file should have been generated here.

### Reload the project within the CaptainCasa tool-set

- Menu: “Tools” > “Reload Server”

- Maven

  - By reloading the un-packaged web application from the “/target” directory is copied into the Tomcat server's “/webapp” directory, so that the full web application is available in the runtime

- Gradle

  - By reloading the .war file from the “/build/libs” directory is unzipped and copied into the Tomcat server's “/webapp” directory, so that the full web application is available in the runtime

## From now on

- Updating the Java sources of the project does not require a full Maven-build and a full “reload” of the project – a “hot deployment” is enough for updating the runtime.