ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Petar Tahchiev" <paranoia...@gmail.com>
Subject Re: Print exact version of jvm (java -version)
Date Thu, 08 Jun 2006 08:16:00 GMT
On 08/06/06, Mikael Petterson (KI/EAB) <mikael.petterson@ericsson.com> wrote:
> If I use javac -version where do I tie that into my xml file? With an
> execute task?
>
> Cheers,
>
> //mikael
>
> -----Original Message-----
> From: Petar Tahchiev [mailto:paranoiabla@gmail.com]
> Sent: den 8 juni 2006 10:00
> To: Ant Users List
> Subject: Re: Print exact version of jvm (java -version)
>
> On 08/06/06, Mikael Petterson (KI/EAB) <mikael.petterson@ericsson.com>
> wrote:
> > How can I print what compiler is used ( exact version like 'java
> > -version') when compiling?
> >
> > Cheers,
> >
> > //mikael
> >
> >
> > BUILD.TARGET.VM=1.3
> > BUILD.BOOTCLASSPATH=/app/j2sdk/1.3.1_11/jre/lib/rt.jar
> >
> >
> > <target name="compile" depends="init,setup" description="compile
> > product src code">
> >         <depend srcdir="${src.dir}" destdir="${classes.dir}"
> > cache="depcache"
> >         closure="yes"/>
> >         <!-- Both srcdir and destdir should be package roots. -->
> >          <javac  debug="true" deprecation="true"
> > destdir="${classes.dir}"
> >                      srcdir="${src.dir}"
> >                      nowarn="${NO.WARN}"
> >                               target="${BUILD.TARGET.VM}"
> >                               bootclasspath="${BUILD.BOOTCLASSPATH}"
> >                      extdirs=""
> >                      fork="true"
> >                      memoryMaximumSize="768m">
> >          <classpath refid="common.classpath"/>
> >          <!-- No test classes -->
> >          <exclude name="**/tb/**"/>
> >          <exclude name="**/upfwk/**"/>
> >          <exclude name="test/**"/>
> >          <!-- No templates -->
> >          <exclude name="**/template/**"/>
> >         </javac>
> >    </target>
> >
> >
>
> What's wron with "javac -version" ?
> --
> Regards, Petar!
> Karlovo, Bulgaria.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional
> commands, e-mail: user-help@ant.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>
You could use something like this:

	<exec executable="javac" outputproperty="out">
    	<arg value="-version"/>
	</exec>
and then use the ${out} property whenever you want. The problem is
that this command generates a lot of extra messages...
-- 
Regards, Petar!
Karlovo, Bulgaria.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message