Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-5015

Not possible to deploy snapshot version without timestamps with Maven 3.0

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Problem
    • 3.0, 3.0.1, 3.0.2
    • None
    • Deployment
    • None
    • Mac OS X 10.6.5, Java 6, maven-deploy-plugin 2.5

    Description

      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.

      Attachments

        1. pom.xml
          1 kB
          Tibor Adam Varga

        Issue Links

          Activity

            People

              bentmann Benjamin Bentmann
              vta Tibor Adam Varga
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: