Return-Path: Delivered-To: apmail-jakarta-ant-user-archive@apache.org Received: (qmail 82889 invoked from network); 27 Oct 2002 11:11:48 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 27 Oct 2002 11:11:48 -0000 Received: (qmail 11725 invoked by uid 97); 27 Oct 2002 11:12:34 -0000 Delivered-To: qmlist-jakarta-archive-ant-user@jakarta.apache.org Received: (qmail 11676 invoked by uid 97); 27 Oct 2002 11:12:33 -0000 Mailing-List: contact ant-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list ant-user@jakarta.apache.org Received: (qmail 11664 invoked by uid 98); 27 Oct 2002 11:12:32 -0000 X-Antivirus: nagoya (v4218 created Aug 14 2002) Message-ID: From: "ZHAO,YUN (HP-China,ex2)" To: "List, Ant Users (E-mail)" Subject: why does an ant task not work! Date: Sun, 27 Oct 2002 19:11:35 +0800 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2656.59) Content-Type: multipart/mixed; boundary="----=_NextPartTM-000-7141f704-b965-440f-835f-f4472fdf0c92" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N ------=_NextPartTM-000-7141f704-b965-440f-835f-f4472fdf0c92 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C27DA9.9C9EC0F0" ------_=_NextPart_001_01C27DA9.9C9EC0F0 Content-Type: text/plain; charset="iso-8859-1" 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 b's bbuild.xml ... ------_=_NextPart_001_01C27DA9.9C9EC0F0 Content-Type: text/html; charset="iso-8859-1"
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>
 
------_=_NextPart_001_01C27DA9.9C9EC0F0-- ------=_NextPartTM-000-7141f704-b965-440f-835f-f4472fdf0c92 Content-Type: text/plain; charset=us-ascii -- To unsubscribe, e-mail: For additional commands, e-mail: ------=_NextPartTM-000-7141f704-b965-440f-835f-f4472fdf0c92--