Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to use doclet for project without any related javadocs. #46

Open
grossws opened this issue Jul 24, 2012 · 12 comments
Open

Ability to use doclet for project without any related javadocs. #46

grossws opened this issue Jul 24, 2012 · 12 comments
Labels
Milestone

Comments

@grossws
Copy link

grossws commented Jul 24, 2012

I use one parent pom with reporting for JAXB, JAX-RS and JPA. It works fine if child project contains all these parts. But if child project doesn't contains any persistence annotations it fails to build all docs (euther JAXB and JAX-RS).

@FroMage
Copy link
Owner

FroMage commented Jul 24, 2012

I don't understand. The JAXB and JAX-RS doclets work without JPA. If you don't invoke the JPA doclet it should just work.

@grossws
Copy link
Author

grossws commented Jul 24, 2012

Of course. But if I put all doclets defs in parent-project to not repeate them in each child, I'll get error.

@FroMage
Copy link
Owner

FroMage commented Jul 24, 2012

So you want the JPA doclet to not fail if there are no JPA entities? Does the javadoc doclet not fail on the absence of things to document? If the JPA doclet has a flag to not fail I'll support it.

@grossws
Copy link
Author

grossws commented Jul 25, 2012

Javadoc doesn't fail if it's nothing to document. If in-class javadoc is corrupted it shows warnings as max (e. g. you have @return derictive without parameter).

So, doclets shouldn't fail if there's nothing to document for them.

@FroMage
Copy link
Owner

FroMage commented Jul 25, 2012

OK, so what precisely is the error then?

@grossws
Copy link
Author

grossws commented Jul 25, 2012

It doesn't throw an exception. So mvn site build docs. But only JPA doclet writes something. Other doclets aren't start either.

[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building projectname-seam Maven Webapp 2.2.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ projectname-seam ---
[INFO] Deleting /home/user/repo/smi/projectname-ee/projectname-seam/target
[INFO] 
[INFO] --- maven-site-plugin:3.0:site (default-site) @ projectname-seam ---
[INFO] configuring report plugin org.apache.maven.plugins:maven-javadoc-plugin:2.7
[INFO] 
[INFO] >>> maven-javadoc-plugin:2.7:javadoc (report:javadoc) @ projectname-seam >>>
[INFO] 
[INFO] <<< maven-javadoc-plugin:2.7:javadoc (report:javadoc) @ projectname-seam <<<
[WARNING] Report plugin org.apache.maven.plugins:maven-project-info-reports-plugin has an empty version.
[WARNING] 
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING] 
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[INFO] configuring report plugin org.apache.maven.plugins:maven-project-info-reports-plugin:2.4
[INFO] Parent project loaded from repository: org.projectname:projectname-parent:pom:0.2-SNAPSHOT
[INFO] Relativizing decoration links with respect to project URL: http://projectname.org/projectname-ee/projectname-seam
[INFO] Rendering site with org.apache.maven.skins:maven-default-skin:jar:1.0 skin.
[INFO] Generating "JavaDocs" report    --- maven-javadoc-plugin:2.7
[INFO] 
Loading source files for package org.projectname.ee.seam.quartz...
Loading source files for package org.projectname.ee.seam.quartz.job...
Loading source files for package org.projectname.ee.seam.beans...
Loading source files for package org.projectname.ee.seam.beans.watchdog...
Loading source files for package org.projectname.ee.seam.beans.actions...
Loading source files for package org.projectname.ee.seam.beans.actions.export.qualifiers...
Loading source files for package org.projectname.ee.seam.beans.actions.export.facets...
Loading source files for package org.projectname.ee.seam.beans.actions.export.facets.impl...
Loading source files for package org.projectname.ee.seam.beans.actions.export.documents.impl...
Loading source files for package org.projectname.ee.seam.beans.actions.export.documents...
Loading source files for package org.projectname.ee.seam.beans.model...
Loading source files for package org.projectname.ee.seam.beans.dao...
Loading source files for package org.projectname.ee.seam.beans.rs...
Loading source files for package org.projectname.ee.seam.beans.markup...
Loading source files for package org.projectname.ee.seam.beans.security...
Loading source files for package org.projectname.ee.seam.beans.servlets...
Loading source files for package org.projectname.ee.seam.beans.configuration...
Loading source files for package org.projectname.ee.seam.beans.configuration.qualifiers...
Loading source files for package org.projectname.ee.seam.timeline...
Loading source files for package org.projectname.ee.seam.utils...
Loading source files for package org.projectname.ee.seam.ontology...
Loading source files for package org.projectname.ee.seam.mail.handler...
Loading source files for package org.projectname.ee.seam.mail...
Loading source files for package org.projectname.ee.seam.mail.extractor...
Constructing Javadoc information...
Generating /home/user/repo/smi/projectname-ee/projectname-seam/target/site/jpadocs/package-list...
Generating /home/user/repo/smi/projectname-ee/projectname-seam/target/site/jpadocs/index.html...
Generating /home/user/repo/smi/projectname-ee/projectname-seam/target/site/jpadocs/graph.html...
Generating /home/user/repo/smi/projectname-ee/projectname-seam/target/site/jpadocs/graph-data.js...
[INFO] Generating "Distribution Management" report    --- maven-project-info-reports-plugin:2.4
[INFO] Generating "About" report    --- maven-project-info-reports-plugin:2.4
[INFO] Generating "Dependencies" report    --- maven-project-info-reports-plugin:2.4
[WARNING] The parameter 'dependencyLocationsEnabled' is ignored in offline mode.
[INFO] Generating "Issue Tracking" report    --- maven-project-info-reports-plugin:2.4
[INFO] Generating "Project Plugins" report    --- maven-project-info-reports-plugin:2.4
[INFO] Generating "Continuous Integration" report    --- maven-project-info-reports-plugin:2.4
[INFO] Generating "Project License" report    --- maven-project-info-reports-plugin:2.4
[INFO] Generating "Dependency Management" report    --- maven-project-info-reports-plugin:2.4
[INFO] Generating "Mailing Lists" report    --- maven-project-info-reports-plugin:2.4
[INFO] Generating "Project Team" report    --- maven-project-info-reports-plugin:2.4
[INFO] Generating "Source Repository" report    --- maven-project-info-reports-plugin:2.4
[INFO] Generating "Plugin Management" report    --- maven-project-info-reports-plugin:2.4
[INFO] Generating "Project Summary" report    --- maven-project-info-reports-plugin:2.4
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 50.051s
[INFO] Finished at: Wed Jul 25 14:23:30 MSK 2012
[INFO] Final Memory: 30M/705M
[INFO] ------------------------------------------------------------------------

