bmargulies
bmargulies

Reputation: 100161

Jenkins complains of null M2_HOME

I tried to turn on the automatic tool installer for a maven package on Jenkins 1.427, and was rewarded with the following in the build log. It's as if it's reading some but not all of the auto-install config.

Started by user benson
Building remotely on acropolis.basistech.net
FATAL: Null value not allowed as an environment variable: M2_HOME
java.lang.IllegalArgumentException: Null value not allowed as an environment variable: M2_HOME
at hudson.EnvVars.put(EnvVars.java:162)
at hudson.maven.MavenModuleSetBuild.getEnvironment(MavenModuleSetBuild.java:177)
at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:673)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1193)
at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:555)
at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:443)
at hudson.model.Run.run(Run.java:1376)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:479)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:230)

Upvotes: 3

Views: 1359

Answers (1)

bmargulies
bmargulies

Reputation: 100161

I had set up a tarball of maven that lacked the toplevel directory, and this confused Jenkins.

Upvotes: 1

Related Questions