-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

deployment doesn't guarantee reproducibility. I already discussed this
with you on IRC, but I'm replicating my answer here to keep the list up
to date.

The only time you have strong requirements for reproducibility in builds
is at release time, when all -SNAPSHOT dependencies should already have
been resolved to concrete versions (even if these versions are the
timestamped alter egos of the snapshot artifacts). When you're merely
deploying, you're not making any assertion about the build being
static...particularly when you deploy with SNAPSHOT dependencies. In
those cases, it's important that your artifact's users be able to retain
that flexibility in choosing dependency versions given by SNAPSHOTs.

Deploying is still a distinct task from releasing, since you may deploy
a snapshot artifact in order to share it among team members, or CI
servers, without releasing it. In this case, it's understood that this
is a development copy, and you get what you ask for with any SNAPSHOT
dependencies. That is, dynamically resolved versions...even dynamically
re-resolved versions, if the artifact is used more than once over time.

Cheers,

John

Vincent Massol wrote:
| Thanks John,
|
| When I deploy now the resolved version is 0.7-SNASPHOT and not the
| timestamped version.
|
| It may work but that means that builds will not be reproducible,
because the
| correct dependency version will be chosen at runtime according to the
| available snapshots, right?
|
| Thanks
| -Vincent
|
|
|>-----Original Message-----
|>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
|>Sent: mardi 15 novembre 2005 17:15
|>To: commits@maven.apache.org
|>Subject: svn commit: r344386 - /maven/components/trunk/maven-
|>project/src/main/java/org/apache/maven/project/artifact/ProjectArtifactMet
|>adata.java
|>
|>Author: jdcasey
|>Date: Tue Nov 15 08:15:21 2005
|>New Revision: 344386
|>
|>URL: http://svn.apache.org/viewcvs?rev=344386&view=rev
|>Log:
|>Decoupling ${version} expressions from POM version before resolving it to
|>a buildnumber/timestamp on install or deploy.
|>
|>Modified:
|>    maven/components/trunk/maven-
|>project/src/main/java/org/apache/maven/project/artifact/ProjectArtifactMet
|>adata.java
|>
|>Modified: maven/components/trunk/maven-
|>project/src/main/java/org/apache/maven/project/artifact/ProjectArtifactMet
|>adata.java
|>URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-
|>project/src/main/java/org/apache/maven/project/artifact/ProjectArtifactMet
|>adata.java?rev=344386&r1=344385&r2=344386&view=diff
|>==========================================================================
|>====
|>--- maven/components/trunk/maven-
|>project/src/main/java/org/apache/maven/project/artifact/ProjectArtifactMet
|>adata.java (original)
|>+++ maven/components/trunk/maven-
|>project/src/main/java/org/apache/maven/project/artifact/ProjectArtifactMet
|>adata.java Tue Nov 15 08:15:21 2005
|>@@ -34,6 +34,8 @@
|> import java.io.FileReader;
|> import java.io.FileWriter;
|> import java.io.IOException;
|>+import java.io.StringReader;
|>+import java.io.StringWriter;
|>
|> /**
|>  * Attach a POM to an artifact.
|>@@ -85,10 +87,17 @@
|>         try
|>         {
|>             reader = new FileReader( file );
|>+            StringWriter sWriter = new StringWriter();
|>+            IOUtil.copy( reader, sWriter );
|>+
|>+            String modelSrc = sWriter.toString().replaceAll(
|>"\\$\\{(pom\\.|project\\.)?version\\}", artifact.getBaseVersion() );
|>+
|>+            StringReader sReader = new StringReader( modelSrc );
|>+
|>             writer = new FileWriter( destination );
|>
|>             MavenXpp3Reader modelReader = new MavenXpp3Reader();
|>-            Model model = modelReader.read( reader );
|>+            Model model = modelReader.read( sReader );
|>             model.setVersion( artifact.getVersion() );
|>
|>             DistributionManagement distributionManagement =
|>model.getDistributionManagement();
|>
|
|
|
|
| ---------------------------------------------------------------------
| To unsubscribe, e-mail: [EMAIL PROTECTED]
| For additional commands, e-mail: [EMAIL PROTECTED]
|
|
|
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)

iD8DBQFDeqCoK3h2CZwO/4URApqhAJ9NwzHOaIwADvzlN2/g0IukdrAtjACfTWQS
kq2UVxAkkKiKKrXfBkMaF44=
=LXVp
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to