RE: why does an ant task not work!

2002-10-28 Thread ZHAO,YUN (HP-China,ex2)
Sorry for a mistake about the directory structure in the previous email!
 
But i don't think it is a problem with directory structure.
because abuild.xml 's components target
 (  target name=components depends=init
   !-- the following task won't work --
   ant dir=${b.home}/src target=core/
   /target 
)
will lead bbuild.xml's target core to running. 
The problem is when the build process gets the bbuild.xml's target compile,
the javac task tell me that it can't find some classes in the castor.jar
jarfile,
which i have defined in the task javac's classpath attribute and if i build
project b independently  with ant, it will work fine--it can find the
classes in the castor.jar jarfile.


components\a
components\a\src
components\a\src\abuild.xml

components\b
components\b\src
components\b\src\bbuild.xml
 
Regards


-Original Message-
From: sunyj [mailto:sunyj;adtec.com.cn]
Sent: Monday, October 28, 2002 1:10 PM
To: Ant Users List
Subject: Re: why does an ant task not work!


 The directory structure:
 --components--
 |
 |a--
 | |---abuild.xml
 |
 |b
 | |---bbuild.xml
 
 
In abuild.xml:
   ant dir=${b.home}/src target=core/
but your directory structure is:
  |b 
  | |---bbuild.xml
Where is src? Or the directory structure is below?: 
  ../b/ 
   src/bbuild.xml

In general, the problem is related with directory structure.
Can you send most simplest environment which
includes directory structure as attachment.

  - Original Message - 
  From: ZHAO,YUN (HP-China,ex2) 
  To: List, Ant Users (E-mail) 
  Sent: Sunday, October 27, 2002 7:11 PM
  Subject: why does an ant task not work!


  Running java org.apache.tools.ant.Main -buildfile bbuild.xml command
will be ok!
  Running java org.apache.tools.ant.Main -buildfile abuild.xml command
will fail if the the previous command hasn't been ran!

  --project a's abuild.xml
  project name=a default=core basedir=./
   target name=init
  property name=a.src ../
  property name=a.build ../
  ...
   /target

   target name=components depends=init
   !-- the following task won't work --
   ant dir=${b.home}/src target=core/
   /target

   target name=compile depends=components
   copy ... 
  !-- copy ${b.home}/build/classes directory's *.class to the
${a.build} directory-- 
   /copy
   javac src=${a.src} dest=${a.build} classpath=${a.build}/
   /target

target name=core depends=compile
  /project


  --project b's bbuild.xml
  project name=b default=core basedir=.
   target name=init
   property name=b.classpath
value=../lib/castor.jar:${java.class.path}/
  ...
   /target

   target name=compile depends=init
   !-- if the core target is called from abuild.xml's components
target, 
the ant will say that it can't find the classes which is
located in the castor.jar jar file --
   javac classpath=${b.classpath} dest=${b.home}/build/classes
.../
   /target

  target name=core depends=compile
  /project




--


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

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

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




Re: why does an ant task not work!

2002-10-28 Thread Laurence Mastrorillo
try ant dir=${b.home}/src target=core inheritAll=false/
LM

ZHAO,YUN (HP-China,ex2) a écrit :

 Sorry for a mistake about the directory structure in the previous email!

 But i don't think it is a problem with directory structure.
 because abuild.xml 's components target
  (  target name=components depends=init
!-- the following task won't work --
ant dir=${b.home}/src target=core/
/target
 )
 will lead bbuild.xml's target core to running.
 The problem is when the build process gets the bbuild.xml's target compile,
 the javac task tell me that it can't find some classes in the castor.jar
 jarfile,
 which i have defined in the task javac's classpath attribute and if i build
 project b independently  with ant, it will work fine--it can find the
 classes in the castor.jar jarfile.

 components\a
 components\a\src
 components\a\src\abuild.xml

 components\b
 components\b\src
 components\b\src\bbuild.xml

 Regards

 -Original Message-
 From: sunyj [mailto:sunyj;adtec.com.cn]
 Sent: Monday, October 28, 2002 1:10 PM
 To: Ant Users List
 Subject: Re: why does an ant task not work!

  The directory structure:
  --components--
  |
  |a--
  | |---abuild.xml
  |
  |b
  | |---bbuild.xml
 
 
 In abuild.xml:
