FroMage / jax-doclets

Set of JavaDoc doclets for modern Java annotations APIs
http://www.lunatech-labs.com/open-source/jax-doclets
GNU Lesser General Public License v3.0
26 stars 23 forks source link

java.lang.RuntimeException: java.io.FileNotFoundException #58

Closed sporkins closed 11 years ago

sporkins commented 11 years ago

If I have a resource named 'options':

@Path("/options") @Produces(MediaType.APPLICATION_JSON) public class OptionResource

I get the following failure when running mvn site:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.2:site (default-site) on project Blah-webapp: Error during page generation: Error rendering Maven report: [ERROR] Exit code: 1 - javadoc: error - In doclet class com.lunatech.doclets.jax.jaxrs.JAXRSDoclet, method start has thrown an exception java.lang.reflect.InvocationTargetException [ERROR] java.lang.RuntimeException: java.io.FileNotFoundException: /home/blah/workspace/Blah/Blah-webapp/target/site/apidocs/options/index.html (Not a directory) [ERROR] at com.lunatech.doclets.jax.jaxrs.writers.ResourceWriter.getWriter(ResourceWriter.java:45) [ERROR] at com.lunatech.doclets.jax.jaxrs.writers.ResourceWriter.(ResourceWriter.java:37) [ERROR] at com.lunatech.doclets.jax.jaxrs.model.Resource.write(Resource.java:165) [ERROR] at com.lunatech.doclets.jax.jaxrs.model.Resource.write(Resource.java:169) [ERROR] at com.lunatech.doclets.jax.jaxrs.JAXRSDoclet.start(JAXRSDoclet.java:106) [ERROR] at com.lunatech.doclets.jax.jaxrs.JAXRSDoclet.start(JAXRSDoclet.java:78) [ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [ERROR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [ERROR] at java.lang.reflect.Method.invoke(Method.java:601) [ERROR] at com.sun.tools.javadoc.DocletInvoker.invoke(DocletInvoker.java:280) [ERROR] at com.sun.tools.javadoc.DocletInvoker.start(DocletInvoker.java:160) [ERROR] at com.sun.tools.javadoc.Start.parseAndExecute(Start.java:397) [ERROR] at com.sun.tools.javadoc.Start.begin(Start.java:167) [ERROR] at com.sun.tools.javadoc.Main.execute(Main.java:59) [ERROR] at com.sun.tools.javadoc.Main.main(Main.java:49) [ERROR] Caused by: java.io.FileNotFoundException: /home/blah/workspace/Blah/Blah-webapp/target/site/apidocs/options/index.html (Not a directory) [ERROR] at java.io.FileOutputStream.open(Native Method) [ERROR] at java.io.FileOutputStream.(FileOutputStream.java:212) [ERROR] at java.io.FileOutputStream.(FileOutputStream.java:104) [ERROR] at com.sun.tools.doclets.internal.toolkit.util.Util.genWriter(Util.java:646) [ERROR] at com.sun.tools.doclets.formats.html.markup.HtmlWriter.(HtmlWriter.java:169) [ERROR] at com.sun.tools.doclets.formats.html.markup.HtmlDocWriter.(HtmlDocWriter.java:65) [ERROR] at com.sun.tools.doclets.formats.html.HtmlDocletWriter.(HtmlDocletWriter.java:118) [ERROR] at com.lunatech.doclets.jax.jaxrs.writers.ResourceWriter.getWriter(ResourceWriter.java:43) [ERROR] ... 15 more

If I change the URI of the resource it works. The maven-javadoc-plugin is generating an options file that it uses when calling javadoc (javadoc @options) and this is conflicting with the options folder the jax-doclets tries to create.

sporkins commented 11 years ago

This is actually an issue with the maven-javadoc-plugin, they need to make that options file name configurable.