Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#29 Don't try to generate if impossible

open
nobody
None
5
2002-01-23
2002-01-23
Andy Stevens
No

An additional refinement to go with the timestamp
checking etc. when testing if generation is required -
if a file needs regenerating, but is read-only, it
would be nice if xdoclet would just print a warning
and skip its generation rather than producing an
exception and causing the build to fail:

[ejbdoclet] Running <homeInterface/>
[ejbdoclet] Generating Home interface
for 'com.foobar.business.logs.impl.BatchTypeEJB'.
[ejbdoclet] javadoc: In doclet class
xdoclet.DocletTask$DocletMain, method start has
thrown an exception
java.lang.reflect.InvocationTargetException
[ejbdoclet] (TemplateEngine.start 393 )
An error occured while writing output to file
W:\Source\java\com\foobar\business\logs\BatchTypeHome.j
ava
[ejbdoclet] java.io.FileNotFoundException:
W:\Source\java\com\foobar\business\logs\BatchTypeHome.j
ava (Access is denied)
[ejbdoclet] at java.io.FileOutputStream.open
(Native Method)
[ejbdoclet] at java.io.FileOutputStream.<init>
(FileOutputStream.java:102)
[ejbdoclet] at java.io.FileOutputStream.<init>
(FileOutputStream.java:62)
[ejbdoclet] at java.io.FileOutputStream.<init>
(FileOutputStream.java:132)
[ejbdoclet] at java.io.FileWriter.<init>
(FileWriter.java:63)
[ejbdoclet] at
xdoclet.template.TemplateEngine.start
(TemplateEngine.java:382)
[ejbdoclet] at xdoclet.TemplateSubTask.startEngine
(TemplateSubTask.java:457)
[ejbdoclet] at
xdoclet.TemplateSubTask.generateForClass
(TemplateSubTask.java:388)
[ejbdoclet] at xdoclet.TemplateSubTask.startProcess
(TemplateSubTask.java:278)
[ejbdoclet] at xdoclet.TemplateSubTask.execute
(TemplateSubTask.java:216)
[ejbdoclet] at xdoclet.DocletTask$DocletMain.start
(DocletTask.java:415)
[ejbdoclet] at java.lang.reflect.Method.invoke
(Native Method)
[ejbdoclet] at
com.sun.tools.javadoc.DocletInvoker.invoke
(DocletInvoker.java:193)
[ejbdoclet] at
com.sun.tools.javadoc.DocletInvoker.start
(DocletInvoker.java:95)
[ejbdoclet] at com.sun.tools.javadoc.Main.main
(Main.java:233)
[ejbdoclet] generateForClass()
[ejbdoclet] Running XDoclet failed:
[ejbdoclet] <<Running XDoclet failed.>>

Discussion