Build issues


#1

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] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Internal error in the plugin manager executing goal ‘com.opengamma.tools:opengamma-maven-plugin:1.3.1:generate-scripts’: Unable to find the mojo ‘generate-scripts’ (or one of its required components) in the plugin 'com.opengamma.tools:opengamma-maven-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.

com.opengamma.tools opengamma-maven-plugin generate-scripts

Many thanks


#2

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.


#3

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.


#4

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.