On 26/03/2011 8:21 AM, bryan.dollery wrote:
Hi,

I am also getting grief from maven for using variables in my version fields.
For me, this is unavoidable. Let me explain...

In my parent pom I have:

${productVersion}

And in my properties I have:

         0-SNAPSHOT
         13.0.${productRevision}

On a developer's machine, this produces a version number of

          13.0.0-SNAPSHOT

Which is exactly what I want.

However, in my hudson CI server, as part of the maven command I have:

           -DivpnRevision=$SVN_REVISION-nt3

The $SVN_REVISION variable is provided by hudson. It contains the svn
revision number that has just been built, and the '-nt3' bit is the
environment it was built for.

I do this because subversion is my revision control system and it, rightly,
controls the revision number (the clue as to it's purpose is in it's name).
This is not a job I want to hand off to maven, for many reasons.

If I use maven 3 for my builds, then my IDEs (both eclipse and intellij) are
totally messed up -- maven 3 messes up the classpath because it can't deal
with the variables. So, I'm stuck on maven 2.

Now, I don't see this as providing the slightest obstacle to my ability to
get repeatable builds. Rather, it's the opposite -- if I want to repeat a
build all I have to know is the subversion revision number of the build I
want and I can check out that revision and rebuild to recreate an exact copy
of the original.

Just because maven thinks that an alternative approach is 'convention'
doesn't mean that I shouldn't be able to achieve this. CoC is supposed to
allow one the choice of following convention, but provide the ability to use
configuration where the convention does not fit one's requirements.

So, what to do?

If you don't want to follow the conventions that Maven enforces, you are better off with Ant. Fighting the Maven way and not following "Best Practices" just leads to frustration and a lot of long discussions with the same conclusion. Maven is a powerful tool but it implements a very definite philosophical approach to building software.

Ron

Bryan


--
View this message in context: 
http://maven.40175.n5.nabble.com/Re-Maven-3-0-Artefact-Dependency-version-discussion-request-tp83857p4265445.html
Sent from the Maven - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
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]

Reply via email to