Reputation: 1473
I am new to Hudson, perhaps someone knows the solution: I am trying to checkout the parent pom from the VSS in Hudson (vss plugin installed) and now I get class cast exception:
FATAL: hudson.maven.MavenModuleSetBuild cannot be cast to hudson.model.Build
java.lang.ClassCastException: hudson.maven.MavenModuleSetBuild cannot be cast to hudson.model.Build
at scm.vss.VSSSCM.checkout(VSSSCM.java:227)
at hudson.model.AbstractProject.checkout(AbstractProject.java:664)
at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:260)
at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:234)
at hudson.model.Run.run(Run.java:793)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:205)
at hudson.model.ResourceController.execute(ResourceController.java:70)
at hudson.model.Executor.run(Executor.java:88)
The line in question is here:
Build lastBuild = (Build)build.getPreviousBuild();
Has the interface changed? Anyone knows the solution?
Upvotes: 1
Views: 1123
Reputation: 11876
Looks like Shashi filed this as Hudson issue 2665 which remains open.
Upvotes: 1
Reputation: 2923
I've never faced that situation, but I have faced other problems when using maven projects in hudson like infinite loops upon builds and so (that I think Hudson itself should evaluate and avoid). By this I mean that this feature is quitely young and error-prone.
Regarding at your exception, I can advise you to configure the project as a freestyle software project. If you set up the "Execute maven top-level targets" option on the build steps, the project will be built using Maven and probably the exception will dissapear.
The other thing that Hudson does automatically when a project is configured as a maven project is triggering builds for dependent project on successfull build, but, you also can configure it manually by using the "Build other projects" feature.
As you see, it's a little configuration price to pay and I strongly think that your exception will dissapear.
Hope it helps.
Carlos
Upvotes: 0
Reputation: 1230
Looks like it's a bug in that version of Hudson. Have you tried a slightly older or newer version? IIRC they provide very frequent stable builds, almost nightly...
Upvotes: 0