Build issues


I’m running on MacOS 10.8.2 and could not find any pre packages libraries for the installation so decided to get the source and build using maven. I am using Java :

Java™ SE Runtime Environment (build 1.7.0_17-b02)
Java HotSpot™ 64-Bit Server VM (build 23.7-b01, mixed mode)

When I try to build the application using mvn install -Dmaven.test.skip=true, I get the following error in the OG-Server project :

[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Internal error in the plugin manager executing goal ‘’: Unable to find the mojo ‘generate-scripts’ (or one of its required components) in the plugin '’
com/opengamma/maven/ScriptableScriptGeneratorMojo : Unsupported major.minor version 51.0

Any ideas about what needs to be done to fix the error?

If I take out the following section of the pom.xml it builds but I suspect it’s not generated the scripts required to start the services. opengamma-maven-plugin generate-scripts

Many thanks


The error means that the class ScriptableScriptGeneratorMojo was compiled using JDK 7 but you are trying to run it using an older JDK, such as JDK 6.

I therefore strongly suspect that although you think you are running maven using JDK 7, you are actually using JDK 6. Running with the maven -X option will produce tons of logging but should show what the JDK running is.


Many thanks that seemed to be the cause of the issue. Had to set the JAVA_HOME to get maven to use the appropriate JDK version. Strange as 1.7 is the default version on my machine.


Earlier 1.7 builds (around what you’re using) for MacOS X didn’t seem to handle switching the default VM properly, but I’ve noticed it seems better with later builds.