Details
-
Type:
Bug
-
Status:
Reopened
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 2.2
-
Fix Version/s: None
-
Labels:None
-
Testcase included:yes
Description
In a multi-module projet, I build an aggregated Javadoc for the site.
The project is built with "mvn clean deploy site-deploy"
When I add a new project, the next build always fails because the javadoc plugin can't find at least one snapshot for the new added module
In the following example, I added a new module tele.persistance:pers-commons, which have never been built before.
Maven tries to download it but it can't find it (never build before).
[INFO] [site:site]
[WARNING] Unable to load parent project from repository: Could not find the model file '/continuum-folders/working-directory/116/../pom.xml'.
[INFO] Skipped "About" report, file "index.html" already exists for the English version.
[ERROR] VM #displayTree: error : too few arguments to macro. Wanted 2 got 0
[ERROR] VM #menuItem: error : too few arguments to macro. Wanted 1 got 0
[INFO] Generate "JavaDocs" report.
[INFO] snapshot tele:commons:1.2.0-alpha-1-SNAPSHOT: checking for updates from mirror.snapshots
[INFO] snapshot tele.persistance:pers-data:1.2.0-alpha-1-SNAPSHOT: checking for updates from mirror.snapshots
[INFO] snapshot tele.persistance:pers-api:1.2.0-alpha-1-SNAPSHOT: checking for updates from mirror.snapshots
[INFO] snapshot tele.persistance:pers-commons:1.2.0-alpha-1-SNAPSHOT: checking for updates from mirror.snapshots
Downloading: http://proxy/maven2-snapshots/repository/tele/persistance/pers-commons/1.2.0-alpha-1-SNAPSHOT/pers-commons-1.2.0-alpha-1-SNAPSHOT.jar
[WARNING] Unable to get resource 'tele.persistance:pers-commons:jar:1.2.0-alpha-1-SNAPSHOT' from repository mirror.snapshots (http://proxy/maven2-snapshots/repository)
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to resolve artifact.
Missing:
----------
1) tele.persistance:pers-commons:jar:1.2.0-alpha-1-SNAPSHOT
Try downloading the file manually from the project website.
Then, install it using the command:
mvn install:install-file -DgroupId=tele.persistance -DartifactId=pers-commons \
-Dversion=1.2.0-alpha-1-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file
Path to dependency:
1) tele.persistance:pers-dao:jar:1.2.0-alpha-1-SNAPSHOT
2) tele.persistance:pers-commons:jar:1.2.0-alpha-1-SNAPSHOT
----------
1 required artifact is missing.
for artifact:
tele.persistance:pers-dao:jar:1.2.0-alpha-1-SNAPSHOT
from the specified remote repositories:
central (http://repo1.maven.org/maven2),
mirror.snapshots (http://proxy/maven2-snapshots/repository)
If I make an intermediate "install", everything works fine
-
Hide
- clean javadoc-plugin-test-case with classifier use.zip
- 06/Mar/08 3:25 AM
- 5 kB
- Damien Lecan
-
- javadoc-plugin-test-case/module1/pom.xml 0.9 kB
- javadoc-plugin-test-case/.../TestModule1.java 0.2 kB
- javadoc-plugin-test-case/.../TestModule1.java 0.2 kB
- javadoc-plugin-test-case/module2/pom.xml 1.0 kB
- javadoc-plugin-test-case/.../TestModule2.java 0.2 kB
- javadoc-plugin-test-case/pom.xml 2 kB
-
Hide
- javadoc-plugin-test-case.zip
- 23/Jul/07 1:10 PM
- 6 kB
- Antonio Petrelli
-
- javadoc-plugin-test-case/.../org.eclipse.jdt.core.prefs 0.2 kB
- javadoc-plugin-test-case/.classpath 0.4 kB
- javadoc-plugin-test-case/.../TestModule1.java 0.2 kB
- javadoc-plugin-test-case/module1/pom.xml 0.6 kB
- javadoc-plugin-test-case/.../TestModule2.java 0.2 kB
- javadoc-plugin-test-case/module2/pom.xml 0.8 kB
- javadoc-plugin-test-case/.project 0.5 kB
- javadoc-plugin-test-case/pom.xml 0.9 kB
-
Hide
- javadoc-plugin-test-case with classifier use.zip
- 06/Mar/08 3:23 AM
- 158 kB
- Damien Lecan
-
- javadoc-plugin-test-case/module1/pom.xml 0.9 kB
- javadoc-plugin-test-case/.../TestModule1.java 0.2 kB
- javadoc-plugin-test-case/.../TestModule1.java 0.2 kB
- javadoc-plugin-test-case/.../TestModule1.class 0.5 kB
- javadoc-plugin-test-case/.../allclasses-frame.html 0.8 kB
- javadoc-plugin-test-case/.../allclasses-noframe.html 0.8 kB
- javadoc-plugin-test-case/.../constant-values.html 5 kB
- javadoc-plugin-test-case/.../deprecated-list.html 5 kB
- javadoc-plugin-test-case/.../help-doc.html 9 kB
- javadoc-plugin-test-case/.../index-all.html 6 kB
- javadoc-plugin-test-case/.../index.html 1 kB
- javadoc-plugin-test-case/.../overview-tree.html 5 kB
- javadoc-plugin-test-case/.../package-list 0.0 kB
- javadoc-plugin-test-case/.../inherit.gif 0.1 kB
- javadoc-plugin-test-case/.../stylesheet.css 1 kB
- javadoc-plugin-test-case/.../TestModule1.html 5 kB
- javadoc-plugin-test-case/.../package-frame.html 0.9 kB
- javadoc-plugin-test-case/.../package-summary.html 6 kB
- javadoc-plugin-test-case/.../package-tree.html 5 kB
- javadoc-plugin-test-case/.../package-use.html 5 kB
- javadoc-plugin-test-case/.../TestModule1.html 9 kB
- javadoc-plugin-test-case/.../maven-base.css 2 kB
- javadoc-plugin-test-case/.../maven-theme.css 3 kB
- javadoc-plugin-test-case/.../print.css 0.2 kB
- javadoc-plugin-test-case/.../dependencies.html 5 kB
- javadoc-plugin-test-case/.../dependency-convergence.html 6 kB
- javadoc-plugin-test-case/.../collapsed.gif 0.1 kB
- javadoc-plugin-test-case/.../expanded.gif 0.1 kB
- javadoc-plugin-test-case/.../external.png 0.2 kB
- javadoc-plugin-test-case/.../icon_error_sml.gif 1.0 kB
-
- log.txt
- 06/Feb/08 9:39 AM
- 404 kB
- Damien Lecan
-
Hide
- mymobiliartest.zip
- 15/Mar/12 3:43 PM
- 48 kB
- Patrick M.J. Roth
-
- mymobiliartest/fails_with_javadoc.bat 0.0 kB
- mymobiliartest/.../pom.xml 2 kB
- mymobiliartest/.../JaxbHelper.java 0.5 kB
- mymobiliartest/.../LiferayHelper.java 0.4 kB
- mymobiliartest/.../LayoutBuilder.java 2 kB
- mymobiliartest/.../LayoutUtil.java 2 kB
- mymobiliartest/.../PermissionUtil.java 1 kB
- mymobiliartest/.../SetupAction.java 0.4 kB
- mymobiliartest/.../Language-ext_de.properties 0.7 kB
- mymobiliartest/.../Language-ext_fr.properties 0.7 kB
- mymobiliartest/.../Language-ext_it.properties 0.7 kB
- mymobiliartest/.../portal-ext.properties 0.2 kB
- mymobiliartest/.../setup.xml 4 kB
- mymobiliartest/.../setupLocal.xml 5 kB
- mymobiliartest/.../setup_definition.xsd 5 kB
- mymobiliartest/.../liferay-hook.xml 0.5 kB
- mymobiliartest/.../service.xml 0.2 kB
- mymobiliartest/.../web.xml 0.4 kB
- mymobiliartest/.../pom.xml 2 kB
- mymobiliartest/.../Dummy.java 0.1 kB
- mymobiliartest/.../config.xml 0.8 kB
- mymobiliartest/.../MANIFEST.MF 0.0 kB
- mymobiliartest/.../translations.xls 63 kB
- mymobiliartest/pom.xml 7 kB
- mymobiliartest/verify.log 60 kB
- mymobiliartest/works_without_javadoc.bat 0.0 kB
-
- tiles-log.txt
- 06/Mar/08 12:47 PM
- 15 kB
- Antonio Petrelli
Issue Links
- depends upon
-
MNG-3283
Plugins that require dependency resolution in early phases cause dependency resolution issue
-
- is duplicated by
-
MJAVADOC-260
Javadoc report not generated for multi-module project if run from parent level - error resolving dependencies
-
-
MJAVADOC-264
mvn clean install site doesn't work
-
- is related to
-
MJAVADOC-276
Initial builds of a multi-module project fail
-
-
MJAVADOC-111
Can't release when I use javadoc aggregate/groups
-
-
MNG-3023
Reactor projects should be included in dependency resolution
-
- relates to
-
MJAVADOC-119
Aggregate does not work for multiple module project when doing install.
-
-
MNG-3685
Dependency can't be resolved but has been found in the reactor.
-
Activity
I face the same problem. It seems to be a regression, as the problem does not occur with maven-javadoc-plugin 2.0.
Same thing with releases version of artifacts.
This is a major issue in a multi-module project when you want to release the project and the aggregated javadoc.
As the maven-release-plugin does "deploy site-deploy" when release:perform, this step always fails because of this bug.
Attached a small test case.
I noticed that the bug is triggered if a module depends on another, even if in correct order.
This bug is still present in the 2.3 version of the plugin.
Fixed in r617996.
Snapshot deployed but you need to have maven 2.0.8 to run it.
I tried with Maven 2.0.8 and maven-javadoc-plugin-2.4-20080203.152011-3
[INFO] Generate "JavaDocs" report. [INFO] snapshot tele.persistance:pers-commons:jar:1.3.0-M1-SNAPSHOT: checking for updates from apache.snapshots Downloading: http://people.apache.org/maven-snapshot-repository/tele/persistance/pers-commons/1.3.0-M1-SNAPSHOT/pers-commons-1.3.0-M1-SNAPSHOT.jar [WARNING] The dependency: [tele.persistance:pers-commons:jar:1.3.0-M1-SNAPSHOT} can't be resolved but has been found in the reactor (probably snapshots). This dependency has been excluded from the Javadoc classpath. You should rerun javadoc after executing mvn install. [WARNING] IGNORED to add some artifacts in the classpath. See above. ... [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Error during page generation Embedded error: Error rendering Maven report: Missing: ---------- 1) tele.persistance:pers-test:jar:tests:1.3.0-M1-SNAPSHOT Try downloading the file manually from the project website. Then, install it using the command: mvn install:install-file -DgroupId=tele.persistance -DartifactId=pers-test -Dversion=1.3.0-M1-SNAPSHOT -Dclassifier=tests -Dpackaging=jar -Dfile=/path/to/file ...
I don't know if javadoc is correctly generated when I see all those WARNING messages.
Then build fails because of a dependency with "tests" classifier.
2 questions :
- when a jar file located in reactor is excluded from javadoc, are corresponding project's classes still included in javadoc ? (aggregate = true)
- are classifiers handled by reactor jar exclusion ?
[INFO] Generate "JavaDocs" report. [INFO] snapshot tele.persistance:pers-commons:jar:1.3.0-M1-SNAPSHOT: checking for updates from apache.snapshots Downloading: http://people.apache.org/maven-snapshot-repository/tele/persistance/pers-commons/1.3.0-M1-SNAPSHOT/pers-commons-1.3.0-M1-SNAPSHOT.jar [WARNING] The dependency: [tele.persistance:pers-commons:jar:1.3.0-M1-SNAPSHOT} can't be resolved but has been found in the reactor (probably snapshots). This dependency has been excluded from the Javadoc classpath. You should rerun javadoc after executing mvn install. [WARNING] IGNORED to add some artifacts in the classpath. See above. ... [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Error during page generation Embedded error: Error rendering Maven report: Missing: ---------- 1) tele.persistance:pers-test:jar:tests:1.3.0-M1-SNAPSHOT Try downloading the file manually from the project website. Then, install it using the command: mvn install:install-file -DgroupId=tele.persistance -DartifactId=pers-test -Dversion=1.3.0-M1-SNAPSHOT -Dclassifier=tests -Dpackaging=jar -Dfile=/path/to/file ...
- when a jar file located in reactor is excluded from javadoc, are corresponding project's classes still included in javadoc ? (aggregate = true)
- are classifiers handled by reactor jar exclusion ?
Reopen since checkMissingArtifactsInReactor() doesnt take care of classifier.
Damien, did you call mvn site or mvn javadoc:javadoc?
Could you send us a log with -X?
> did you call mvn site or mvn javadoc:javadoc?
mvn -DreleaseProfile=true clean deploy site-deploy
So both site and javadoc:javadoc together.
Log file is coming...
Log file for mvn -X -DreleaseProfile=true clean deploy site-deploy in attachement.
Good luck
"mvn -DreleaseProfile=true clean deploy site-deploy" works for me with the latest maven-javadoc-plugin snapshot and the attached example.
(Well, after adding <distributionManagement> – for future examples, you can use something like file:///tmp/repo-MJAVADOC-116 as the deployment repo url, and likewise for the site deployment url.)
I'm not sure of the timing, but this may have been fixed by along with MJAVADOC-137 by reverting the change from MJAVADOC-104 that added @aggregator.
Damien, it seems that it is due to @requiresDependencyResolution, not the Javadoc plugin.
Could you confirm that the error comes from DefaultPluginManager ?
As mentioned, I can't reproduce this with the attached example.
I'd like to stage the 2.4 release on Friday.
In order for this to be included, I need a sample project and steps to reproduce the problem. Otherwise it will either be bumped to 2.5 or closed as Cannot Reproduce. Thanks!
Wendy, can you wait one day? I tried some days ago with Tiles and it didn't work.
Here is a test case which reproduces problem with classifiers and aggregated javadoc.
It is based on previous patch with following updates :
- javadoc version 2.4-SNAPSHOT
- build module 1 test jar ("test-jar" classifier)
- module 2 depends on module 1 jar AND test-jar. They have to be declared together.
Try "mvn -DreleaseProfile=true clean deploy site-deploy", it will fail (maven 2.0.8)
Things to notice :
- with aggregate = false, it works
- in module 2, with exactly one of the 2 dependencies (jar OR test-jar), it works (??)
Is it enough to reproduce bug ?
- javadoc version 2.4-SNAPSHOT
- build module 1 test jar ("test-jar" classifier)
- module 2 depends on module 1 jar AND test-jar. They have to be declared together.
- with aggregate = false, it works
- in module 2, with exactly one of the 2 dependencies (jar OR test-jar), it works (??)
Creating Javadocs with:
mvn javadoc:javadoc
does not work with Tiles:
http://svn.apache.org/repos/asf/tiles/framework/trunk/
Added tiles-log.txt as attachment.
Wendy, this fix is waited for a long time by many people and is really a major issue.
Is it really not possible to work on this for 2.4 ?
This is a real thorn in our sides. Seems like we may have to disable this plugin.
MJAVADOC-197 is the only workaround that we could propose at this time.
Closed as fixed?
This bug is not fixed, there is only a workaround!
And anyway, we need to publish aggregated javadoc in Tiles when releasing it through the release plugin.
Our workaround is installing the tagged version (tagged using release:prepare) before running release:perform.
So please reopen this bug, or close it as "won't fix", "fixed" is misleading.
This problem still persist with version 2.5. I tried both aggregate configurations and even defined javadoc only at module level but still it tries to download dependent snapshot modules which are not built yet.
I think that the workaround in MJAVADOC-197 refers to the failOnError flag:
http://maven.apache.org/plugins/maven-javadoc-plugin/javadoc-mojo.html#failOnError
It is still failing the build if javadoc is run in aggregate mode. I set the <failOnError>false</failOnError> but it still fails.
Tested on Tiles 2.2.0 snapshot (never published).
Upgrading to Javadoc plugin 2.6 and using the "aggregate" goal, it seems to work even if the snapshot was never built.
We have the same behaviour, as soon as the aggregate goal is called. In our case, this arrives in the default lifecycle, since we attached the javadoc plugin to the verify phase through a profile. When the profile is activated, the build fails. Furthermore, failOnError , as decribed in http://jira.codehaus.org/browse/MJAVADOC-197, has no effect here.
We use maven 3.0.4 and javadoc plugin 2.8.1.
I attach a project which should allow to reproduce the problem.
The problem should be reproducible with the project in mymobiliartest.zip
The same problem appears during the use of the release plugin: the release fails and I have to install the checked-out code locally before retrying the release.