With your plugin defined under the <pluginManagement>
, you are actually telling maven which version of the plugin you will use throughout your project when you will invoke the plugin. I would normally expect the <pluginManagement>
tag to be present in the parent pom.
To invoke the plugin - simply put the <plugins/>
element. It may or may not be inherited from a
Hence to use the plugin, you just need to invoke the plugin by putting
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.3</version>
<executions>
<execution>
<id>build-test-environment</id>
<phase>generate-test-resources</phase>
<goals>
<goal>java</goal>
</goals>
</execution>
</executions>
<configuration>
<mainClass>main.java._tools.BuildTestEnvironment</mainClass>
</configuration>
</plugin>
...AnyOtherPlugin
<plugins>
without any <pluginManagement>
tag