[
http://jira.codehaus.org/browse/MNG-2979?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Oran Kelly updated MNG-2979:
----------------------------
Attachment: mng-2979-testcase.tar.gz
I have attached a test case that I have confirmed fails with Maven-2.1.0 (and
2.0.10)
$ cd mng-2979/
$ cd ..
$ cd mng-2979/parent
$ rm -fr $HOME/.m2/repository/com/test
$ mvn clean install site
[INFO] Scanning for projects...
[INFO] Reactor build order:
[INFO] Test Parent
[INFO] Module 1
[INFO] Module 2
[INFO] ------------------------------------------------------------------------
[INFO] Building Test Parent
[INFO] task-segment: [clean, install, site]
[INFO] ------------------------------------------------------------------------
[INFO] [clean:clean]
[INFO] [site:attach-descriptor]
[INFO] [install:install]
[INFO] Installing /tmp/mng-2979/parent/target/pom-transformed.xml to
/home/test/.m2/repository/com/test/parent/1.0/parent-1.0.pom
[INFO] Preparing surefire-report:report
[INFO] No goals needed for project - skipping
[INFO] Preparing surefire-report:report-only
[INFO] No goals needed for project - skipping
[INFO] Preparing javadoc:javadoc
[INFO] No goals needed for project - skipping
[INFO] Preparing javadoc:test-aggregate
[INFO] ------------------------------------------------------------------------
[INFO] Building Test Parent
[INFO] ------------------------------------------------------------------------
[INFO] No goals needed for project - skipping
[INFO] ------------------------------------------------------------------------
[INFO] Building Module 1
[INFO] ------------------------------------------------------------------------
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:compile]
[INFO] Compiling 1 source file to /tmp/mng-2979/module1/target/classes
[INFO] ------------------------------------------------------------------------
[INFO] Building Module 2
[INFO] ------------------------------------------------------------------------
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
Downloading: http://repo1.maven.org/maven2/com/test/module1/1.0/module1-1.0.jar
[INFO] Unable to find resource 'com.test:module1:jar:1.0' in repository central
(http://repo1.maven.org/maven2)
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to resolve artifact.
Missing:
----------
1) com.test:module1:jar:1.0
Try downloading the file manually from the project website.
Then, install it using the command:
mvn install:install-file -DgroupId=com.test -DartifactId=module1
-Dversion=1.0 -Dpackaging=jar -Dfile=/path/to/file
Alternatively, if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=com.test -DartifactId=module1
-Dversion=1.0 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url]
-DrepositoryId=[id]
Path to dependency:
1) com.test:module2:jar:1.0
2) com.test:module1:jar:1.0
----------
1 required artifact is missing.
for artifact:
com.test:module2:jar:1.0
from the specified remote repositories:
central (http://repo1.maven.org/maven2)
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 8 seconds
[INFO] Finished at: Thu Apr 30 13:49:42 IST 2009
[INFO] Final Memory: 47M/412M
[INFO] ------------------------------------------------------------------------
> Cross module dependencies for multi-module site
> -----------------------------------------------
>
> Key: MNG-2979
> URL: http://jira.codehaus.org/browse/MNG-2979
> Project: Maven 2
> Issue Type: Improvement
> Components: Artifacts and Repositories
> Affects Versions: 2.0.5
> Environment: Linux 2.6.18-gentoo-r6 #2 SMP PREEMPT Wed Feb 28
> 10:25:50 CET 2007 i686 Pentium III (Coppermine) GenuineIntel GNU/Linux
> Reporter: Wally Wallou
> Assignee: John Casey
> Priority: Minor
> Fix For: 2.2.0
>
> Attachments: build.log, gwttk-m2.zip, mng-2979-testcase.tar.gz,
> package.txt, site.txt, to-package.log
>
>
> Considering a multi-module project A which declares two sub-projects
> (modules) B and C. Having module C indicating in its POM a dependency against
> module B. Compilation and packaging work great without having to install
> module B in maven local repository, it locate module B for module C using
> declared aggregation at top level project A.
> But for site goals it does not work, that is to say when maven try to
> generate site for module C it tells that module B artifact cannot be found.
> So we have to install module B to be able to generate module C site, whereas
> it is not necessary for compile or package goals.
> I think it would be great if site goals behaves like compile and package with
> aggregation. It would be more coherent, and avoid to have to run install just
> for site goals.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira