プログラマでありたい

おっさんになっても、プログラマでありつづけたい

Hudsonでサイトレポートでエラー

 Hudsonに新規のプロジェクトの設定をしていてハマりました。下記のようなpom.xmlがありまして、mvn siteをローカルで実行すると成功します。これをHudsonに設定して、mavenへの引数をsiteにするとエラー。surefire-report:reportのフェーズで落ちているようです。オプションをsurefire-report:reportにすると、やっぱり落ちます。
 なんじゃろと悩んでいたのですが、登録したプロジェクトにまだ一件もユニットテストが登録されていないのが原因のようです。確かにNullだわなぁと思うのですが、手動mvnが成功していたので問題解決まで長引きました。未だに何となく腑に落ちないのですが。。。

<reporting>
	<plugins>
		<plugin>
			<artifactId>maven-javadoc-plugin</artifactId>
			<configuration>
				<source>UTF-8</source>
				<encoding>UTF-8</encoding>
				<docencoding>UTF-8</docencoding>
				<charset>UTF-8</charset>
				<links>
					<link>http://java.sun.com/javase/ja/6/docs/ja/api/</link>
					<link>http://java.sun.com/javaee/5/docs/api/</link>
					<link>http://s2container.seasar.org/2.4/s2-framework/ja/apidocs/</link>
					<link>http://s2container.seasar.org/2.4/s2-extension/ja/apidocs/</link>
					<link>http://s2container.seasar.org/2.4/s2-tiger/ja/apidocs/</link>
					<link>http://commons.apache.org/collections/apidocs/</link>
					<link>http://commons.apache.org/lang/apidocs/</link>
				</links>
			</configuration>
		</plugin>
		<plugin>
			<groupId>org.apache.maven.plugins</groupId>
			<artifactId>maven-surefire-report-plugin</artifactId>
		</plugin>
	</plugins>
</reporting>
[INFO] ------------------------------------------------------------------------
[INFO] Building sample-module
[INFO]    task-segment: [surefire-report:report]
[INFO] ------------------------------------------------------------------------
[INFO] Preparing surefire-report:report
[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] null
[INFO] ------------------------------------------------------------------------
[INFO] Trace
java.lang.NullPointerException
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.calculateConcreteConfiguration(DefaultLifecycleExecutor.java:747)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:578)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:540)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkProjectLifecycle(DefaultLifecycleExecutor.java:1168)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkLifecycle(DefaultLifecycleExecutor.java:1009)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:627)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:553)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:523)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:371)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:332)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:181)
	at org.apache.maven.lifecycle.LifecycleExecutorInterceptor.execute(LifecycleExecutorInterceptor.java:65)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:356)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:137)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:356)
	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)
	at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
	at hudson.maven.agent.Main.launch(Main.java:158)
	at hudson.maven.MavenBuilder.call(MavenBuilder.java:162)
	at hudson.maven.MavenModuleSetBuild$Builder.call(MavenModuleSetBuild.java:577)
	at hudson.maven.MavenModuleSetBuild$Builder.call(MavenModuleSetBuild.java:523)
	at hudson.remoting.UserRequest.perform(UserRequest.java:92)
	at hudson.remoting.UserRequest.perform(UserRequest.java:46)
	at hudson.remoting.Request$2.run(Request.java:236)
	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)
[INFO] ------------------------------------------------------------------------