Looks like I was confused. The build system builds with either 1.3 (!) or 1.4. AFAICT, Don brought us into the future and we don't have anything that requires 1.3 any more. But it's not clear to me whether we need to be locked into 1.4 either.
I think you could try an experiment of removing the explicit source="1.4" from the <javac> tasks and see what happens. Also note that ant 1.7 has a way to set the default java version for all <javac> tasks that do not have an explicit source. The default default is to use whatever Java version ant it using. On 2010-02-08, at 20:07, Henry Minsky wrote: > I'm running java 1.6 and ant 1.7. > > I added a java file file to WEB-INF/lps/server/src/org/openlaszlo/compiler/, > and then did > 'ant build', and it seems to think that everything in that directory gets > compiled with '-source 1.4'? > > > > On Mon, Feb 8, 2010 at 7:54 PM, P T Withington <[email protected]> wrote: > >> The build is only supposed to use 1.4 for buliding the parser, everything >> else is supposed to build with whatever the Java is. Are you synced and up >> to date with OS X? And using ant 1.7? You should be running Java 1.6 and >> that should be the default. >> >> There is one tricky place in the build file that separates out the 1.4 >> sources. That should be the only place with the explicit source setting. >> >> On Feb 8, 2010, at 19:45, Henry Minsky <[email protected]> wrote: >> >> I'm trying to add some code in the LPS server which uses "generics" , a >> Java 1.5 feature. Is there a way to build the LPS sources >> without "-source 1.4" ? >> >> >> compile: >> [javac] Compiling 1 source file to >> /Users/hqm/openlaszlo/trunk/WEB-INF/lps/server/build >> [javac] >> /Users/hqm/openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/compiler/Lzcsh.java:46: >> generics are not supported in -source 1.4 >> [javac] (use -source 5 or higher to enable generics) >> [javac] targets = new HashMap<String, Target>(); >> [javac] ^ >> [javac] 1 error >> >> BUILD FAILED >> /Users/hqm/openlaszlo/trunk/build.xml:606: The following error occurred >> while executing this line: >> /Users/hqm/openlaszlo/trunk/WEB-INF/lps/server/build.xml:302: Compile >> failed; see the compiler error output for details. >> >> >> -- >> Henry Minsky >> Software Architect >> <[email protected]>[email protected] >> >> >> > > > -- > Henry Minsky > Software Architect > [email protected]
