AFAIK, for 2.1 there will be limited fixups to the pom
but i don't see /project/parent/version supporting property expansion as
being a good idea or on the cards... rather it will copy
/project/parent/version to /project/version is /project/version is missing
(not sure why this is needed myself though)
On Thu, Sep 18, 2008 at 8:08 AM, Tomasz Pik <[EMAIL PROTECTED]> wrote:
> On Thu, Sep 18, 2008 at 7:44 AM, Ellecer Valencia <[EMAIL PROTECTED]>
> wrote:
> > I'm trying to clarify what is the purpose of the Maven descriptor, and
> > what systems make use of it, and if there is any point in working on
> > this issue we have with the pom.xml that is added to our generated
> > artifacts.
> >
> > Our projects are set up to have their version numbers passed in via
> > the build system. When a build is performed on Hudson, it passes in
> > the property major.minor.version and BUILD_NUMBER.
> >
> > So the version element in our pom.xml looks like this:
> >
> > <version>${major.minor.version}.${BUILD_NUMBER}</version>
> >
> > and the build command in the Hudson config for this project is like this
> >
> > mvn -Dmajor.minor.version=1.0.0 -DBUILD_NUMBER=${BUILD_NUMBER} clean
> package
> >
> > (actually, Hudson sets BUILD_NUMBER in the environment so we can also
> > leave it out)
> >
> > Now the problem is, when the pom.xml gets added to the generated
> > artifact, it's the same as the original pom.xml, so that the version
> > is still
> >
> > <version>${major.minor.version}.${BUILD_NUMBER}</version>
> >
> > and does not get the details passed in on the command line. Is this a
> > bug or how it's really supposed to work?
> >
> > I would've thought it would pick up on the parameters that have been
> > set and add a pom.xml that is more like the one you get when you do
> > "mvn help:effective-pom"
> >
> > The pom.properties has all the right values, so the "version" property
> > has whatever values were passed in from command line.
> >
> > It's not a major issue, but it's a small annoyance when you upload it
> > manually via Artifactory and it thinks that the version of the
> > artifact is the string "${major.minor.version}.${BUILD_NUMBER}".
> >
> > It would be great if other users or maven developers could clarify
> > what it is used for, and if the behaviour I'm seeing is intentional.
>
> This is how it's supposed to work. During 'install' or 'deploy' pom
> is just copied to repository. And it's a maven-release-plugin task
> to modify pom during release process so there's a change in
> version of artifact.
> mvn help:effective-pom provides you how maven interpret your
> pom. Maybe there should be a (I think that a very dangerous)
> property that will allow maven to 'install/deploy' serialized version
> of 'effective pom' instead of just copy project pom with
> non-interpolated properties?
>
> Regards,.
> Tomek
>
> >
> > (btw, am using Maven 2.0.8)
> >
> > thanks,
> >
> >
> > Ellecer
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>