Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 2.3
-
Fix Version/s: 2.4
-
Labels:None
Description
Hi,
To build my project, I use:
mvn clean install -DperformRelease=true
In a multimodule project, it doesn't work if all dependencies are not already in the local repository.
Step to reproduce:
1) create a multimodule project with moduleA and moduleB. moduleA depends on moduleB.
2) Hit mvn clean install: should work
3) Clean your local repository (remove moduleA and moduleB)
4) Hit mvn clean install -DperformRelease=true:
[INFO] Scanning for projects...
[INFO] Reactor build order:
[INFO] Unnamed - com.capgemini:unTest:pom:1.0-SNAPSHOT
[INFO] Unnamed - com.capgemini:moduleB:jar:1.0-SNAPSHOT
[INFO] Unnamed - com.capgemini:moduleA:jar:1.0-SNAPSHOT
[INFO] ----------------------------------------------------------------------------
[INFO] Building Unnamed - com.capgemini:unTest:pom:1.0-SNAPSHOT
[INFO] task-segment: [clean, install]
[INFO] ----------------------------------------------------------------------------
[INFO] [clean:clean]
[INFO] Deleting directory D:\test\unTest\target
[INFO] Deleting directory D:\test\unTest\target\classes
[INFO] Deleting directory D:\test\unTest\target\test-classes
[INFO] Deleting directory D:\test\unTest\target\site
[INFO] [site:attach-descriptor]
[INFO] Preparing source:jar
[WARNING] Removing: jar from forked lifecycle, to prevent recursive invocation.
[INFO] No goals needed for project - skipping
[INFO] [source:jarUnknown macro: {execution}]
[INFO] Preparing javadoc:jar
[INFO] ----------------------------------------------------------------------------
[INFO] Building Unnamed - com.capgemini:unTest:pom:1.0-SNAPSHOT
[INFO] ----------------------------------------------------------------------------
[WARNING] Removing: jar from forked lifecycle, to prevent recursive invocation.
[WARNING] Removing: jar from forked lifecycle, to prevent recursive invocation.
[INFO] No goals needed for project - skipping
[INFO] ----------------------------------------------------------------------------
[INFO] Building Unnamed - com.capgemini:moduleB:jar:1.0-SNAPSHOT
[INFO] ----------------------------------------------------------------------------
[WARNING] Removing: jar from forked lifecycle, to prevent recursive invocation.
[WARNING] Removing: jar from forked lifecycle, to prevent recursive invocation.
[INFO] No goals needed for project - skipping
[INFO] ----------------------------------------------------------------------------
[INFO] Building Unnamed - com.capgemini:moduleA:jar:1.0-SNAPSHOT
[INFO] ----------------------------------------------------------------------------
[WARNING] Removing: jar from forked lifecycle, to prevent recursive invocation.
[WARNING] Removing: jar from forked lifecycle, to prevent recursive invocation.
[INFO] No goals needed for project - skipping
[INFO] snapshot com.capgemini:moduleB:1.0-SNAPSHOT: checking for updates from illiade-maven-repository-snapshots
Downloading: http://illiade.sud.capgemini.fr/maven2-snapshots/com/capgemini/moduleB/1.0-SNAPSHOT/moduleB-1.0-SNAPSHOT.jar
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to resolve artifact.Missing:
----------
1) com.capgemini:moduleB:jar:1.0-SNAPSHOTTry downloading the file manually from the project website.
Then, install it using the command:
mvn install:install-file -DgroupId=com.capgemini -DartifactId=moduleB \
-Dversion=1.0-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/filePath to dependency:
1) com.capgemini:moduleA:jar:1.0-SNAPSHOT
2) com.capgemini:moduleB:jar:1.0-SNAPSHOT----------
1 required artifact is missing.for artifact:
com.capgemini:moduleA:jar:1.0-SNAPSHOTfrom the specified remote repositories:
central (http://repo1.maven.org/maven2),
illiade-maven-repository-snapshots (http://illiade.sud.capgemini.fr/maven2-snapshots)[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2 seconds
[INFO] Finished at: Fri Aug 31 12:08:24 CEST 2007
[INFO] Final Memory: 6M/254M
[INFO] ------------------------------------------------------------------------
Issue Links
- is related to
-
MJAVADOC-137
javadoc:javadoc always runs as "aggregator"
-
I have the same problem by doing a release with the command
mvn release:perform
As a workaround I use:
mvn deploy site site:deploy --no-plugin-updates -DupdateReleaseInfo=true
This does not add the source and javadoc jars to the build, as -DperformRelease=true does, but I do not need them
Like this my build works.