The contents of this document are a work in progress
By default Maven expects all Maven plugin artifacts:
For our case we need to let Maven know that our plugin's groupId and artifactId are different from what Maven expects by default.
So we define for our Maven plugin a plugin prefix via our plugin's pom.xml.
To do this, we add the following to our pom.xml under the <project> element.
<?xml version="1.0" encoding="UTF-8"?>
<project>
.
.
.
<build>
<plugins>
<plugin>
<artifactId>maven-plugin-plugin</artifactId>
<configuration>
<goalPrefix>website</goalPrefix>
</configuration>
</plugin>
</plugins>
</build>
</project>
This tells Maven to use website as a plugin prefix or a 'short-hand' to allow invoking available Mojo(s) from our plugin.
<settings>
.
.
.
<pluginGroups>
<pluginGroup>org.codehaus.plexus</pluginGroup>
</pluginGroups>
</settings>
This should allow our Mojo to be invoked from the command prompt without have the need to type fully qualified reference to MonitorMojo (org.codehaus.plexus:plexus-website-monitor-plugin:monitor), and by simply typing:
mvn website:monitor
A more definitive reference on plugin prefix resolution is available here on the Maven website.
We will come back to configuring the MonitorMojo but before we do that we'll look at setting up unit tests for it.