ant dir=${b.home}/src target=core/
 but your directory structure is:
   |b
   | |---bbuild.xml
 Where is src? Or the directory structure is below?:
   ../b/
src/bbuild.xml

 In general, the problem is related with directory structure.
 Can you send most simplest environment which
 includes directory structure as attachment.

   - Original Message -
   From: ZHAO,YUN (HP-China,ex2)
   To: List, Ant Users (E-mail)
   Sent: Sunday, October 27, 2002 7:11 PM
   Subject: why does an ant task not work!

   Running java org.apache.tools.ant.Main -buildfile bbuild.xml command
 will be ok!
   Running java org.apache.tools.ant.Main -buildfile abuild.xml command
 will fail if the the previous command hasn't been ran!

   --project a's abuild.xml
   project name=a default=core basedir=./
target name=init
   property name=a.src ../
   property name=a.build ../
   ...
/target

target name=components depends=init
!-- the following task won't work --
ant dir=${b.home}/src target=core/
/target

target name=compile depends=components
copy ...
   !-- copy ${b.home}/build/classes directory's *.class to the
 ${a.build} directory--
/copy
javac src=${a.src} dest=${a.build} classpath=${a.build}/
/target

 target name=core depends=compile
   /project

   --project b's bbuild.xml
   project name=b default=core basedir=.
target name=init
property name=b.classpath
 value=../lib/castor.jar:${java.class.path}/
   ...
/target

target name=compile depends=init
!-- if the core target is called from abuild.xml's components
 target,
 the ant will say that it can't find the classes which is
 located in the castor.jar jar file --
javac classpath=${b.classpath} dest=${b.home}/build/classes
 .../
/target

   target name=core depends=compile
   /project

 
 --

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

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

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


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




RE: why does an ant task not work!

2002-10-28 Thread ZHAO,YUN (HP-China,ex2)
en.. it don't work ,too! 
Thank you!

Regards

-Original Message-
From: Laurence Mastrorillo [mailto:mastrori;medias.cnes.fr]
Sent: Monday, October 28, 2002 4:42 PM
To: Ant Users List
Subject: Re: why does an ant task not work!


try ant dir=${b.home}/src target=core inheritAll=false/
LM

ZHAO,YUN (HP-China,ex2) a écrit :

 Sorry for a mistake about the directory structure in the previous email!

 But i don't think it is a problem with directory structure.
 because abuild.xml 's components target
  (  target name=components depends=init
!-- the following task won't work --
ant dir=${b.home}/src target=core/
/target
 )
 will lead bbuild.xml's target core to running.
 The problem is when the build process gets the bbuild.xml's target
compile,
 the javac task tell me that it can't find some classes in the castor.jar
 jarfile,
 which i have defined in the task javac's classpath attribute and if i
build
 project b independently  with ant, it will work fine--it can find the
 classes in the castor.jar jarfile.

 components\a
 components\a\src
 components\a\src\abuild.xml

 components\b
 components\b\src
 components\b\src\bbuild.xml

 Regards

 -Original Message-
 From: sunyj [mailto:sunyj;adtec.com.cn]
 Sent: Monday, October 28, 2002 1:10 PM
 To: Ant Users List
 Subject: Re: why does an ant task not work!

  The directory structure:
  --components--
  |
  |a--
  | |---abuild.xml
  |
  |b
  | |---bbuild.xml
 
 
 In abuild.xml:
ant dir=${b.home}/src target=core/
 but your directory structure is:
   |b
   | |---bbuild.xml
 Where is src? Or the directory structure is below?:
   ../b/
src/bbuild.xml

 In general, the problem is related with directory structure.
 Can you send most simplest environment which
 includes directory structure as attachment.

   - Original Message -
   From: ZHAO,YUN (HP-China,ex2)
   To: List, Ant Users (E-mail)
   Sent: Sunday, October 27, 2002 7:11 PM
   Subject: why does an ant task not work!

   Running java org.apache.tools.ant.Main -buildfile bbuild.xml command
 will be ok!
   Running java org.apache.tools.ant.Main -buildfile abuild.xml command
 will fail if the the previous command hasn't been ran!

   --project a's abuild.xml
   project name=a default=core basedir=./
