I've tried hard to archive reproducable builds combined with soft versions
in maven. But I now believe
it is not possible.

Here is what I want:

I've got a project A and many Projects depending on it.
All Project shalls be build by a CI Tool.
A Build of A will trigger a build of all the other projects and those should
pick up the changes from A.
Each of this build should be reproducable. That is, each artifact produced
should carry a unique version and for each build
I've to be able to tell which artifacts have been used.

I've searched Mailinglists and google and I'm surprised few people have the
some problem. However there are
some Documents with related Issues:

Laurent Perez describes the same problem but wihtout ci a few weeks ago at
this list:
    http://www.mail-archive.com/[email protected]/msg95719.html

Looks like Dan Fabulich had related problem back in 2006, unfortunately
there are no new updates.

http://darkforge.blogspot.com/2006/12/compass-as-compared-with-mavens.html

http://docs.codehaus.org/display/MAVENUSER/BEA+Maven+Requirement+Documents

There is a ticket for the release plugin asking for dynamic version
replacement:
    http://jira.codehaus.org/browse/MRELEASE-399

I've already posted to this list asking for dynamic version replacement:

http://www.nabble.com/Replace-Dynamic-Revisions-during-td22331577.html#a22346378

I've tried the solution from this post:
- Change the preparationGoals of the relase plugin to be
versions:update-properties invoker:run
and configure the invoker plugin to run clean verify
Problems: This does span a new maven instance and thus fails for multimodule
builds with dependencies among the childs.
(The release plugin does some magic to allow dependencies between childs,
this magic seems to fail in the new maven instance)

Another (partial) solution:
- have a global parent pom that list the current version of all modules in
the depMang. section.  This just moves to problem
  of missing soft versions to the parent section: The Projects would need to
update there parent section after each build.
  [0,) or RELEASE dont's work in the parent section.

Maven leaks a robust mechanism for soft (or "dynamic") revisions that get
replaced during release with concrete Versions.

Any Ideas are welcome.

Best regards,

Martin

Reply via email to