You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by cyril mail <th...@gmail.com> on 2007/08/16 17:20:27 UTC

Deploy problem with POMs which have variable in the version tag

Hi All,

I'm working in an enterprise which has its own development workflow based on
the SCM Synergy.
In order to work efficiently with this workflow, we need to put in the POM
some variables related to the version number of artifacts according to these
rules :
-- the POM is written once at the start of a new release (commercial version
in Synergy) and "never" updated until a next release/version;
-- the version number of the artifact is fixed and never changed (ex.:
02.01.00)
-- a variable is introduced next to this version number to determine at the
build what will be generated (a snapshot, a release, a release candidate, an
alpha, ...)
   thanks to Maven profiles.

When working in the team environment, all the things work. But when I need
to deploy some artifacts in my enterprise internal Maven repositories,
things go wrong because the deployed POM contains the variables names
(variables are not filtered) and not the values I've decided to give at the
build.
So when some other projects need one of my artifacts, they can't find it in
the enterprise internal Maven repositories.

Do you have an idea of how I could keep my workflow and a way to manage
version and to deploy automatically the POM with the values (and not the
variable names) ?

Is it normal to deploy a POM which can contain variables ? I thought that a
deployed POM was environment independent...
What's your opinion on managing developed artifact version and/or
dependencies versions through variables driven by profiles during the
development ?


PS:
I've looked at the deploy plugin source code, and I've understand that the
deployed POM was the file POM on the disk.
But, it could be interesting to introduce a new parameter (not mandatory)
named deployValuedPom to the deploy plugin. This parameter will be a boolean
flag to decide either to deploy the file POM on the disk (parameter=false,
the default value), either the valued POM (explicit parameter=true). So the
new feature won't have impact on existing projetcs.
With this parameter, it could be possible to work with version of
artifact/dependency defined by variables during the development stage and
then fixed automatically during the deployment of the release.

What do you think about this new feature?

Thanks in advance for your help/ideas.

Regards,
Cyril