target name=init
   property name=a.src ../
   property name=a.build ../
   ...
/target

target name=components depends=init
!-- the following task won't work --
ant dir=${b.home}/src target=core/
/target

target name=compile depends=components
copy ...
   !-- copy ${b.home}/build/classes directory's *.class to the
 ${a.build} directory--
/copy
javac src=${a.src} dest=${a.build}
classpath=${a.build}/
/target

 target name=core depends=compile
   /project

   --project b's bbuild.xml
   project name=b default=core basedir=.
target name=init
property name=b.classpath
 value=../lib/castor.jar:${java.class.path}/
   ...
/target

target name=compile depends=init
!-- if the core target is called from abuild.xml's
components
 target,
 the ant will say that it can't find the classes which is
 located in the castor.jar jar file --
javac classpath=${b.classpath} dest=${b.home}/build/classes
 .../
/target

   target name=core depends=compile
   /project



 --

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

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

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


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

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




RE: why does an ant task not work!

2002-10-28 Thread Wannheden, Knut
If the files really have the filenames abuild.xml and bbuild.xml, you'll
have to add the antfile attribute; like this:

  ant dir=${b.home}/src antfile=bbuild.xml target=core
   inheritAll=false/

--
knut

 -Original Message-
 From: ZHAO,YUN (HP-China,ex2) [mailto:yun.zhao;hp.com]
 Sent: Montag, 28. Oktober 2002 09:45
 To: 'Ant Users List'
 Subject: RE: why does an ant task not work!
 
 
 en.. it don't work ,too! 
 Thank you!
 
 Regards
 
 -Original Message-
 From: Laurence Mastrorillo [mailto:mastrori;medias.cnes.fr]
 Sent: Monday, October 28, 2002 4:42 PM
 To: Ant Users List
 Subject: Re: why does an ant task not work!
 
 
 try ant dir=${b.home}/src target=core inheritAll=false/
 LM
 
 ZHAO,YUN (HP-China,ex2) a écrit :
 
  Sorry for a mistake about the directory structure in the 
 previous email!
 
  But i don't think it is a problem with directory structure.
  because abuild.xml 's components target
   (  target name=components depends=init
 !-- the following task won't work --
 ant dir=${b.home}/src target=core/
 /target
  )
  will lead bbuild.xml's target core to running.
  The problem is when the build process gets the bbuild.xml's target
 compile,
  the javac task tell me that it can't find some classes in 
 the castor.jar
  jarfile,
  which i have defined in the task javac's classpath 
 attribute and if i
 build
  project b independently  with ant, it will work fine--it 
 can find the
  classes in the castor.jar jarfile.
 
  components\a
  components\a\src
  components\a\src\abuild.xml
 
  components\b
  components\b\src
  components\b\src\bbuild.xml
 
  Regards
 
  -Original Message-
  From: sunyj [mailto:sunyj;adtec.com.cn]
  Sent: Monday, October 28, 2002 1:10 PM
  To: Ant Users List
  Subject: Re: why does an ant task not work!
 
   The directory structure:
   --components--
   |
   |a--
   | |---abuild.xml
   |
   |b
   | |---bbuild.xml
  
  
  In abuild.xml:
 ant dir=${b.home}/src target=core/
  but your directory structure is:
|b
| |---bbuild.xml
  Where is src? Or the directory structure is below?:
../b/
 src/bbuild.xml
 
  In general, the problem is related with directory structure.
  Can you send most simplest environment which
  includes directory structure as attachment.
 
- Original Message -
From: ZHAO,YUN (HP-China,ex2)
To: List, Ant Users (E-mail)
Sent: Sunday, October 27, 2002 7:11 PM
Subject: why does an ant task not work!
 
Running java org.apache.tools.ant.Main -buildfile 
 bbuild.xml command
  will be ok!
Running java org.apache.tools.ant.Main -buildfile 
 abuild.xml command
  will fail if the the previous command hasn't been ran!
 
--project a's abuild.xml
project name=a default=core basedir=./
 target name=init
