David, Here's an altogether different approach, but if your developers' goal is to control what version of byte code is created, have them utilize the -source and -target attributes of the <javac> task. I have my developers do that and it allows me to use the latest JDK for all builds (400+ development streams) while they're able to build components and applications executing in JVMs from 1.4 --> 1.6
Thanks, Kevin -----Original Message----- From: David Weintraub [mailto:qazw...@gmail.com] Sent: Tuesday, February 15, 2011 3:32 PM To: Ant Users List Subject: Re: Dual Java Compilers/Replacement for antcontrib > Dual Java Compilers > I have a project that I build using Jenkins (previously Hudson) which > allows me to choose the version of the JDK I want to use when building the > project. My developers want the ability to select the JAVA compiler to use > via a properties file. > > The problem is that these too things *MAY* conflict with each other. If I > specify ${java.home}/bin/javac as the executable in my <javac> task, will > Jenkins choose the wrong version because $JAVA_HOME isn't necessarily the > same JAVA_HOME of the chosen JDK? On Tue, Feb 15, 2011 at 2:45 PM, Vimil Saju <vimils...@yahoo.com> wrote: > No there wont be any conflicts, Jenkins will start ant using JDK > configured on its configuration page. However the javac task will create a > new process and start a new jvm using the jdk specified in the properties > file. So I don't see any conflicts. Actually, that's the conflict I was worried about. Jenkins allows me to specify both the Java version and the Ant version. I WANT to use the Java version specified in Hudson control panel and not whatever JAVA_HOME might be set to. I'll have to use some mechanism that uses the defaults if ${javac.executable} isn't defined and whatever ${javac.executable} is if it is defined. Thanks. -- David Weintraub qazw...@gmail.com --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@ant.apache.org For additional commands, e-mail: user-h...@ant.apache.org ************************************************************ This communication, including attachments, is for the exclusive use of addressee and may contain proprietary, confidential and/or privileged information. If you are not the intended recipient, any use, copying, disclosure, dissemination or distribution is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this communication and destroy all copies. ************************************************************ --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@ant.apache.org For additional commands, e-mail: user-h...@ant.apache.org