maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Georgeson <JGeorge...@lgc.com>
Subject RE: profile activation with multiple conditions
Date Tue, 10 Nov 2015 21:06:39 GMT
So here's a minimal parent pom.xml, which lists 2 child modules that I created with 'mvn archetype:generate'
choosing the 'maven-archetype-quickstart' archetype. My goal was that if I 

	mvn package

Then the compile/test/package occurs with no attempt to sign. But then by changing the command
to 

	mvn package -Djarsigner.keystore.scm.url=... -Djarsigner.keystore.scm.user=... -Djarsigner.keystore.scm.password=...
\
             -Djarsigner.storepass=...

Then it checks out a single copy of the keystore during the package phase of the parent project,
and the jarsigner profile automatically activates during each of the modules due to the presence
of the keystore file.

Instead it's deleting the keystore and checking out the keystore file during every project
(or instead of and of profile activation conditions), and the jarsigner profile is not automatically
activated.

> -----Original Message-----
> From: Justin Georgeson [mailto:JGeorgeson@lgc.com]
> Sent: Friday, November 06, 2015 9:39 AM
> To: Maven Users List
> Subject: [EXTERNAL] RE: profile activation with multiple conditions
> 
> Sorry about that crazy URL, I think that's a network security service my
> employer just signed up with.
> 
> > -----Original Message-----
> > From: Justin Georgeson [mailto:JGeorgeson@lgc.com]
> > Sent: Friday, November 06, 2015 9:34 AM
> > To: users@maven.apache.org
> > Subject: [EXTERNAL] profile activation with multiple conditions
> >
> > I have a profile defined in my parent POM which I'm trying to activate
> > like this
> >
> >             <activation>
> >                 <property>
> >                     <name>jarsigner.keystore.scm.url</name>
> >                 </property>
> >                 <file>
> >                     <missing>${keystore.dir}</missing>
> >                 </file>
> >             </activation>
> >
> > The goal is that when run with -Djarsigner.keystore.scm.url the
> > keystore will be checked out from SCM, but I don't want it to do that
> > for every module in a multi-module build. I thought that activation
> > was switched from OR to AND in 3.2.2[1] but I'm using 3.2.5 and I'm
> > seeing this profile as active when the property is set even though the
> > path exists. I thought maybe it's because ${keystore.dir} is a folder
> > instead of a file, so I tried it with a file but that had no effect. I
> > can work around it by having an extra checkout in the CI configuration
> > but I'd prefer to keep it self-contained in the 'mvn package' lifecycle of the
> build.
> >
> > [1] https://urldefense.proofpoint.com/v2/url?u=https-
> > 3A__issues.apache.org_jira_browse_MNG-
> > 2D4565&d=CwIFAg&c=PskvixtEUDK7wuWU-
> >
> tIg6oKuGYBRbrMXk2FZvF0UfTo&r=dLxYM3PBhAqFnkH7uKz_OVZL1uyui4QoEm
> >
> BCjCmEiTk&m=qSnekx007UIfFuC5Su7wwnAxDOG6yBCpBC5PyZFv2d0&s=ypg5E
> > ApiZkSAidXlZV394CNaIG3j8JF9HTM0DLm3rRQ&e=
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message