ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John5342 <>
Subject Re: Build in multiple java versions using Ant
Date Tue, 21 Oct 2008 18:55:14 GMT
If i remember right only the stuff in the nbprojects folder is overriten by
netbeans and should not be modified. You can on the other hand add targets
and stuff so long as you dont touch the existing stuff in there. build.xml
provided by netbeans provides some hints on how to add stuff and there is
more info on the netbeans wiki.

Yours ay differ but my build-impl.xml has somewhere the following:

<javac debug="@{debug}" deprecation="${javac.deprecation}"
destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}"
includeantruntime="false" includes="@{includes}" source="${javac.source}"
sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${}">

so looking at that and the advice from build.xml i would say its possible to
set a "-pre-compile" target that sets "javac.source" and ""
properties to what you want. These changes should not be overwritten by

Hope that helps.

2008/10/20 scuzzie <>

> Hi,
> I have a project written in NetBeans 6.1 that I need to be able to compile
> on demand using any JDK version from 1.4.2, on a machine that does not have
> NetBeans installed (but does have Ant of course). The app compiles under
> 1.4.2 and up using the Ant xml files generated by NetBeans. At the moment,
> the options are 1.4.2/1.5/1.6 as they are the JDKs that are installed on
> the
> machine. The application uses Swing so has a couple of dependant jars.
> Modifying the xml build files is not an option. Specifying a properties
> file
> from the Ant command-line is fine, and I have had to do this anyway (as
> well
> as copying the swing and NetBeans copylibs jars to the machine). The file
> is
> autogenerated and is created automatically before calling Ant.
> Are there properties I can add to my properties file to specify which
> version of the SDK to compile with? Any other suggestions?
> Using Windows.
> --
> View this message in context:
> Sent from the Ant - Users mailing list archive at
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message