Uploaded image for project: 'Maven Release Plugin'
  1. Maven Release Plugin
  2. MRELEASE-330

target release:prepare fails for multiproject if cross project dependencies exist

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Duplicate
    • 2.0-beta-7
    • None
    • None
    • None
    • Maven version: 2.0.8
      Java version: 1.5.0_13
      OS name: "mac os x" version: "10.4.11" arch: "i386" Family: "unix"

    Description

      We got a multiproject with cross dependencies to release. The structure is like this:

      AvE24All

      +- Applications

       
      +- AvE24
       
      - AvE24Backoffice

      +- Frameworks

       
      - AvE24Data

      +- Static

       
      - www.ave24.de

      - WebServices

      - AvE24WS

      Each subproject contains a correlative pom.xml which declare the cross dependencies:

      The AvE24 and AvE24Backoffice subprojects both depend on AvE24Data and AvE24WS subprojects

      (see also AvE24All.zip attachment, which contains the bare bone (just pom.xml files) multiproject )

      While all the "easy" targets (clean, install, deploy) work for me release:prepare fails because the freshly build cross dependencies are only inside the target folder and not yet in some repository:

      mac-mini-lars:~/Documents/workspace/AvE24All lars$ mvn --batch-mode release:prepare
      [INFO] Scanning for projects...
      [INFO] Reactor build order:
      [INFO] Unnamed - assense.ave24:ave24-all-parent:pom:1.2.8-SNAPSHOT
      [INFO] Unnamed - assense.ave24:WebServices:pom:1.2.8-SNAPSHOT
      [INFO] AvE24WS
      [INFO] Unnamed - assense.ave24:Frameworks:pom:1.2.8-SNAPSHOT
      [INFO] Unnamed - assense.ave24:AvE24Data:woframework:1.2.8-SNAPSHOT
      [INFO] Unnamed - assense.ave24:Applications:pom:1.2.8-SNAPSHOT
      [INFO] Unnamed - assense.ave24:AvE24:woapplication:1.2.8-SNAPSHOT
      [INFO] Unnamed - assense.ave24:AvE24Backoffice:woapplication:1.2.8-SNAPSHOT
      [INFO] Unnamed - assense.ave24:Static:pom:1.2.8-SNAPSHOT
      [INFO] Unnamed - assense.ave24:www.ave24.de:jar:1.2.8-SNAPSHOT
      .
      .
      .
      [INFO] Working directory: /Users/lars/Documents/workspace/AvE24All
      [INFO] Checking dependencies and plugins for snapshots ...
      [INFO] Transforming 'Unnamed - assense.ave24:ave24-all-parent:pom:1.2.8-SNAPSHOT'...
      [INFO] Transforming 'Unnamed - assense.ave24:WebServices:pom:1.2.8-SNAPSHOT'...
      [INFO] Transforming 'AvE24WS'...
      [INFO] Transforming 'Unnamed - assense.ave24:Frameworks:pom:1.2.8-SNAPSHOT'...
      [INFO] Transforming 'Unnamed - assense.ave24:AvE24Data:woframework:1.2.8-SNAPSHOT'...
      [INFO] Transforming 'Unnamed - assense.ave24:Applications:pom:1.2.8-SNAPSHOT'...
      [INFO] Transforming 'Unnamed - assense.ave24:AvE24:woapplication:1.2.8-SNAPSHOT'...
      [INFO] Updating AvE24Data to 1.2.8
      [INFO] Updating AvE24WS to 1.2.8
      [INFO] Transforming 'Unnamed - assense.ave24:AvE24Backoffice:woapplication:1.2.8-SNAPSHOT'...
      [INFO] Updating AvE24Data to 1.2.8
      [INFO] Updating AvE24WS to 1.2.8
      [INFO] Transforming 'Unnamed - assense.ave24:Static:pom:1.2.8-SNAPSHOT'...
      [INFO] Transforming 'Unnamed - assense.ave24:www.ave24.de:jar:1.2.8-SNAPSHOT'...
      [INFO] Not generating release POMs
      [INFO] Executing goals 'clean verify'...
      [INFO] Executing: mvn clean verify --no-plugin-updates --batch-mode -P assense.default,assense.default
      [INFO] Scanning for projects...
      [INFO] Reactor build order:
      [INFO] Unnamed - assense.ave24:ave24-all-parent:pom:1.2.8
      [INFO] Unnamed - assense.ave24:WebServices:pom:1.2.8
      [INFO] AvE24WS
      [INFO] Unnamed - assense.ave24:Frameworks:pom:1.2.8
      [INFO] Unnamed - assense.ave24:AvE24Data:woframework:1.2.8
      [INFO] Unnamed - assense.ave24:Applications:pom:1.2.8
      [INFO] Unnamed - assense.ave24:AvE24:woapplication:1.2.8
      [INFO] Unnamed - assense.ave24:AvE24Backoffice:woapplication:1.2.8
      [INFO] Unnamed - assense.ave24:Static:pom:1.2.8
      [INFO] Unnamed - assense.ave24:www.ave24.de:jar:1.2.8
      [INFO] ------------------------------------------------------------------------
      [INFO] Building Unnamed - assense.ave24:ave24-all-parent:pom:1.2.8
      [INFO] task-segment: [clean, verify]
      .
      .
      .
      [INFO] ------------------------------------------------------------------------
      [INFO] Building AvE24WS
      [INFO] task-segment: [clean, verify]
      [INFO] ------------------------------------------------------------------------
      .
      .
      .
      [INFO] Building jar: /Users/lars/Documents/workspace/AvE24All/WebServices/AvE24WS/target/AvE24WS-1.2.8.jar
      .
      .
      .
      [INFO] ------------------------------------------------------------------------
      [INFO] Building Unnamed - assense.ave24:Applications:pom:1.2.8
      [INFO] task-segment: [clean, verify]
      [INFO] ------------------------------------------------------------------------
      [INFO] [clean:clean]
      [INFO] Deleting directory /Users/lars/Documents/workspace/AvE24All/Applications/target
      [INFO] Deleting directory /Users/lars/Documents/workspace/AvE24All/Applications/target/classes
      [INFO] Deleting directory /Users/lars/Documents/workspace/AvE24All/Applications/target/test-classes
      [INFO] [site:attach-descriptor]
      [INFO] ------------------------------------------------------------------------
      [INFO] Building Unnamed - assense.ave24:AvE24:woapplication:1.2.8
      [INFO] task-segment: [clean, verify]
      [INFO] ------------------------------------------------------------------------
      [INFO] [clean:clean]
      [INFO] Deleting directory /Users/lars/Documents/workspace/AvE24All/Applications/AvE24/target
      [INFO] Deleting directory /Users/lars/Documents/workspace/AvE24All/Applications/AvE24/target/classes
      [INFO] Deleting directory /Users/lars/Documents/workspace/AvE24All/Applications/AvE24/target/test-classes
      [INFO] [woproject:define-woapplication-resources]
      [INFO] Defining wo resources
      Downloading: http://www.objectstyle.org/maven2/assense/ave24/AvE24WS/1.2.8/AvE24WS-1.2.8.jar
      Downloading: http://dist.codehaus.org//assense/ave24/AvE24WS/1.2.8/AvE24WS-1.2.8.jar
      Downloading: http://stage:1210/maven/remote/repository/assense/ave24/AvE24WS/1.2.8/AvE24WS-1.2.8.jar
      Downloading: http://webobjects.mdimension.com/maven2/releases/assense/ave24/AvE24WS/1.2.8/AvE24WS-1.2.8.jar
      Downloading: http://www.ibiblio.org/maven2/assense/ave24/AvE24WS/1.2.8/AvE24WS-1.2.8.jar
      [INFO] ------------------------------------------------------------------------
      [ERROR] BUILD ERROR
      [INFO] ------------------------------------------------------------------------
      [INFO] Failed to resolve artifact.

      Missing:
      ----------
      1) assense.ave24:AvE24WS:jar:1.2.8

      Try downloading the file manually from the project website.

      Then, install it using the command:
      mvn install:install-file -DgroupId=assense.ave24 -DartifactId=AvE24WS -Dversion=1.2.8 -Dpackaging=jar -Dfile=/path/to/file

      Alternatively, if you host your own repository you can deploy the file there:
      mvn deploy:deploy-file -DgroupId=assense.ave24 -DartifactId=AvE24WS -Dversion=1.2.8 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

      Path to dependency:
      1) assense.ave24:AvE24:woapplication:1.2.8
      2) assense.ave24:AvE24WS:jar:1.2.8

      ----------
      1 required artifact is missing.

      for artifact:
      assense.ave24:AvE24:woapplication:1.2.8

      from the specified remote repositories:
      central (http://repo1.maven.org/maven2),
      assense.repository.snapshot (http://stage:1210/maven/snapshot/repository),
      codehaus (http://dist.codehaus.org/),
      webobjects.mdimension.com/snapshots (http://webobjects.mdimension.com/maven2/snapshots),
      webobjects.mdimension.com/releases (http://webobjects.mdimension.com/maven2/releases),
      org.objectstyle.woproject.maven2 (http://www.objectstyle.org/maven2),
      assense.repository.remote (http://stage:1210/maven/remote/repository)

      [INFO] ------------------------------------------------------------------------
      [INFO] For more information, run Maven with the -e switch
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 18 seconds
      [INFO] Finished at: Wed Mar 05 11:57:14 CET 2008
      [INFO] Final Memory: 10M/28M
      [INFO] ------------------------------------------------------------------------
      [INFO] ------------------------------------------------------------------------
      [ERROR] BUILD ERROR
      [INFO] ------------------------------------------------------------------------
      [INFO] Maven execution failed, exit code: '1'

      [INFO] ------------------------------------------------------------------------
      [INFO] For more information, run Maven with the -e switch
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 28 seconds
      [INFO] Finished at: Wed Mar 05 11:57:14 CET 2008
      [INFO] Final Memory: 6M/11M
      [INFO] ------------------------------------------------------------------------

      As you can see subproject AvE24WS builds just fine and then gets stored to /Users/lars/Documents/workspace/AvE24All/WebServices/AvE24WS/target/AvE24WS-1.2.8.jar but there it won't be found later (because it's not in any repository yet).

      As a workaround we currently issue a 'mvn install' after 'mvn --batch-mode release:prepare' failed and then run the 'mvn --batch-mode release:prepare' again which ten won't fail (because the cross dependency is in our Maven Repository by then). 'mvn --batch-mode release:perform' works like expected later on.

      For a full log of our release see the attached release.out.txt

      Attachments

        1. AvE24All.zip
          84 kB
          Lars Sonchocky-Helldorf
        2. release.out.txt
          266 kB
          Lars Sonchocky-Helldorf

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            olamy Olivier Lamy
            iooi Lars Sonchocky-Helldorf
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment