You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Eric Kolotyluk <er...@gmail.com> on 2012/08/23 18:27:08 UTC

Configuring different properties with different goals

I have been playing around with the release plug-in using the Perforce
p4maven provider. There seems to be a glitch with their implementation such
that when you do prepare it looks like

mvn -Dmaven.scm.perforce.clientspec.name=<realspec> -Dusername=<user>
-Dpassword=<password>-Dmaven.scm.persistcheckout=true -Dresume=false
release:prepare

and for perform it looks like

mvn -Dmaven.scm.perforce.clientspec.name=<fakespec> -Dusername=<user>
-Dpassword=<password>-Dmaven.scm.persistcheckout=true -Dresume=false
release:perform

By configuring my POM I can simplify this to

mvn release:prepare

mvn -Dmaven.scm.perforce.clientspec.name=<fakespec> release:perform

The problem is that for perform the clientspec.name needs to be a
nonexistent clientspec. Is there some way to configure my POM so that
maven.scm.perforce.clientspec.name has one value for prepare and a
different value for perform? That is, I want to be able to just do

mvn release:prepare
mvn release:perform

and have it do the right thing.

Cheers, Eric