Skip to Content

Convert your app to a Maven-based project

0 %
Convert your app to a Maven-based project
// Explore More Tutorials

Convert your app to a Maven-based project


Convert your app to a Maven-based project

You will learn

In this tutorial you will learn how to convert your basic Java app into a Maven-based project which is useful to prepare for the complexities of dependency management in larger apps.

Step 1: Open configuration menu

Select the weatherapp node in the project explorer and open the context menu. Select the Configure > Convert to Maven Project option.

Step 2: Change group ID

Change the group ID from weatherapp to and click on Finish. The most noticeable change will be that a pom.xml file will be created in the root folder of theweatherapp project.

Customizing Maven POM - pom.xml
Step 3: Replace existing content

Copy the entire content from the pom.xml file from GitHub and use it to replace the existing content in your project.

modifying the Maven pom.xml
Step 4: Update project

Open the context menu on the weatherapp project in the Project Explorer and select the menu entry Maven > Update Project… (The first time you do this can take a bit longer, as Maven will download all the required build plugins and dependencies specified in the pom.xml file). Make sure your project is selected then click on OK.

Step 5: Build

Select the Run as > Maven build… context menu of the weatherapp project and enter the following in the Goals field: clean package install.

Adding goals to the Maven Build settings
Step 6: Run the project

Click on Run and the project should build successfully.

Next Steps

Back to top