Setting up the project with Maven

To start the project, we will use the directory structure and pom.xml, that was created by Maven itself when we started with the following command line:

$ mvn archetype:generate

It created the directories, the pom.xml file, and an App.java file. Now, we will extend this project by creating new files. We will code the sorting algorithm first in the packt.java11.example.stringsort package:

When we create the new package in the IDE, the editor will automatically create the stringsort subdirectory under the already existing src/main/java/packt/java11/example directory:

Creating the new Sort class using the IDE ...

Get Java Projects - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.