ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ZHAO,YUN (HP-China,ex2)" <yun.z...@hp.com>
Subject RE: why does an ant task not work!
Date Mon, 28 Oct 2002 08:45:15 GMT
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>


Mime
View raw message