From 101c54812796e52687ec374fcd79a5745b47fa3e Mon Sep 17 00:00:00 2001 From: ltheussl Date: Thu, 1 Dec 2005 00:36:12 +0000 Subject: [PATCH] PR: MPARTIFACT-59 Make deploying a timestamped SNAPSHOT artifact configurable. git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@350085 13f79535-47bb-0310-9956-ffa450edef68 --- artifact/plugin.properties | 2 ++ .../artifact/deployer/DefaultArtifactDeployer.java | 9 +++++++-- artifact/xdocs/changes.xml | 1 + artifact/xdocs/properties.xml | 10 ++++++++++ artifact/xdocs/tags.xml | 7 +++---- 5 files changed, 23 insertions(+), 6 deletions(-) diff --git a/artifact/plugin.properties b/artifact/plugin.properties index 94f85589..e2b44d65 100644 --- a/artifact/plugin.properties +++ b/artifact/plugin.properties @@ -21,3 +21,5 @@ maven.artifact.manifest.extensions.add=false maven.artifact.manifest.basedir=${plugin.dir}/plugin-resources/templates maven.artifact.manifest.template=manifest.vm + +maven.deploy.timestamps=true \ No newline at end of file diff --git a/artifact/src/main/org/apache/maven/artifact/deployer/DefaultArtifactDeployer.java b/artifact/src/main/org/apache/maven/artifact/deployer/DefaultArtifactDeployer.java index 743b3241..d2afc97c 100644 --- a/artifact/src/main/org/apache/maven/artifact/deployer/DefaultArtifactDeployer.java +++ b/artifact/src/main/org/apache/maven/artifact/deployer/DefaultArtifactDeployer.java @@ -256,8 +256,13 @@ public class DefaultArtifactDeployer srcFiles.add( snapshotVersionFile ); destFiles.add( snapshotVersionsFilename ); - srcFiles.add( file ); - destFiles.add( handler.constructRepositoryFullPath( type, project, v ) ); + String deployTimestamp = + (String) project.getContext().getVariable( "maven.deploy.timestamps" ); + if ( deployTimestamp.equals("true") ) + { + srcFiles.add( file ); + destFiles.add( handler.constructRepositoryFullPath( type, project, v ) ); + } } // trick add special values to context for default repository; diff --git a/artifact/xdocs/changes.xml b/artifact/xdocs/changes.xml index cd044674..e812bdba 100644 --- a/artifact/xdocs/changes.xml +++ b/artifact/xdocs/changes.xml @@ -25,6 +25,7 @@ + Make deploying a timestamped SNAPSHOT artifact configurable. Update dependencies to match ones in maven 1.1 core and to unify them between plugins. The following dependencies are updated :
  • commons-collections v3.1 -> v3.0
  • diff --git a/artifact/xdocs/properties.xml b/artifact/xdocs/properties.xml index a1d237fb..215c1500 100644 --- a/artifact/xdocs/properties.xml +++ b/artifact/xdocs/properties.xml @@ -197,6 +197,16 @@
    + + + + + +
    maven.deploy.timestamps + Specifies whether timestamped versions of artifacts should + be deployed as well when deploying SNAPSHOT versions. + Defaults to 'true'. +

    If you are behind a firewall and need to use a proxy server, check the proxy properties. diff --git a/artifact/xdocs/tags.xml b/artifact/xdocs/tags.xml index 3326216e..6acbbd53 100644 --- a/artifact/xdocs/tags.xml +++ b/artifact/xdocs/tags.xml @@ -138,13 +138,12 @@ File foo-snapshot-version contains the version number (20030620.124616) that the snapshot is linked to, - so that - 'convert-snapshots' - can correctly update dependencies in projects that will use this artifact. + so that automated tools + can correctly update dependencies in projects that will use this artifact.

    artifact:deploy-snapshot tag uses the same set of attributes - as artifact:deploy tag + as artifact:deploy tag