Reputation: 8338
If I do mvn versions:set -DnewVersion=14.7.1-SNAPSHOT
from the command line, it works, but if I create a bash script with
#!/bin/sh
mvn versions:set -DnewVersion=$1;
and run it with the parameter 14.7.1-SNAPSHOT
it bombs with the error
[ERROR] No goals have been specified for this build. You must specify a valid lifecycle phase or a goal in the format <plugin-prefix>:<goal> or <plugin-group-id>:<plugin-artifact-id>[:<plugin-version>]:<goal>. Available lifecycle phases are: validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy, pre-clean, clean, post-clean, pre-site, site, post-site, site-deploy. -> [Help 1]
Why is that?
Note that the script is in the same folder as the pom.xml.
Upvotes: 1
Views: 731
Reputation: 611
Might be totally wrong, but check if you have any other mvn
in your aliases or another program in the path that is called mvn
taking precedence.
Upvotes: 1