For the development of a Java Maven plugin, we will use the same tool chain we presented in Chapter 1, Maven and Its Philosophy.
Using Eclipse's utility, we can create a new project with Maven archetype. So, we obtain a skeleton for the new Maven plugin project. This is a good starting point for our project. Perform the following steps:
First of all, we will create a new Eclipse project as a new Maven project from the menu, as shown in the following screenshot:
Then, we can choose the location for our project and click on Next:
Now, we have to select the artifact type for our project. First, we choose Nexus Indexer, then we select
maven-archetype-plugin
, as shown in the following screenshot, and then click on Next:The last step in the creation procedure is the selection of the project's coordinates, as shown in the following screenshot:
The encouraged naming convention for artifactId
is <ourplugin>-maven-plugin
.