2012/1/4 Rob Weir <[email protected]> > On Tue, Jan 3, 2012 at 7:27 PM, Dennis E. Hamilton > <[email protected]> wrote: > > The tools.jar is in the usual JDK location and the packages are there. > > > > There is a way to run Maven where it shows the commands it executes and > I may do that to see what the compile command looks like. Since Maven is > synthesizing class-path parameters, it would be interesting to see what the > compile command is and whether there is a command-line change in Java 7. > > > > I'm out of time on this for now, but I will take another crack at it > eventually. > > > > I think I got it. In taglets/pom.xml, look for tools.jar. The vendor > changed in the Java 7 version from "Sun Microsystems Inc." to "Oracle > Corporation". That vendor name switch causes Maven not to see that > dependency. Ouch. >
I also tested it and got the same reason. There is an article[1] talking about this issue. This is a common problem for including tools.jar in maven dependencies. We should give users suggestion about how to build ODF Toolkit with JDK7, but it should not be a reason that blocks our first release. [1] http://sunnytalkstech.blogspot.com/2011/08/maven-dependency-for-toolsjar-in-jdk7.html > > I changed the vendor name and it is not building under Java 7, or at > least it has got past that error. We'll see in another 20 minutes or > so if it completes. > > I wonder if we can simply list the JAR twice, once with each vendor? > Maven seems to ignore the one it can't find. > I try to use ${java.vendor} to replace the static value, but it doesn't work... I am sure "java.vendor" is a availabe property in maven2[2]. [2] http://docs.codehaus.org/display/MAVENUSER/MavenPropertiesGuide > I wonder how this worked at all with OpenJDK? Do they just list > themselves as coming from Sun for compatibility? > I found this answer[3] from Maven website. Before the sample configuration, there is a sentence "The following code includes tools.jar for JDKs on Windows, Linux and Solaris (it is already included in the runtime for Mac OS X and some free JDKs). " <activation> <property> <name>java.vendor</name> <value>Sun Microsystems Inc.</value> </property> </activation> So, the should be compatible with Open JDK. [3] http://maven.apache.org/general.html > > -Rob > > > [ ... ] > > > -- -Devin
