ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <DDevie...@lgc.com>
Subject RE: why to use fork Attribute in java task
Date Wed, 05 Mar 2003 15:03:10 GMT
In short, it's a classloader issue. By using fork=true, you are running in a
standard way (as if running your task from the command line). And you only
need <property environment="env"/> if you need to access environment
variables from within the buildfile (for example, ${env.CLASSPATH}). --DD

-----Original Message-----
From: Pritesh saharey [mailto:pritesh@sqatester.com] 
Sent: Wednesday, March 05, 2003 12:50 AM
To: user@ant.apache.org
Subject: why to use fork Attribute in java task


i would like to know the following 3 things 

1)when i run my build.xml file by using ant -v command i see this error in
my konsole ??

	 [java] 'com.ora.ITS.SDK.Tools.ConsoleDistribBuilder'
     [java] '-f'
     [java] 'SRC/org/net/carmel/services/ptts/PTTService.distribdef'
     [java] '-o'
     [java] 'SRC/org/net/carmel/services/ptts/PTTService.distrib'
     [java]
     [java] The ' characters around the executable and arguments are
     [java] not part of the command.
	 
due to the following code iam using in my build file
	 
<target name="parcel" depends="init,compile"
		description="Creats parcel file">
		<java append="true" fork="true" failonerror="true"
classpathref="classpath"
	
classname="com.ora.ITS.SDK.Tools.ConsoleParcelBuilder">
			<arg line="-f
SRC/org/net/carmel/services/ptts/PTTService.parceldef -o
SRC/org/net/carmel/services/ptts/PTTService.parcel"/>
		</java>
</target>
<target name="distribute" depends="parcel">
		<java append="true" fork="true" failonerror="true"
classpathref="classpath"
	
classname="com.ora.ITS.SDK.Tools.ConsoleDistribBuilder">
			<arg line="-f
SRC/org/net/carmel/services/ptts/PTTService.distribdef -o
SRC/org/net/carmel/services/ptts/PTTService.distrib"/>
		</java>
	
		<move
file="SRC/org/net/carmel/services/ptts/PTTService.distrib"
todir="${build.distrib.dir}"/>
		
</target>	 

but when i run build file simply using ant command the build is successful
altough using ant -v command also make my build successful but giving the
error above i mentioned .

2)
<target name="init">
    <property environment="env"/>
  </target>
  if iam using environment property in my build file what changes will it
make in my build file and can anybody tell why we should use this
environment property
  
3)why fork Attribute is to be used with java task in ant  because after
using fork only my build has stared running fine.

can anybody explain me.

_____________________________________________________________
Join SQAtester.com Community  --->
http://www.sqatester.com/testersarea/joinus.htm

_____________________________________________________________
Select your own custom email address for FREE! Get you@yourchoice.com w/No
Ads, 6MB, POP & more! http://www.everyone.net/selectmail?campaign=tag

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

Mime
View raw message