I want to run a maven plugin goal using command line. This plugin is not defined in my pom and for this reason can not specify the phase with configuration. Even so, maven is able to find it in the repo and execute the goal properly. The problem is that these goals are executed in the order they appear in the command line, is there a way to link this goal to a specific phase with a command line parameter? I'm looking for something like:

mvn org.something:plugin-name:1.0.0:plugin-goal -phase=test package

This would execute all the phases before package and in the test phase, my goal would be executed? Is it possible?

1 Answers

JF Meier On Best Solutions


The way to solve this problem is to add the plugin to the POM and specify the execution in the phase test.