Reputation: 1616
I'm using maven-help-plugin one-liner to grab the project version in a bash script:
currentVersion=`mvn org.apache.maven.plugins:maven-help-plugin:3.2.0:evaluate -Dexpression=project.version -q -DforceStdout`
It runs in a few seconds locally but takes over 2 minutes when it runs on our build agents. I ran it with -X and I didn't see anything obviously alarming though it did run a bit more quickly. I also tried running it with -o in case it's dependency downloading or some network hiccup slowing it down but it just fails to find the plugin and doesn't run at all.
Is this just a known slow command, or could the command run faster if I configured it differently or adjusted my POMs in some way?
But with it taking 2+ minutes I may need to drop the maven way in favor of xmlstarlet or something to treat the POM as just XML.
Upvotes: 4
Views: 883