Maven p8: Plugins p3

Now we've got a plugin, we'll add it to a project.

I've simply created a new directory with this pom.xml. It says it's creating a jar. But the jar's empty. This is just to see the plugin in action.

There are a few new things, to be noted afterwards.

  	<project xmlns="" xmlns:xsi=""

The build tag has a plugin tag. Within we give it the group and artifact of the previously defined plugin, plus the version. The configuration is to pass the our.message parameter. We leave out the first part, for some reason. If we were setting this in the properties tag, under the project tag, we'd use our.message.

The execution tag says run the defined 'test' goal in the compile stage. And if we run mvn install, we'll see our output, 'HALLO' in this case, on the screen.

maven maven-plugins

Edit on github
comments powered by Disqus
Click me