ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon Curran <s.cur...@aepona.com>
Subject Re: Switching versions of java during an ant build
Date Tue, 16 Apr 2002 16:12:05 GMT
yeah, i got it working using the following...

<target name="buildJavadoc" >

        <exec executable="ant">
            <arg line="-buildfile ${basedir}/AntBuildFiles/buildTest.xml javadocCreate"/>
            <env key="JAVA_HOME" value="/opt/java/jdk/jdk1.4"/>
        </exec>

</target>

<target name="javadocCreate" depends="retrieveFileNamesForJavadoc" >

        <javadoc sourcepath="${pcp_source_dir}:${parlay_src}:${parlay_rel4_src}"
            classpath="${sdk_jar_file}:${corba_classpath_stuff}"
            packageList="${working_directory}/tmpJavadocInput2"
            Public="true"
            .....
            .....
        </javadoc>

</target>

thanks for all your help...

best regards,
simon

Daniel Barclay wrote:

> > From: Simon Curran [mailto:s.curran@aepona.com]
> > ...
> >
> > is what you are saying that i should start another ant
> > process from within a current ant process and pass it a new
> > setting for
> > JAVA_HOME based on where the 1.4 sdk is installed??.
> >
> > if so, how would i go about doing this??
>
> There's a task for running a command (in the command line interpreter
> of the local system); it's <exec> or something like that.  It takes
> elements for specifying environment variables for the invocation of the
> command ("<env>" maybe?).
>
> Use such a task to run Ant (that is, something like "ant sometarget")
> would be the command to execute.  Use environment-variable subelements
> to set "JAVA_HOME" to the appropriate value for target "sometarger".
>
> Daniel
>
> --
> To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>

--

***************************************************************
* Simon Curran              * Email : simon.curran@aepona.com *
* Software Engineer         * WWW   : www.aepona.com          *
* Aepona Ltd.               * Phone : +44 (0)28 9027 5231     *
* Interpoint Building,      * Fax   : +44 (0)28 9026 9111     *
* 20-24 York Street,        *                                 *
* Belfast. BT15 1AQ.        *                                 *
* N. Ireland.               *                                 *
***************************************************************



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