-
Bug
-
Resolution: Fixed
-
Critical
-
None
-
Maven 2.2.1, Hudson 1.336, Java 1.6, Linux/WinXP
I have a multimodule maven project, where one sub-module is my ues-build-helper maven-plugin.
When I build this project from command line, it is OK. But when I run the same build from Hudson, I obtain following exception in build-log and the build fails.
java.io.FileNotFoundException: /home/devel/workspace/hudson/jobs/ues.platform-compile/workspace/maven/ues-build-helper/target/classes (Is a directory)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:106)
at hudson.maven.ExecutedMojo.<init>(ExecutedMojo.java:94)
at hudson.maven.MavenModuleSetBuild$Builder.postExecute(MavenModuleSetBuild.java:745)
at hudson.maven.MavenBuilder$Adapter.postExecute(MavenBuilder.java:287)
at hudson.maven.agent.PluginManagerInterceptor$1MojoIntercepterImpl.callPost(PluginManagerInterceptor.java:170)
at hudson.maven.agent.PluginManagerInterceptor.executeMojo(PluginManagerInterceptor.java:183)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
at org.apache.maven.lifecycle.LifecycleExecutorInterceptor.execute(LifecycleExecutorInterceptor.java:65)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
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 org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
The solution is simple, the class hudson.maven.ExecutedMojo have to catch the FileNotFoundException on row 94 - I attach the modified source code for this class. After this patch the build procceds in the same way as from command line and the warning is logged and could be ignored.
- is related to
-
JENKINS-14142 Unnecessarily verbose warning if executed mojo is part of the build
-
- Resolved
-
Code changed in jenkins
User: Christoph Kutzinski
Path:
changelog.html
maven-plugin/pom.xml
maven-plugin/src/main/java/hudson/maven/ExecutedMojo.java
maven-plugin/src/test/java/hudson/maven/ExecutedMojoTest.java
http://jenkins-ci.org/commit/jenkins/68f5a0d23ab4a5631df15b521b8eb71a2a74cc49
Log:
[FIXED JENKINS-5044] catch FileNotFoundException if mojos are executed from a classes directory instead from a jar