maven - choose plugin phase from command line
-
02-06-2021 - |
Question
i'm not a maven expert. in my maven2 project i have a couple of report plugins (dependency, tattletale etc). some of them are bound to 'pre-site' phase, some to 'site' phase. this way i have a nice report on my site.
but sometimes, when tests don't pass i need this report to check what's wrong. is there any way to run the same plugins (in correct order) after compile or even after dependency resolution? i just want to skip all the findubs, checkstyle etc that are run at site phase and quickly have this single report to check why my project doesn't compile or why tests fail
i'm looking for something like:
mvn -P tattletale-report compile
but any other reasonable way will do
Solution
I don't know this plugin in particular but calling goals on the jetty plugin, it works with
mvn jetty:run-exploded
to give an example. Not knowing the plugin, i'd said
mvn tattletale:report
should work. Usually the plugin documentation should give you the right goals and commands. But hacking some words in Google, it appears to be a little more complicated.