Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Critical Critical
    • Resolution: Won't Fix
    • Affects Version/s: 1.2
    • Fix Version/s: None
    • Labels:
      None
    • Number of attachments :
      0

      Description

      Building time-stamped snapshots with multiproject:install-snapshot (same applies to multiproject:deploy-snapshot) results in unreliable versions if you use versioned snapshots. The install-snapshot goal will build artifacts without the version information using just -SNAPSHOT and renames them to a timed version, but any dependent artifact will use later on -<version>-SNAPSHOT in its dependencies, that were not even build and may be downloaded in an buggy version from an internal repo.

      Example (cut down to the interesting parts):

      ====== %< =======
      $ maven multiproject:install-snapshot
      __ __

      \/ __ Apache_ ___
        \/ / ` \ V / -) ' \ ~ intelligent projects ~
      _   _,_ _/___ _ _ v. 1.0-rc2

      Starting the reactor...
      Our processing order:
      nanocontainer
      nanocontainer-servlet
      nanocontainer-nanoweb
      nanocontainer-sample-nanoweb
      +----------------------------------------

      Executing multiproject:install-snapshot-callback nanocontainer
      Memory: 8M/11M
      +----------------------------------------
      build:start:

      multiproject:install-snapshot-callback:
      [echo] Running jar:install-snapshot for nanocontainer
      jar:snapshot:
      [echo] Building snapshot JAR: nanocontainer-20040609.071430
      <...>
      jar:jar:
      [jar] Building jar: C:\Work\Apps\Codehaus\pico\java\nanocontainer\target\nanocontainer-20040609.071430.jar

      jar:install-snapshot:
      [copy] Copying 1 file to C:\Dokumente und Einstellungen\jos\.maven\repository\nanocontainer\jars
      [copy] Copying 1 file to C:\Dokumente und Einstellungen\jos\.maven\repository\nanocontainer\jars
      +----------------------------------------

      Executing multiproject:install-snapshot-callback nanocontainer-servlet
      Memory: 12M/14M
      +----------------------------------------
      Attempting to download nanocontainer-1.0-beta-1-SNAPSHOT.jar.
      ...

      build:end:

      build:start:

      multiproject:install-snapshot-callback:
      [echo] Running jar:install-snapshot for nanocontainer-servlet
      jar:snapshot:
      [echo] Building snapshot JAR: nanocontainer-servlet-20040609.071505
      <...>
      jar:jar:
      [jar] Building jar: C:\Work\Apps\Codehaus\pico\java\servlet\target\nanocontainer-servlet-20040609.071505.jar
      jar:install-snapshot:
      [copy] Copying 1 file to C:\Dokumente und Einstellungen\jos\.maven\repository\nanocontainer\jars
      [copy] Copying 1 file to C:\Dokumente und Einstellungen\jos\.maven\repository\nanocontainer\jars
      +----------------------------------------

      Executing multiproject:install-snapshot-callback nanocontainer-nanoweb
      Memory: 14M/18M
      +----------------------------------------
      Attempting to download nanocontainer-servlet-1.0-beta-1-SNAPSHOT.jar.
      .
      Attempting to download nanocontainer-1.0-beta-1-SNAPSHOT.jar.

      build:end:

      build:start:

      multiproject:install-snapshot-callback:
      [echo] Running jar:install-snapshot for nanocontainer-nanoweb
      jar:snapshot:
      [echo] Building snapshot JAR: nanocontainer-nanoweb-20040609.071603
      <...>
      jar:jar:
      [jar] Building jar: C:\Work\Apps\Codehaus\pico\java\nanoweb\target\nanocontainer-nanoweb-20040609.071603.jar
      jar:install-snapshot:
      [copy] Copying 1 file to C:\Dokumente und Einstellungen\jos\.maven\repository\nanocontainer\jars
      [copy] Copying 1 file to C:\Dokumente und Einstellungen\jos\.maven\repository\nanocontainer\jars
      +----------------------------------------

      Executing multiproject:install-snapshot-callback nanocontainer-sample-nanoweb
      Memory: 12M/20M
      +----------------------------------------
      Attempting to download nanocontainer-1.0-beta-1-SNAPSHOT.jar.
      Attempting to download nanocontainer-servlet-1.0-beta-1-SNAPSHOT.jar.
      Attempting to download nanocontainer-nanoweb-1.0-beta-1-SNAPSHOT.jar.
      .

      build:end:

      build:start:

      multiproject:install-snapshot-callback:
      [echo] Running war:install-snapshot for nanocontainer-sample-nanoweb
      <...>
      war:webapp:
      [echo] Assembling webapp nanocontainer-sample-nanoweb
      [mkdir] Created dir: C:\Work\Apps\Codehaus\pico\java\sample-nanoweb\target\nanocontainer-sample-nanoweb\WEB-INF\tld
      [copy] Copying 1 file to C:\Work\Apps\Codehaus\pico\java\sample-nanoweb\target\nanocontainer-sample-nanoweb\WEB-INF

      war:war:
      [echo] Building WAR nanocontainer-sample-nanoweb
      [jar] Building jar: C:\Work\Apps\Codehaus\pico\java\sample-nanoweb\target\nanocontainer-sample-nanoweb.war
      Installing snapshot of:'C:\Work\Apps\Codehaus\pico\java\sample-nanoweb/target/nanocontainer-sample-nanoweb.war''
      Copying: from 'C:\Work\Apps\Codehaus\pico\java\sample-nanoweb\target\nanocontainer-sample-nanoweb.war' to: 'C:\Dokumente und Einstellungen\jos\.maven\repository\nanocontainer\wars\nanocontainer-sample-nanoweb-SNAPSHOT.war'
      Copying: from 'C:\Work\Apps\Codehaus\pico\java\sample-nanoweb\target\nanocontainer-sample-nanoweb.war' to: 'C:\Dokumente und Einstellungen\jos\.maven\repository\nanocontainer\wars\nanocontainer-sample-nanoweb-20040609.071707.war'
      Copying: from 'C:\Work\Apps\Codehaus\pico\java\sample-nanoweb\project.xml' to: 'C:\Dokumente und Einstellungen\jos\.maven\repository\nanocontainer\poms\nanocontainer-sample-nanoweb-SNAPSHOT.pom'
      Copying: from 'C:\Work\Apps\Codehaus\pico\java\sample-nanoweb\project.xml' to: 'C:\Dokumente und Einstellungen\jos\.maven\repository\nanocontainer\poms\nanocontainer-sample-nanoweb-20040609.071707.pom'

      BUILD SUCCESSFUL
      Total time: 3 minutes 36 seconds
      Finished at: Wed Jun 09 09:17:49 CEST 2004

      ====== %< =======

      $ jar tf ~/.maven/repository/nanocontainer/wars/nanocontainer-sample-nanoweb-20040609.071707.war
      META-INF/
      META-INF/MANIFEST.MF
      WEB-INF/
      WEB-INF/classes/
      WEB-INF/classes/org/
      WEB-INF/classes/org/nanocontainer/
      WEB-INF/classes/org/nanocontainer/sample/
      WEB-INF/classes/org/nanocontainer/sample/nanoweb/
      WEB-INF/lib/
      WEB-INF/tld/
      game.groovy
      game_input.vm
      WEB-INF/classes/org/nanocontainer/sample/nanoweb/NumberToGuess.class
      WEB-INF/lib/asm-1.4.1.jar
      WEB-INF/lib/commons-collections-2.1.jar
      WEB-INF/lib/groovy-1.0-beta-4.jar
      WEB-INF/lib/nanocontainer-1.0-beta-1-SNAPSHOT.jar
      WEB-INF/lib/nanocontainer-nanoweb-1.0-beta-1-SNAPSHOT.jar
      WEB-INF/lib/nanocontainer-servlet-1.0-beta-1-SNAPSHOT.jar
      WEB-INF/lib/ognl-2.5.1.jar
      WEB-INF/lib/picocontainer-1.0.jar
      WEB-INF/lib/velocity-1.4-rc1.jar
      WEB-INF/lib/velocity-tools-view-1.0.jar
      WEB-INF/web.xml

      ====== %< =======

      $ ls -l ~/.maven/repository/nanocontainer/wars
      total 8822
      rwx-----+ 1 jos mkgroup 1246342 Jun 9 09:17 nanocontainer-sample-nanoweb-20040609.071707.war
      rwx-----+ 1 jos mkgroup 1246342 Jun 9 09:17 nanocontainer-sample-nanoweb-SNAPSHOT.war
      $ ls -l ~/.maven/repository/nanocontainer/jars
      rwx-----+ 1 jos mkgroup 54740 Jun 9 08:42 nanocontainer-1.0-beta-1-SNAPSHOT.jar
      rwx-----+ 1 jos mkgroup 54740 Jun 9 09:14 nanocontainer-20040609.071430.jar
      rwx-----+ 1 jos mkgroup 54740 Jun 9 09:14 nanocontainer-SNAPSHOT.jar
      rwx-----+ 1 jos mkgroup 9398 Jun 9 08:43 nanocontainer-nanoweb-1.0-beta-1-SNAPSHOT.jar
      rwx-----+ 1 jos mkgroup 9398 Jun 9 09:16 nanocontainer-nanoweb-20040609.071603.jar
      rwx-----+ 1 jos mkgroup 9398 Jun 9 09:16 nanocontainer-nanoweb-SNAPSHOT.jar
      rwx-----+ 1 jos mkgroup 18562 Jun 9 08:42 nanocontainer-servlet-1.0-beta-1-SNAPSHOT.jar
      rwx-----+ 1 jos mkgroup 13445 Jun 9 09:15 nanocontainer-servlet-20040609.071505.jar
      rwx-----+ 1 jos mkgroup 13445 Jun 9 09:15 nanocontainer-servlet-SNAPSHOT.jar

      ====== %< =======

      The build did neither create one single time-stamp (optimal) nor use the time-stamed versions (quite optimal) nor the created snapshots (still valid), but the uncontrolled and downloaded versioned snapshots and they were even included and delivered in the war.

      The behaviour could also be changed to create time-stamped snapshots, that keep the version and just replace the -SNAPSHOT part. This would also allow time-stamed snapshots from different branches of a project.

      Regards,
      Jörg

        Activity

        Hide
        Michael Osipov added a comment -

        Please refer to https://cwiki.apache.org/confluence/display/MAVEN/The+Great+JIRA+Cleanup+of+2014 if you're wondering why this issue was closed out.

        Show
        Michael Osipov added a comment - Please refer to https://cwiki.apache.org/confluence/display/MAVEN/The+Great+JIRA+Cleanup+of+2014 if you're wondering why this issue was closed out.

          People

          • Assignee:
            Unassigned
            Reporter:
            Jörg Schaible
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: