felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stuart McCulloch" <stuart.mccull...@jayway.net>
Subject Re: Release Configuration
Date Tue, 08 Jan 2008 15:32:59 GMT
On 08/01/2008, Carsten Ziegeler <cziegeler@apache.org> wrote:
> Niall Pemberton wrote:
> > On Jan 8, 2008 7:46 AM, Carsten Ziegeler <cziegeler@apache.org> wrote:
> >> I just found out that profile inheritance in maven is not implemented
> by
> >> design [1].
> >> And this means that the "release" profile in our parent pom is useless
> >> as you can't apply it to a sub project. It seems that most other
> >> projects at Apache have a similar configuration, so I'm wondering if
> >> there is any trick to get it working?
> >
> > The only problem we've had in Apache Commons with using a "release"
> > profile in our parent pom is that when the release plugin calls other
> > plugins it doesn't pass on the "arguments" specifying the profile
> > which means that the called plugin doesn't use the profile. To resolve
> > that you can also specify the profile as an "arguments" parameter -
> > for example:
> >
> >    mvn -Prelease -Darguments="-Prelease" release:perform
> >
> > Alternatively you can configure the arguments for the release-plugin
> > in the profile (which is what we've done in commons):
> >
> >    http://svn.apache.org/viewvc?view=rev&revision=603888
> >
> Hmm, I'm not sure if I understand you correctly: you say that you can do
> a "mvn -Prelease release:perform" in let's say commons-io and then the
> configuration from the parent pom is used?
> So if you do a "mvn -Prelease help:active-profiles" in commons-io it
> will list "release" as an active profile although you don't have a
> profile definition for "release" in the pom of commons-io?

as I understand it, when you use "mvn -Prelease" it will activate the
release profile
in the parent pom (ie. it will enable the various elements there) and those
will then be inherited by the sub-project - that's why profile inheritance
isn't needed,
because you get it for free... in fact inheriting profiles would lead to

for example, if I run "mvn -Prelease help:effective-pom" for the
bundleplugin, I see
the additional elements relating to packaging and signing the project/bin

however, it appears that Maven doesn't pass the -P setting onto forked
for example with "mvn release:perform", which is where Niall's suggestion of
-Darguments="-Prelease" comes in.


> Carsten
> --
> Carsten Ziegeler
> cziegeler@apache.org

Cheers, Stuart

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message