Hudson: Git and Maven plugins
Suddenly, something went wrong .. 😦
A usual Hudson job pulling sources from Git repository started to fail with NPE:
Parsing POMs [nexttags-CI] $ c:\Winny\java\jdk1.6.0_18\/bin/java -Xmx1024m -XX:MaxPermSize=512m -cp c:\dev\hudson-slave\maven-agent.jar;C:\Winny\java\apache-maven-2.2.1\boot\classworlds-1.1.jar hudson.maven.agent.Main C:\Winny\java\apache-maven-2.2.1 C:\dev\hudson-slave\slave.jar c:\dev\hudson-slave\maven-interceptor.jar 3841 c:\dev\hudson-slave\maven2.1-interceptor.jar <===[HUDSON REMOTING CAPACITY]===>channel started channel stopped ERROR: Processing failed due to a bug in the code. Please report this to users@hudson.dev.java.net java.lang.NullPointerException at java.util.Hashtable.put(Hashtable.java:394) at java.util.Hashtable.putAll(Hashtable.java:466) at hudson.maven.MavenBuilder.call(MavenBuilder.java:156) at hudson.maven.MavenModuleSetBuild$Builder.call(MavenModuleSetBuild.java:688) at hudson.maven.MavenModuleSetBuild$Builder.call(MavenModuleSetBuild.java:632) at hudson.remoting.UserRequest.perform(UserRequest.java:114) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:270) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619)
What ?! But it worked half an hour ago. Hmm, that’s interesting …
After re-installing Hudson from scratch, installing it locally on my machine, going back and forward with versions, creating simple jobs doing absolutely nothing except pulling sources from various Git projects and running "mvn clean"
.. I still couldn’t git rid of this error.
Well, it was clearly time for some debugging and .. here we go!
For some reason Git plugin started to pass null
value for GIT_BRANCH
environment variable.
This caused Maven plugin to fail in System.getProperties().putAll(systemProps)
call.
The solution was to use "master"
as default Git branch instead of "**"
or empty String:
My versions were: Hudson v1.352
, Git plugin v0.8.1
P.S
Some Hudson links:
- SVN repo (user: “guest”, empty password)
- Various ways to get and view Hudson sources
- Hudson downloads – application itself and plugins, all versions
- Hudson Git plugin
- “Continuous Integration with Hudson” – book in progress
Thank you so much … this error kept me searching quite a while !!
Good Job!
Glad I was able to help 🙂
Ah, finally my github builds works with hudson.
Great 🙂
Great, now Jenkins + Github worked for me! I just specified “master” as branch.