FroMage/jax-doclets — Issue #25: Path regexp support: unable to create directory
Author: ilyavolk
Created: 2012-01-18 13:04:57+00:00
State: open

Duplicate with **Issue 26** from code.google.com tracker.

When I use resource with a Path with regexp like .+,.+, doclet cannot create directory.
It seems doclet removes several regexp expressions from path, but not all of them.

**What steps will reproduce the problem?**
1.Create a resource with a Path annotation with a regex. Example:
@Path("contact/{contactIds : .+,.+}")
2. Run the jax doclet against the project.
3. You will get a stack trace about not being able to create the directory from the doclet. See below.

**What version of the product are you using? **
0.8.0
0.9.0
0.10.0

**On what operating system? **
Windows 7

**Call stack:**
Embedded error: Error rendering Maven report:
Exit code: 1 - javadoc: error - Unable to create directory D:/target/site/jaxrsdocs\v1.0\account\{accountId}\address-book\contact\{contactIds : .+,.+}
javadoc: error - In doclet class com.lunatech.doclets.jax.jaxrs.JAXRSDoclet, method start has thrown an exception java.lang.reflect.InvocationTargetException
com.sun.tools.doclets.internal.toolkit.util.DocletAbortException
at com.sun.tools.doclets.internal.toolkit.util.DirectoryManager.createDirectory(DirectoryManager.java:263)
at com.sun.tools.doclets.internal.toolkit.util.Util.genWriter(Util.java:576)
at com.sun.tools.doclets.formats.html.markup.HtmlWriter.(HtmlWriter.java:61)
at com.sun.tools.doclets.formats.html.markup.HtmlDocWriter.(HtmlDocWriter.java:47)
at com.sun.tools.doclets.formats.html.HtmlDocletWriter.(HtmlDocletWriter.java:95)
at com.lunatech.doclets.jax.jaxrs.writers.ResourceWriter.getWriter(ResourceWriter.java:43)
at com.lunatech.doclets.jax.jaxrs.writers.ResourceWriter.(ResourceWriter.java:37)
at com.lunatech.doclets.jax.jaxrs.model.Resource.write(Resource.java:165)
at com.lunatech.doclets.jax.jaxrs.model.Resource.write(Resource.java:169)
at com.lunatech.doclets.jax.jaxrs.model.Resource.write(Resource.java:169)
at com.lunatech.doclets.jax.jaxrs.model.Resource.write(Resource.java:169)
at com.lunatech.doclets.jax.jaxrs.model.Resource.write(Resource.java:169)
at com.lunatech.doclets.jax.jaxrs.model.Resource.write(Resource.java:169)
at com.lunatech.doclets.jax.jaxrs.model.Resource.write(Resource.java:169)
at com.lunatech.doclets.jax.jaxrs.JAXRSDoclet.start(JAXRSDoclet.java:106)
at com.lunatech.doclets.jax.jaxrs.JAXRSDoclet.start(JAXRSDoclet.java:78)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.tools.javadoc.DocletInvoker.invoke(DocletInvoker.java:269)
at com.sun.tools.javadoc.DocletInvoker.start(DocletInvoker.java:143)
at com.sun.tools.javadoc.Start.parseAndExecute(Start.java:340)
at com.sun.tools.javadoc.Start.begin(Start.java:128)
at com.sun.tools.javadoc.Main.execute(Main.java:41)
at com.sun.tools.javadoc.Main.main(Main.java:31)