Maven JXR issue
However another problem I got was from Maven. The command we run looks like: mvn clean install site
The error seems to be pretty strange:
Embedded error: Error rendering Maven report: Error while generating the HTML source code of the projet.
basedir /data/Sources/workspace/Statistics/service/target/generated-sources/groovy-stubs/main does not exist
Running things with -X flag shows the origin of the problem:
Caused by: java.lang.IllegalStateException: basedir /data/Sources/workspace/service/target/generated-sources/groovy-stubs/main does not exist
After a bit of investigation I found http://jira.codehaus.org/browse/JXR-95 filled by me 🙂 It appears that I already provided a patch for this problem. However it looks like it was ignored.
The issue happens in case of the following project structure:
So you’ll get this kind of build failures in case if you have Groovy tests but do not have any Groovy files in the production code.
There’s a pretty simple workaround since applying patch to the plugin might be a bit difficult to spread across environments. You can create some dummy file like src/main/groovy/PlaceHolder.groovy with the simple contents:
println “Placeholder for JXR-95”
It will be enough to bypass the problem.