[Issue 3656] New - JavadocArchiver plugin should not throw exception when build fails

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[Issue 3656] New - JavadocArchiver plugin should not throw exception when build fails

jleeman
https://hudson.dev.java.net/issues/show_bug.cgi?id=3656
                 Issue #|3656
                 Summary|JavadocArchiver plugin should not throw exception when
                        | build fails
               Component|hudson
                 Version|current
                Platform|PC
              OS/Version|Windows XP
                     URL|
                  Status|NEW
       Status whiteboard|
                Keywords|
              Resolution|
              Issue type|ENHANCEMENT
                Priority|P3
            Subcomponent|plugin
             Assigned to|issues@hudson
             Reported by|jleeman






------- Additional comments from [hidden email] Fri May  8 05:22:39 +0000 2009 -------
If a build fails to complete, and as a result the javadoc is not available, the
JavadocArchiver throws an exception and prints the stack trace to the console.

This is not ideal because it makes the console output hard to decipher. The
build failure appears to have been caused by the Javadoc archiving, when in fact
the failure occurred elsewhere.

Could the JavadocArchiver be changed to only attempt archiving when the build
result is gte UNSTABLE rather than always trying to do it regardless of the
build result?

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Issue 3656] JavadocArchiver plugin should not throw exception when build fails

mdonohue
https://hudson.dev.java.net/issues/show_bug.cgi?id=3656






------- Additional comments from [hidden email] Fri May  8 12:14:43 +0000 2009 -------
Can you include the stack trace you are getting and version number of Hudson and
the plugin?

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Issue 3656] JavadocArchiver plugin should not throw exception when build fails

jleeman
In reply to this post by jleeman
https://hudson.dev.java.net/issues/show_bug.cgi?id=3656






------- Additional comments from [hidden email] Mon May 11 04:43:03 +0000 2009 -------
I'm not sure of the JavadocArchiver plugin version; it's just part of Hudson v1.255.

Please note that the exception is to be expected -- there's no javadoc to
archive, so the source directory doesn't exist, so copying throws an exception.

My request is that the JavadocArchiver not attempt to archive when the build
fails (because the javadoc won't be there to archive), or at least provide a
configuration, eg "archiveOnFailure=false", that allows you to skip it on failure.

Here's the exception stack trace:

BUILD FAILED
...
Total time: 42 minutes 16 seconds
Publishing Javadoc
FATAL: Unable to copy Javadoc from <edit> to <edit>
hudson.util.IOException2: Failed to copy <edit>\javadoc/**/* to <edit>\javadoc
        at hudson.FilePath$23.invoke(FilePath.java:885)
        at hudson.FilePath$23.invoke(FilePath.java:856)
        at hudson.FilePath.act(FilePath.java:388)
        at hudson.FilePath.copyRecursiveTo(FilePath.java:856)
        at hudson.FilePath.copyRecursiveTo(FilePath.java:837)
        at hudson.tasks.JavadocArchiver.perform(JavadocArchiver.java:68)
        at
hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:318)
        at
hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:306)
        at hudson.model.Build$RunnerImpl.post2(Build.java:126)
        at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:291)
        at hudson.model.Run.run(Run.java:813)
        at hudson.model.Build.run(Build.java:88)
        at hudson.model.ResourceController.execute(ResourceController.java:70)
        at hudson.model.Executor.run(Executor.java:88)
Caused by: <edit>\javadoc not found.
        at
org.apache.tools.ant.types.AbstractFileSet.getDirectoryScanner(AbstractFileSet.java:422)
        at org.apache.tools.ant.taskdefs.Copy.execute(Copy.java:453)
        at hudson.FilePath$23.invoke(FilePath.java:882)


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Issue 3656] JavadocArchiver plugin should not throw exception when build fails

Alan Harder-2
In reply to this post by jleeman
https://hudson.dev.java.net/issues/show_bug.cgi?id=3656



User mindless changed the following:

                What    |Old value                 |New value
================================================================================
                  Status|NEW                       |RESOLVED
--------------------------------------------------------------------------------
              Resolution|                          |FIXED
--------------------------------------------------------------------------------




------- Additional comments from [hidden email] Sat Jul  4 00:52:55 +0000 2009 -------
already fixed in Hudson 1.278

r14704 | kohsuke | 2009-01-21 18:12:31 -0800 (Wed, 21 Jan 2009) | 2 lines
Changed paths:
   M /trunk/hudson/main/core/src/main/java/hudson/FilePath.java

ant throws an exception if the base dir doesn't exist.
This breaks some of the error checks in places like ArtifactArchiver or
JavadocArchiver, so return 0 instead of IOException.


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]