Step 5 Compile The Application

The application is built by the Maven compiler. This can be done from the terminal or from Eclipse.

If you want to do this from a terminal, navigate to the JBStrapDemo\FirstApp folder and enter the following:

The application is now compiled. A folder named target has been created which contains the file named firstApp.war. This file is ready to be installed on the application server.

It is also possible to use Eclipse for the compilation:

Right-click on your firstApp project in the left side of the Project Explorer → Run as... → Maven build...

In the window that appears, Maven asks you with which Goals it should compile the project. This only has to be set once. Your answer is saved by Eclipse and will be used by default for future compilations.

Type “clean install” in the Goals line and click the Run button to initiate the build.

In the lower part of the Eclipse screen, a tab labelled Console opens that shows you the result of the compilation process.

When the build is completed, you should see the following:

The only thing left to do is to install your application on the application server.