property name=a.src ../
property name=a.build ../
...
 /target
 
 target name=components depends=init
 !-- the following task won't work --
 ant dir=${b.home}/src target=core/
 /target
 
 target name=compile depends=components
 copy ...
!-- copy ${b.home}/build/classes directory's 
 *.class to the
  ${a.build} directory--
 /copy
 javac src=${a.src} dest=${a.build}
 classpath=${a.build}/
 /target
 
  target name=core depends=compile
/project
 
--project b's bbuild.xml
project name=b default=core basedir=.
 target name=init
 property name=b.classpath
  value=../lib/castor.jar:${java.class.path}/
...
 /target
 
 target name=compile depends=init
 !-- if the core target is called from abuild.xml's
 components
  target,
  the ant will say that it can't find the 
 classes which is
  located in the castor.jar jar file --
 javac classpath=${b.classpath} 
 dest=${b.home}/build/classes
  .../
 /target
 
target name=core depends=compile
/project
 
 
 --
 --
  --
 
--
To unsubscribe, e-mail:
 mailto:ant-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail:
 mailto:ant-user-help;jakarta.apache.org
 
  --
  To unsubscribe, e-mail:   
mailto:ant-user-unsubscribe;jakarta.apache.org
 For additional commands, e-mail: mailto:ant-user-help;jakarta.apache.org

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


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

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



RE: why does an ant task not work!

2002-10-28 Thread ZHAO,YUN (HP-China,ex2)
the true name is  build.xml!
i call it bbuild.xml in order to distinct it with abuild.xml in these
mails,
and i imply it in my pervious mails.

-Original Message-
From: Wannheden, Knut [mailto:knut.wannheden;paranor.ch]
Sent: Monday, October 28, 2002 6:51 PM
To: 'Ant Users List'
Subject: RE: why does an ant task not work!


If the files really have the filenames abuild.xml and bbuild.xml, you'll
have to add the antfile attribute; like this:

  ant dir=${b.home}/src antfile=bbuild.xml target=core
   inheritAll=false/

--
knut

 -Original Message-
 From: ZHAO,YUN (HP-China,ex2) [mailto:yun.zhao;hp.com]
 Sent: Montag, 28. Oktober 2002 09:45
 To: 'Ant Users List'
 Subject: RE: why does an ant task not work!
 
 
 en.. it don't work ,too! 
 Thank you!
 
 Regards
 
 -Original Message-
 From: Laurence Mastrorillo [mailto:mastrori;medias.cnes.fr]
 Sent: Monday, October 28, 2002 4:42 PM
 To: Ant Users List
 Subject: Re: why does an ant task not work!
 
 
 try ant dir=${b.home}/src target=core inheritAll=false/
 LM
 
 ZHAO,YUN (HP-China,ex2) a écrit :
 
  Sorry for a mistake about the directory structure in the 
 previous email!
 
  But i don't think it is a problem with directory structure.
  because abuild.xml 's components target
   (  target name=components depends=init
 !-- the following task won't work --
 ant dir=${b.home}/src target=core/
 /target
  )
  will lead bbuild.xml's target core to running.
  The problem is when the build process gets the bbuild.xml's target
 compile,
  the javac task tell me that it can't find some classes in 
 the castor.jar
  jarfile,
  which i have defined in the task javac's classpath 
 attribute and if i
 build
  project b independently  with ant, it will work fine--it 
 can find the
  classes in the castor.jar jarfile.
 
  components\a
  components\a\src
  components\a\src\abuild.xml
 
  components\b
  components\b\src
  components\b\src\bbuild.xml
 
  Regards
 
  -Original Message-
  From: sunyj [mailto:sunyj;adtec.com.cn]
  Sent: Monday, October 28, 2002 1:10 PM
  To: Ant Users List
  Subject: Re: why does an ant task not work!
 
   The directory structure:
   --components--
   |
   |a--
   | |---abuild.xml
   |
   |b
   | |---bbuild.xml
  
  
  In abuild.xml:
 ant dir=${b.home}/src target=core/
  but your directory structure is:
|b
| |---bbuild.xml
  Where is src? Or the directory structure is below?:
../b/
 src/bbuild.xml
 
  In general, the problem is related with directory structure.
  Can you send most simplest environment which
  includes directory structure as attachment.
 
- Original Message -
From: ZHAO,YUN (HP-China,ex2)
To: List, Ant Users (E-mail)
Sent: Sunday, October 27, 2002 7:11 PM
Subject: why does an ant task not work!
 
Running java org.apache.tools.ant.Main -buildfile 
 bbuild.xml command
  will be ok!
Running java org.apache.tools.ant.Main -buildfile 
 abuild.xml command
  will fail if the the previous command hasn't been ran!
 
--project a's abuild.xml
project name=a default=core basedir=./
 target name=init
property name=a.src ../
property name=a.build ../
...
 /target
 
 target name=components depends=init
 !-- the following task won't work --
 ant dir=${b.home}/src target=core/
 /target
 
 target name=compile depends=components
 copy ...
!-- copy ${b.home}/build/classes directory's 
 *.class to the
  ${a.build} directory--
 /copy
 javac src=${a.src} dest=${a.build}
 classpath=${a.build}/
 /target
 
  target name=core depends=compile
/project
 
--project b's bbuild.xml
project name=b default=core basedir=.
 target name=init
 property name=b.classpath
  value=../lib/castor.jar:${java.class.path}/
...
 /target
 
 target name=compile depends=init
 !-- if the core target is called from abuild.xml's
 components
  target,
  the ant will say that it can't find the 
 classes which is
  located in the castor.jar jar file --
 javac classpath=${b.classpath} 
 dest=${b.home}/build/classes
  .../
 /target
 
target name=core depends=compile
/project
 
 
 --
 --
  --
 
--
To unsubscribe, e-mail:
 mailto:ant-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail:
 mailto:ant-user-help;jakarta.apache.org
 
  --
  To unsubscribe, e-mail:   
mailto:ant-user-unsubscribe;jakarta.apache.org
 For additional commands, e-mail: mailto:ant-user-help;jakarta.apache.org

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

Re: why does an ant task not work!

2002-10-28 Thread sunyj
Hi, Zhao Yun.
   I think the best way to solve you problem is to send
a attachment including your test programs and directory
 structure to all.
   After all, some questions about Ant relates to native
ENV.

Sun Yongjing  
-
Sun Yongjing
International Software Cooperation Department
Advanced Digital Technology CO.,Ltd
Tel: (+86) 10-6870-0009 ext. 1037
Fax: (+86) 10-6870-0510
e-mail: [EMAIL PROTECTED]
-- 



Re: why does an ant task not work!

2002-10-27 Thread sunyj
Hi, Zhao Yun:
Are abuild.xml and bbuild.xml in the same directory? 
why not use commandline: ant.bat batch file or ant.sh shell?
Or send us more details about directory structure information.

Sun Yongjing
  - Original Message - 
  From: ZHAO,YUN (HP-China,ex2) 
  To: List, Ant Users (E-mail) 
  Sent: Sunday, October 27, 2002 7:11 PM
  Subject: why does an ant task not work!


  Running java org.apache.tools.ant.Main -buildfile bbuild.xml command will be ok!
  Running java org.apache.tools.ant.Main -buildfile abuild.xml command will fail if 
the the previous command hasn't been ran!

  --project a's abuild.xml
  project name=a default=core basedir=./
   target name=init
  property name=a.src ../
  property name=a.build ../
  ...
   /target

   target name=components depends=init
   !-- the following task won't work --
   ant dir=${b.home}/src target=core/
   /target

   target name=compile depends=components
   copy ... 
  !-- copy ${b.home}/build/classes directory's *.class to the ${a.build} 
directory-- 
   /copy
   javac src=${a.src} dest=${a.build} classpath=${a.build}/
   /target

target name=core depends=compile
  /project


  --project b's bbuild.xml
  project name=b default=core basedir=.
   target name=init
   property name=b.classpath value=../lib/castor.jar:${java.class.path}/
  ...
   /target

   target name=compile depends=init
   !-- if the core target is called from abuild.xml's components target, 
the ant will say that it can't find the classes which is located in 
the castor.jar jar file --
   javac classpath=${b.classpath} dest=${b.home}/build/classes .../
   /target

  target name=core depends=compile
  /project



--


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



RE: why does an ant task not work!

2002-10-27 Thread ZHAO,YUN (HP-China,ex2)
The directory structure:
--components--
|
|a--
|   |---abuild.xml  
|
|b  
|   |---bbuild.xml  


why not use commandline: ant.bat batch file or ant.sh shell?
   ant.bat  does the same thing at the lastjust runjava
org.apache.tools.ant.Main %1 %2 %3 %4!

Regards
-Original Message-
From: sunyj [mailto:sunyj;adtec.com.cn]
Sent: Monday, October 28, 2002 10:52 AM
To: Ant Users List
Subject: Re: why does an ant task not work!


Hi, Zhao Yun:
Are abuild.xml and bbuild.xml in the same directory? 
why not use commandline: ant.bat batch file or ant.sh shell?
Or send us more details about directory structure information.

Sun Yongjing
  - Original Message - 
  From: ZHAO,YUN (HP-China,ex2) 
  To: List, Ant Users (E-mail) 
  Sent: Sunday, October 27, 2002 7:11 PM
  Subject: why does an ant task not work!


  Running java org.apache.tools.ant.Main -buildfile bbuild.xml command
will be ok!
  Running java org.apache.tools.ant.Main -buildfile abuild.xml command
will fail if the the previous command hasn't been ran!

  --project a's abuild.xml
  project name=a default=core basedir=./
   target name=init
  property name=a.src ../
  property name=a.build ../
  ...
   /target

   target name=components depends=init
   !-- the following task won't work --
   ant dir=${b.home}/src target=core/
   /target

   target name=compile depends=components
   copy ... 
  !-- copy ${b.home}/build/classes directory's *.class to the
${a.build} directory-- 
   /copy
   javac src=${a.src} dest=${a.build} classpath=${a.build}/
   /target

target name=core depends=compile
  /project


  --project b's bbuild.xml
  project name=b default=core basedir=.
   target name=init
   property name=b.classpath
value=../lib/castor.jar:${java.class.path}/
  ...
   /target

   target name=compile depends=init
   !-- if the core target is called from abuild.xml's components
target, 
the ant will say that it can't find the classes which is
located in the castor.jar jar file --
   javac classpath=${b.classpath} dest=${b.home}/build/classes
.../
   /target

  target name=core depends=compile
  /project




--


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

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




Re: why does an ant task not work!

2002-10-27 Thread sunyj
 The directory structure:
 --components--
 |
 |a--
 | |---abuild.xml 
 |
 |b 
 | |---bbuild.xml 
 
 
In abuild.xml:
   ant dir=${b.home}/src target=core/
but your directory structure is:
  |b 
  | |---bbuild.xml
Where is src? Or the directory structure is below?: 
  ../b/ 
   src/bbuild.xml

In general, the problem is related with directory structure.
Can you send most simplest environment which
includes directory structure as attachment.



Re: why does an ant task not work!

2002-10-27 Thread sunyj

Hi, Everyone,

I'm trying to get ejb-client-jar's value from test.xml, So i use Ant xmlproperty
task. 
My build file is very simple and as following:

?xml version=1.0 encoding=UTF-8?
project basedir=. default=xmltest name=test
  target name=xmltest
xmlproperty 
collapseAttributes=true 
file=test.xml 
keeproot=false 
prefix=ejb-jar
/xmlproperty
echo message=${ejb-jar.ejb-client-jar}/
  /target
/project

test.xml is below. Tag ejb-client-jar value is This is a test for xmlproperty task:

?xml version=1.0?

!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN' 
'http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd'
ejb-jar
ejb-client-jarThis is a test for xmlproperty task/ejb-client-jar
/ejb-jar


If my machine is online, the task can work fine. It can output message:
This is a test for xmlproperty task. But offline, it can not work and 
error message is following:

Buildfile: build.xml

xmltest:

BUILD FAILED
file:C:/isrlm/rlm_v2/wizard/dist/build1.xml:9: java.net.UnknownHostException: 
java.sun.com

The reason should be that task xmlproperty can not get dtd from location
http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd.  But my machine must be offline
. I want to get dtd file at local directory but task xmlproperty can not nest 
dtd task.
How i can do?

Thanks in advance.

Sun Yong jing