Re: Same build using multiple JDKs?
"Mark Derricutt" <mark-eB0Nx5sQHd/[email protected]> Sun, 21 Jan 2007 15:02:55 +1300
| Newsgroups | gmane.comp.java.anthill |
|---|---|
| Message-ID | <[email protected]> |
--===============0439898119== Content-Type: multipart/alternative; boundary="----=_Part_153012_17016365.1169344975710" ------=_Part_153012_17016365.1169344975710 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline On 1/19/07, Adi <[email protected]> wrote: > > We are using Anthill OS version 1.8.0.264. We have a requirement to build > using multiple JDKs. > Is there a way of building a project with multiple JDK versions. > Example: Fire a build project using JDK 1.4.2 and then repeat the same > build with JDK 1.3.1 > Whilst Anthill doesn't support this, its easily accomplished using Ant itself thou. Our Anthill install was running 1.4 but I wanted to compile with 1.5 - I did this by adding the following to the build.xml file to define a path to the JDK and changing the calls to javac: <!-- JDK definitions --> <property name="jdk.bin.1.5" value="${jdk.home.1.5}/bin"/> <path id="jdk.classpath.1.5"> <fileset dir="${jdk.home.1.5}"> <include name="jre/lib/jce.jar"/> <include name="jre/lib/javaws.jar"/> <include name="jre/lib/jsse.jar"/> <include name="jre/lib/deploy.jar"/> <include name="jre/lib/rt.jar"/> <include name="jre/lib/charsets.jar"/> <include name="jre/lib/plugin.jar"/> <include name="jre/lib/ext/sunjce_provider.jar"/> <include name="jre/lib/ext/sunpkcs11.jar"/> <include name="jre/lib/ext/dnsns.jar"/> <include name="jre/lib/ext/localedata.jar"/> </fileset> </path> <property name="project.jdk.home" value="${jdk.home.1.5}"/> <property name="project.jdk.bin" value="${jdk.bin.1.5}"/> ... <javac destdir="classes" fork="true" executable="${project.jdk.bin}/javac"> <classpath refid="project.jdk.classpath"/> </javac> Hope this helps. -- It was not the presence of God that formed me, but his absence which broke me. http://www.talios.com http://www.flickr.com/photos/talios ------=_Part_153012_17016365.1169344975710 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline On 1/19/07, <b class="gmail_sendername">Adi</b> <<a href="mailto:[email protected]">[email protected]</a>> wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> We are using Anthill OS version 1.8.0.264. We have a requirement to build using multiple JDKs.<br>Is there a way of building a project with multiple JDK versions.<br>Example: Fire a build project using JDK 1.4.2 and then repeat the same build with JDK 1.3.1<br></blockquote></div><br>Whilst Anthill doesn't support this, its easily accomplished using Ant itself thou. Our Anthill install was running 1.4 but I wanted to compile with 1.5 - I did this by adding the following to the build.xml file to define a path to the JDK and changing the calls to javac:<br><br><div class="code"><div class="codeContent"> <pre class="code-xml"><span class="code-tag"><span class="code-comment"><!-- JDK definitions --></span></span><br><span class="code-tag"><property name=<span class="code-quote">"jdk.bin.1.5"</span> value= <span class="code-quote">"${jdk.home.1.5}/bin"</span>/></span><br><span class="code-tag"><path id=<span class="code-quote">"jdk.classpath.1.5"</span>></span><br> <span class="code-tag"><fileset dir= <span class="code-quote">"${jdk.home.1.5}"</span>></span><br> <span class="code-tag"><include name=<span class="code-quote">"jre/lib/jce.jar"</span>/></span><br> <span class="code-tag"> <include name=<span class="code-quote">"jre/lib/javaws.jar"</span>/></span><br> <span class="code-tag"><include name=<span class="code-quote">"jre/lib/jsse.jar"</span>/></span><br> <span class="code-tag"><include name=<span class="code-quote">"jre/lib/deploy.jar"</span>/></span><br> <span class="code-tag"><include name=<span class="code-quote">"jre/lib/rt.jar"</span> /></span><br> <span class="code-tag"><include name=<span class="code-quote">"jre/lib/charsets.jar"</span>/></span><br> <span class="code-tag"><include name=<span class="code-quote">"jre/lib/plugin.jar" </span>/></span><br> <span class="code-tag"><include name=<span class="code-quote">"jre/lib/ext/sunjce_provider.jar"</span>/></span><br> <span class="code-tag"><include name=<span class="code-quote"> "jre/lib/ext/sunpkcs11.jar"</span>/></span><br> <span class="code-tag"><include name=<span class="code-quote">"jre/lib/ext/dnsns.jar"</span>/></span><br> <span class="code-tag"><include name= <span class="code-quote">"jre/lib/ext/localedata.jar"</span>/></span><br> <span class="code-tag"></fileset></span><br><span class="code-tag"></path></span><br><br><span class="code-tag"><property name= <span class="code-quote">"project.jdk.home"</span> value=<span class="code-quote">"${jdk.home.1.5}"</span>/></span><br><span class="code-tag"><property name=<span class="code-quote">"project.jdk.bin "</span> value=<span class="code-quote">"${jdk.bin.1.5}"</span>/><br><br>...<br><br></span></pre><div class="code"><div class="codeContent"> <pre class="code-xml"><span class="code-tag"><javac destdir=<span class="code-quote">"classes"</span> fork=<span class="code-quote">"true"</span> executable=<span class="code-quote">"${project.jdk.bin }/javac"</span>></span><br> <span class="code-tag"><classpath refid=<span class="code-quote">"project.jdk.classpath"</span>/></span><br><span class="code-tag"></javac><br><br>Hope this helps. <br></span></pre> </div></div><pre class="code-xml"><br></pre> </div></div><br><br><br>-- <br>It was not the presence of God that formed me, but his absence which broke me.<br><br><a href="http://www.talios.com">http://www.talios.com</a><br><a href="http://www.flickr.com/photos/talios"> http://www.flickr.com/photos/talios</a> ------=_Part_153012_17016365.1169344975710-- --===============0439898119== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Anthill mailing list Anthill-IWHQxnLZ/[email protected] http://lists.urbancode.com/mailman/listinfo/anthill --===============0439898119==--