Maven (moved to ASF)
  1. Maven (moved to ASF)
  2. MNG-2903

Snapshots are being packaged with datestamps in their filename instead of "SNAPSHOT",


    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Critical Critical
    • Resolution: Incomplete
    • Affects Version/s: 2.0.5
    • Fix Version/s: None
    • Labels:
    • Complexity:
    • Number of attachments :


      When I run mvn package on a project, it collects all the correct and most recent
      jar files for me in the lib directory, however in the zip file instead
      of naming them <project>-3.0-SNAPSHOT.jar (for example) it will name
      them <project>-20070318.080720-37.jar.

      Meanwhile in the project's own jar file, the manifest will point to
      ./lib/<project>-3.0-SNAPSHOT.jar. This means the packaged project does
      not run.

      It doesn't do this for every single dependency snapshot, and I can't
      seem to work out a pattern as to which get named correctly and which

      I have two repositories in my pom file:

      <name> Common Repository</name>
      <name>Trovix Snapshot Repository</name>

      If I try to disable them manually (and use only the local repository),
      the problem persists. However, this is where it gets weird. If I
      unplug my network cable - my package file is created perfectly!

      However - if I unplug my network cable with the snapshot repository
      removed, it creates the package incorrectly once again!

      This seems to be the key part of what is making it work (blacklisting
      the snapshot-repository):

      [INFO] task-segment: [package]
      [INFO] [resources:resources]
      [INFO] Using default encoding to copy filtered resources.
      [INFO] snapshot com:com.benchmark:3.0-SNAPSHOT: checking for updates
      from snapshot-repository
      [WARNING] repository metadata for: 'snapshot
      com:com.benchmark:3.0-SNAPSHOT' could not be retrieved from repository:
      snapshot-repository due to an error: Error transferring file
      [INFO] Repository 'snapshot-repository' will be blacklisted
      [INFO] [compiler:compile]
      [INFO] Nothing to compile - all classes are up to date
      [INFO] [resources:testResources]
      [INFO] Using default encoding to copy filtered resources.
      [INFO] [compiler:testCompile]
      [INFO] No sources to compile
      [INFO] [surefire:test]
      [INFO] No tests to run.
      [INFO] [jar:jar]

      I have also run mvn -X package, and the debug log shows that it thinks
      it is collecting all the correct SNAPSHOT named jars, even though it
      then stores the date-stamped ones.


        Jason van Zyl made changes -
        Field Original Value New Value
        Fix Version/s Reviewed [ 13555 ]
        Brett Porter made changes -
        Component/s Artifacts and Repositories [ 11338 ]
        Fix Version/s Reviewed Pending Version Assignment [ 13555 ]
        Fix Version/s 2.1.x [ 13142 ]
        Jason van Zyl made changes -
        Fix Version/s 3.0 [ 13142 ]
        Fix Version/s 3.x [ 13145 ]
        Jason van Zyl made changes -
        Resolution Incomplete [ 4 ]
        Status Open [ 1 ] Closed [ 6 ]
        Paul Benedict made changes -
        Fix Version/s Issues to be reviewed for 3.x [ 13145 ]


          • Assignee:
            Tim Cederman


            • Created: