Author: brett
Date: Sat Feb 25 22:57:43 2006
New Revision: 381065
URL: http://svn.apache.org/viewcvs?rev=381065&view=rev
Log:
deploy snapshots with a unique version by default
Modified:
maven/plugins/trunk/maven-deploy-plugin/src/main/java/org/apache/maven/plugin/deploy/DeployFileMojo.java
Modified:
maven/plugins/trunk/maven-deploy-plugin/src/main/java/org/apache/maven/plugin/deploy/DeployFileMojo.java
URL:
http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-deploy-plugin/src/main/java/org/apache/maven/plugin/deploy/DeployFileMojo.java?rev=381065&r1=381064&r2=381065&view=diff
==============================================================================
---
maven/plugins/trunk/maven-deploy-plugin/src/main/java/org/apache/maven/plugin/deploy/DeployFileMojo.java
(original)
+++
maven/plugins/trunk/maven-deploy-plugin/src/main/java/org/apache/maven/plugin/deploy/DeployFileMojo.java
Sat Feb 25 22:57:43 2006
@@ -137,7 +137,14 @@
* @parameter expression="${classifier}";
*/
private String classifier;
-
+
+ /**
+ * Whether to deploy snapshots with a unique version or not.
+ *
+ * @parameter expression="${uniqueVersion}" default-value="true"
+ */
+ private boolean uniqueVersion;
+
public void execute()
throws MojoExecutionException
@@ -146,14 +153,14 @@
initProperties();
Artifact pomArtifact = null;
-
+
try
{
// Create the artifact
Artifact artifact = artifactFactory.createArtifactWithClassifier(
groupId, artifactId, version, packaging, classifier );
-
+
ArtifactRepository deploymentRepository = repositoryFactory
- .createDeploymentArtifactRepository( repositoryId, url,
layout, false );
+ .createDeploymentArtifactRepository( repositoryId, url,
layout, uniqueVersion );
// Upload the POM if requested, generating one if need be
if ( generatePom )
@@ -185,7 +192,7 @@
throw new MojoExecutionException( "No transfer protocol
found." );
}
getDeployer().deploy( file, artifact, deploymentRepository,
getLocalRepository() );
-
+
if( isPomFileExisting() && generatePom == false )
{
getDeployer().deploy( pomFile, pomArtifact,
deploymentRepository, getLocalRepository() );