One of parameters supported by javadoc is -d that allows to specify the destination directory. If directory does not exist it is created automatically by javadoc. If specified destination is not a directory the following error is printed:
javadoc: error - Destination directory is not a directory
Unfortunately ServiceDoclet breaks this functionality: if destination directory does not exist doclet throws the following exception:
javadoc: error - In doclet class com.carma.swagger.doclet.ServiceDoclet, method start has thrown an exception java.lang.reflect.InvocationTargetException
java.lang.IllegalArgumentException: Path after -d is expected to be a directory!
at com.google.common.base.Preconditions.checkArgument(Preconditions.java:92)
at com.carma.swagger.doclet.DocletOptions.parse(DocletOptions.java:74)
at com.carma.swagger.doclet.ServiceDoclet.start(ServiceDoclet.java:20)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.sun.tools.javadoc.DocletInvoker.invoke(DocletInvoker.java:280)
at com.sun.tools.javadoc.DocletInvoker.start(DocletInvoker.java:160)
at com.sun.tools.javadoc.Start.parseAndExecute(Start.java:397)
at com.sun.tools.javadoc.Start.begin(Start.java:167)
at com.sun.tools.javadoc.Main.execute(Main.java:59)
at com.sun.tools.javadoc.Main.main(Main.java:49)
One of parameters supported by
javadoc
is-d
that allows to specify the destination directory. If directory does not exist it is created automatically byjavadoc
. If specified destination is not a directory the following error is printed:Unfortunately
ServiceDoclet
breaks this functionality: if destination directory does not exist doclet throws the following exception: