Reputation: 1271
does anyone know if it is possible to inject an environment variable into the mvn command. for example I would like to do the following in my jenkins build definition:
mvn -e -P ${env.profile} clean install assembly:assembly
my google foo is not turning up any way to do this outside the settings.xml and even that is not as dynamic as I need.
thanks in advance
Upvotes: 0
Views: 201
Reputation: 4847
The second answer in this post should help you. It used maven-antrun-plugin
Upvotes: 0
Reputation: 77971
Just use the environment variable, directly:
mvn -e -P $profile clean install assembly:assembly
mvn -e -P %profile% clean install assembly:assembly
Upvotes: 1