Not possible to deploy snapshot version without timestamps with Maven 3.0
-------------------------------------------------------------------------

                 Key: MNG-5015
                 URL: http://jira.codehaus.org/browse/MNG-5015
             Project: Maven 2 & 3
          Issue Type: Bug
          Components: Deployment
    Affects Versions: 3.0.2, 3.0.1, 3.0
         Environment: Mac OS X 10.6.5, Java 6, maven-deploy-plugin 2.5
            Reporter: Tibor Varga
         Attachments: pom.xml

Created a simple project using archetype:generate, set a snapshot version and 
added a distribution management section with only a snapshot repository in it 
with <uniqueVersion>false</uniqueVersion>.

Then ran "mvn deploy" and got a timestamped artifact in my repository. Note 
that the unique version has been set to "false" in the repository specification.


Here's the relevant log snippet:

[INFO] --- maven-deploy-plugin:2.5:deploy (default-deploy) @ test ---
Downloading: 
file:///tmp/test-repository/maven/deployment/test/1.0-SNAPSHOT/maven-metadata.xml
Uploading: 
file:///tmp/test-repository/maven/deployment/test/1.0-SNAPSHOT/test-1.0-20110213.141438-1.jar
Uploaded: 
file:///tmp/test-repository/maven/deployment/test/1.0-SNAPSHOT/test-1.0-20110213.141438-1.jar
 (3 KB at 448.6 KB/sec)
Uploading: 
file:///tmp/test-repository/maven/deployment/test/1.0-SNAPSHOT/test-1.0-20110213.141438-1.pom
Uploaded: 
file:///tmp/test-repository/maven/deployment/test/1.0-SNAPSHOT/test-1.0-20110213.141438-1.pom
 (2 KB at 335.9 KB/sec)
Downloading: 
file:///tmp/test-repository/maven/deployment/test/maven-metadata.xml
Uploading: 
file:///tmp/test-repository/maven/deployment/test/1.0-SNAPSHOT/maven-metadata.xml
Uploaded: 
file:///tmp/test-repository/maven/deployment/test/1.0-SNAPSHOT/maven-metadata.xml
 (764 B at 248.7 KB/sec)
Uploading: file:///tmp/test-repository/maven/deployment/test/maven-metadata.xml
Uploaded: file:///tmp/test-repository/maven/deployment/test/maven-metadata.xml 
(278 B at 90.5 KB/sec)


Then I tried "mvn deploy:deploy-file -Dfile=target/test-1.0-SNAPSHOT.jar 
-DuniqueVersion=false -Durl=file:///tmp/test-repository 
-DgroupId=maven.deployment -DartifactId=test -Dpackaging=jar 
-Dversion=1.0-SNAPSHOT" and got the same result: timestamped artifact in my 
repository.


Here's the relevant log snippet:

[INFO] --- maven-deploy-plugin:2.5:deploy-file (default-cli) @ test ---
Downloading: 
file:///tmp/test-repository/maven/deployment/test/1.0-SNAPSHOT/maven-metadata.xml
Downloaded: 
file:///tmp/test-repository/maven/deployment/test/1.0-SNAPSHOT/maven-metadata.xml
 (764 B at 124.3 KB/sec)
Uploading: 
file:///tmp/test-repository/maven/deployment/test/1.0-SNAPSHOT/test-1.0-20110213.141907-2.jar
Uploaded: 
file:///tmp/test-repository/maven/deployment/test/1.0-SNAPSHOT/test-1.0-20110213.141907-2.jar
 (3 KB at 747.7 KB/sec)
Uploading: 
file:///tmp/test-repository/maven/deployment/test/1.0-SNAPSHOT/test-1.0-20110213.141907-2.pom
Uploaded: 
file:///tmp/test-repository/maven/deployment/test/1.0-SNAPSHOT/test-1.0-20110213.141907-2.pom
 (400 B at 195.3 KB/sec)
Downloading: 
file:///tmp/test-repository/maven/deployment/test/maven-metadata.xml
Downloaded: 
file:///tmp/test-repository/maven/deployment/test/maven-metadata.xml (278 B at 
30.2 KB/sec)
Uploading: 
file:///tmp/test-repository/maven/deployment/test/1.0-SNAPSHOT/maven-metadata.xml
Uploaded: 
file:///tmp/test-repository/maven/deployment/test/1.0-SNAPSHOT/maven-metadata.xml
 (764 B at 248.7 KB/sec)
Uploading: file:///tmp/test-repository/maven/deployment/test/maven-metadata.xml
Uploaded: file:///tmp/test-repository/maven/deployment/test/maven-metadata.xml 
(278 B at 90.5 KB/sec)



I noticed this behavior at work and spent an hour trying every combination of 
settings in parent POMs, child POMs, command line parameters, anything I could 
think of, for no avail.

Then I tried the simplest setup with Maven 2 and it worked like a charm, with 
no timestamps and all.

Tried the same setup with Maven 3 and I got the timestamps again.

In short, with Maven 3 it is not possible to deploy an artifact with a snapshot 
version without getting a  timestamp appended to the name of the uploaded files.

I attached the POM with which I produced the above output logs.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to