@FroMage
Copy link
Owner

FroMage commented Jul 25, 2012

OK forgive me but I don't get what you want. The fact that the JPA doclet writes the docs with nothing documented in there seems fine to me. What do you want to see happen then?

@grossws
Copy link
Author

grossws commented Jul 25, 2012

Then it doesn't write anything else. If I comment out JPA doclet I'll get something like this:

[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building projectname-seam Maven Webapp 2.2.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ projectname-seam ---
[INFO] Deleting /home/user/repo/smi/projectname-ee/projectname-seam/target
[INFO] 
[INFO] --- maven-site-plugin:3.0:site (default-site) @ projectname-seam ---
[INFO] configuring report plugin org.apache.maven.plugins:maven-javadoc-plugin:2.7
[INFO] 
[INFO] >>> maven-javadoc-plugin:2.7:javadoc (report:javadoc) @ projectname-seam >>>
[INFO] 
[INFO] <<< maven-javadoc-plugin:2.7:javadoc (report:javadoc) @ projectname-seam <<<
[WARNING] Report plugin org.apache.maven.plugins:maven-project-info-reports-plugin has an empty version.
[WARNING] 
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING] 
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[INFO] configuring report plugin org.apache.maven.plugins:maven-project-info-reports-plugin:2.4
[INFO] Parent project loaded from repository: org.projectname:projectname-parent:pom:0.2-SNAPSHOT
[INFO] Relativizing decoration links with respect to project URL: http://projectname.org/projectname-ee/projectname-seam
[INFO] Rendering site with org.apache.maven.skins:maven-default-skin:jar:1.0 skin.
[INFO] Generating "JavaDocs" report    --- maven-javadoc-plugin:2.7
[INFO] 
Loading source files for package org.projectname.ee.seam.quartz...
Loading source files for package org.projectname.ee.seam.quartz.job...
Loading source files for package org.projectname.ee.seam.beans...
Loading source files for package org.projectname.ee.seam.beans.watchdog...
Loading source files for package org.projectname.ee.seam.beans.actions...
Loading source files for package org.projectname.ee.seam.beans.actions.export.qualifiers...
Loading source files for package org.projectname.ee.seam.beans.actions.export.facets...
Loading source files for package org.projectname.ee.seam.beans.actions.export.facets.impl...
Loading source files for package org.projectname.ee.seam.beans.actions.export.documents.impl...
Loading source files for package org.projectname.ee.seam.beans.actions.export.documents...
Loading source files for package org.projectname.ee.seam.beans.model...
Loading source files for package org.projectname.ee.seam.beans.dao...
Loading source files for package org.projectname.ee.seam.beans.rs...
Loading source files for package org.projectname.ee.seam.beans.markup...
Loading source files for package org.projectname.ee.seam.beans.security...
Loading source files for package org.projectname.ee.seam.beans.servlets...
Loading source files for package org.projectname.ee.seam.beans.configuration...
Loading source files for package org.projectname.ee.seam.beans.configuration.qualifiers...
Loading source files for package org.projectname.ee.seam.timeline...
Loading source files for package org.projectname.ee.seam.utils...
Loading source files for package org.projectname.ee.seam.ontology...
Loading source files for package org.projectname.ee.seam.mail.handler...
Loading source files for package org.projectname.ee.seam.mail...
Loading source files for package org.projectname.ee.seam.mail.extractor...
Constructing Javadoc information...
Generating /home/user/repo/smi/projectname-ee/projectname-seam/target/site/jaxrsdocs/index.html...
Generating /home/user/repo/smi/projectname-ee/projectname-seam/target/site/jaxrsdocs/document/index.html...
Generating /home/user/repo/smi/projectname-ee/projectname-seam/target/site/jaxrsdocs/document/{id}.raw/index.html...
Generating /home/user/repo/smi/projectname-ee/projectname-seam/target/site/jaxrsdocs/document/{id}.view/index.html...
14 warnings
[INFO] Generating "Distribution Management" report    --- maven-project-info-reports-plugin:2.4
[INFO] Generating "About" report    --- maven-project-info-reports-plugin:2.4
[INFO] Generating "Dependencies" report    --- maven-project-info-reports-plugin:2.4
[WARNING] The parameter 'dependencyLocationsEnabled' is ignored in offline mode.
[INFO] Generating "Issue Tracking" report    --- maven-project-info-reports-plugin:2.4
[INFO] Generating "Project Plugins" report    --- maven-project-info-reports-plugin:2.4
[INFO] Generating "Continuous Integration" report    --- maven-project-info-reports-plugin:2.4
[INFO] Generating "Project License" report    --- maven-project-info-reports-plugin:2.4
[INFO] Generating "Dependency Management" report    --- maven-project-info-reports-plugin:2.4
[INFO] Generating "Mailing Lists" report    --- maven-project-info-reports-plugin:2.4
[INFO] Generating "Project Team" report    --- maven-project-info-reports-plugin:2.4
[INFO] Generating "Source Repository" report    --- maven-project-info-reports-plugin:2.4
[INFO] Generating "Plugin Management" report    --- maven-project-info-reports-plugin:2.4
[INFO] Generating "Project Summary" report    --- maven-project-info-reports-plugin:2.4
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 37.027s
[INFO] Finished at: Wed Jul 25 15:19:25 MSK 2012
[INFO] Final Memory: 30M/705M
[INFO] ------------------------------------------------------------------------

So then JPA doclet is commented other doclets work fine, else other doclets (JAXB and JAX-RS) generate nothing.

@FroMage
Copy link
Owner

FroMage commented Jul 25, 2012

I'm even more lost here. So the JPA doclet works correctly, but Maven for some reason stops running the other doclets silently without even telling us why? Sounds like a Maven issue to me. I mean, I don't even know what the JPA doclet is doing wrong in the eyes of Maven to trigger this behaviour.

@grossws
Copy link
Author

grossws commented Jul 25, 2012

Ok, I'll try to review maven-javadoc-plugin and find out who stops other doclets from running, but when I had persistence.xml in project all worked fine.

And when doclet throws RuntimeException maven build fails, as I saw with real errors in doclet code.

@FroMage
Copy link
Owner

FroMage commented Jul 25, 2012

The JPA doclet doesn't read persistence.xml at all.

And when doclet throws RuntimeException maven build fails, as I saw with real errors in doclet code.

Those you should report and we'll fix.

@grossws
Copy link
Author

grossws commented Jul 25, 2012

Those you should report and we'll fix.

Oh, that was my error, I'm writting & testing code fo #47.

@wikier wikier modified the milestones: 0.10.2, 0.10.1 Jul 11, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants