Yes, I'd think javac from 1.6 could use 1.6 source and compile to 1.5, but that's not what I'm seeing:
$ java -version java version "1.5.0_17" $ rm jdk $ ln -s jdk1.6.0_07 jdk $ java -version java version "1.6.0_07" $ ffxg 1.6 ./pom.xml: <source>1.6</source> ./taste-web/pom.xml: <source>1.6</source> ./core/pom.xml: <source>1.6</source> ./examples/pom.xml: <source>1.6</source> $ ffxg 1.5 | egrep 'source|target' ./pom.xml: <target>1.5</target> ./taste-web/pom.xml: <target>1.5</target> ./core/pom.xml: <target>1.5</target> ./examples/pom.xml: <target>1.5</target> $ mvn -Dmaven.compiler.target=1.5 clean compile ... [INFO] Compiling 240 source files to /home/otis/workspace/asf-mahout/core/target/classes [INFO] ------------------------------------------------------------------------ [ERROR] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Compilation failure Failure executing javac, but could not parse the error: javac: source release 1.6 requires target release 1.6 It's very possible I'm not doing something correctly. I've been lucky never to have had to deal with this stuff before. Otis -- Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch ----- Original Message ---- > From: Sean Owen <sro...@gmail.com> > To: mahout-dev@lucene.apache.org > Sent: Wednesday, March 11, 2009 12:05:52 PM > Subject: Re: Mahout for 1.5 JVM > > Nah, source must certainly be 1.6 since the code requires 1.6. This means > you need Java 6, not 1.5, to compile. It is only target that can and must be > 1.5. > > But you will not be able to compile all of Mahout because there is, at > least, use of Deque. Taste should be OK but there is no separate target for > it. Hence roll a quick build.xml or add this to Maven. I could easily send > you such a thing. > > (PS there are definitely Taste/Mahout bindings but that does not pose a > problem for you.) > > On Mar 11, 2009 3:57 PM, "Otis Gospodnetic" > wrote: > > > Still no luck here, though I'm closer. It looks like I'm hitting the same > thing Jeff and Deneche hit 2 months ago. > > I installed JDK 1.5 > I double-checked javac - 1.5 > I then tried compiling: > mvn -Dmaven.compiler.target=1.5 clean compile jar:jar > > Didn't work, source being 1.6 is still a problem - makes sense, 1.5 compiler > knows nothing about 1.6. Tried overriding like this: > > mvn -Dmaven.compiler.source=1.5 -Dmaven.compiler.target=1.5 clean compile > jar:jar > > This still doesn't work. I thought the above sys properties would override > source and target values in pom.xml's, but apparently they don't. I had to > s/1.6/1.5/g in all pom.xml's. Now I no longer get javac complaining about > bad target or source, but I do hit the actual 1.6 vs. 1.5 issues. :) > > I think I'm hitting this problem: > http://markmail.org/thread/n6vvgrtgczkigx7d > > Requiring 1.6 makes sense for most of Mahout because Hadoop requires it > anyway. But Taste doesn't run on Hadoop yet (I'm running it completely > Hadoop-free), so it's a shame not to be able to compile at least Taste > with/for 1.5. Should we try fixing that for 0.1 either by > removing/commenting out problematic @Override's or by... hm, there is no > other way, ha? And then making it possible to somehow build only Taste, or > perhaps building Taste with maven is already doable somehow? > > Thanks, Otis -- Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch > > ----- Original Message ---- > From: Sean Owen > To: > mahout-dev@lucene.apache.org > > > Sent: Monday, March 9, 2009 5:15:09 PM > Subject: Re: Mahout for 1.5 JVM > > > You need to compile ... > > > On Mon, Mar 9, 2009 at 9:04 PM, Grant Ingersoll wrote: > > Mahout requires > 1.6 due to Hadoop requi...