Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 32140 invoked from network); 13 Jul 2004 18:31:11 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 13 Jul 2004 18:31:11 -0000 Received: (qmail 19602 invoked by uid 500); 13 Jul 2004 18:31:02 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 19562 invoked by uid 500); 13 Jul 2004 18:31:01 -0000 Mailing-List: contact user-help@ant.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 user@ant.apache.org Received: (qmail 19549 invoked by uid 99); 13 Jul 2004 18:31:01 -0000 X-ASF-Spam-Status: No, hits=3.2 required=10.0 tests=FROM_ENDS_IN_NUMS,HTML_20_30,HTML_MESSAGE,HTML_TITLE_EMPTY,LINES_OF_YELLING,LINES_OF_YELLING_2,LINES_OF_YELLING_3,MAILTO_TO_SPAM_ADDR X-Spam-Check-By: apache.org Received: from [132.236.56.21] (HELO postoffice6.mail.cornell.edu) (132.236.56.21) by apache.org (qpsmtpd/0.27.1) with ESMTP; Tue, 13 Jul 2004 11:30:57 -0700 Received: from [132.236.36.80] ([132.236.36.80]) by postoffice6.mail.cornell.edu (8.12.10/8.12.6) with ESMTP id i6DIUnF0002396 for ; Tue, 13 Jul 2004 14:30:50 -0400 (EDT) Message-ID: <40F42A5C.7060309@cornell.edu> Date: Tue, 13 Jul 2004 14:30:52 -0400 From: Laran Evans Reply-To: lc278@cornell.edu Organization: Cornell University User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040616 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Ant Users List Subject: Re: Duplicate target names References: <40F3F881.2090602@cornell.edu> <20040714.014203.57969506.yyamano@kt.rim.or.jp> In-Reply-To: <20040714.014203.57969506.yyamano@kt.rim.or.jp> Content-Type: multipart/mixed; boundary="------------080200090009030006000607" X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N --------------080200090009030006000607 Content-Type: multipart/alternative; boundary="------------050808060209060805050305" --------------050808060209060805050305 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Thanks Yuji. I've been trying to explain my situation over the last few days. Maybe I'll get it right this time. I have a master build file (build-master.xml) and one build file for each project. I have define all of my targets in build-master.xml. In each project build.xml I define what other projects that project depends upon. Each project build.xml imports build-master.xml. The "compile" target depends on the "dependencies" target (both targets are defined in build-master.xml). The dependencies target checks what other projects the current project depends upon. It then compiles and jars that project to make it's jar file available for the current project so that it can compile. This will ONLY work if I can call targets recursively. Since, however the dependencies target is defined only once in the build-master.xml file it will always be called recursively. Each time it's called however it's called with different properties that cause it to build differently. I realize that this may sound complicated. It's basically an inverse tree with dependencies among the different leaves. I've attached the build-master.xml and the project build.xml file to perhaps make my effort more clear. In looking at the build files it might be easier to understand if you know my directory structure. projects/ projects/build-master.xml projects/build-master.properties projects/datamodel projects/datamodel/build.xml projects/datamodel/build.properties projects/travel_web projects/travel_web/build.xml projects/travel_web/build.properties projects/travel projects/travel/build.xml projects/travel/build.properties projects/web projects/web/build.xml projects/web/build.properties Thanks. Yuji Yamano wrote: >On Tue, 13 Jul 2004 10:58:09 -0400, >Laran Evans wrote: > > > >>Can anyone explain this trace to me? I'd be happy to provide the build >>files involved if needed. >> >> > > > >>parsing buildfile C:\dev\home\dfaFinSys\project\travel_web\build.xml >> >> > > > >>Build sequence for target `compile' is [dependencies, compile] >>Complete build sequence is [dependencies, compile, setup-workspace, >>init, clean, >>jar, war, ] >> >> > > > >>dependencies: >> [subant] calling target jar in build file >>C:\dev\home\dfaFinSys\project\travel_web\build.xml >>parsing buildfile C:\dev\home\dfaFinSys\project\travel_web\build.xml >> >> > > > >>Build sequence for target `jar' is [dependencies, compile, jar] >>Complete build sequence is [dependencies, compile, jar, setup-workspace, >>init, >>clean, war, ] >> >>BUILD FAILED >>C:\dev\home\dfaFinSys\project\build-master.xml:145: subant task calling >>a target >>that depends on its parent target 'dependencies'. >> >> > >1. ant calls "compile" target in travel_web/build.xml. >2. "compile" target depends on "dependencies" target, > so "dependencies" target is called. >3. "dependencies" target calls "subant" task. >4. "subant" task calls "jar" target in the same build.xml. >5. "jar" target depends on "dependencies" target in the same build.xml, > then build failed to avoid infinite dependency loop. > >Hope this helps. > >-- Yuji Yamano > Loan me your funky mind. So I can play with it, > for nothing is good unless you play with it. --George Clinton > >--------------------------------------------------------------------- >To unsubscribe, e-mail: user-unsubscribe@ant.apache.org >For additional commands, e-mail: user-help@ant.apache.org > > > --------------050808060209060805050305 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit Thanks Yuji.

I've been trying to explain my situation over the last few days.  Maybe I'll get it right this time.

I have a master build file (build-master.xml) and one build file for each project.  I have define all of my targets in build-master.xml.  In each project build.xml I define what other projects that project depends upon.  Each project build.xml imports build-master.xml.  The "compile" target depends on the "dependencies" target (both targets are defined in build-master.xml).  The dependencies target checks what other projects the current project depends upon.  It then compiles and jars that project to make it's jar file available for the current project so that it can compile.

This will ONLY work if I can call targets recursively.  Since, however the dependencies target is defined only once in the build-master.xml file it will always be called recursively.  Each time it's called however it's called with different properties that cause it to build differently.

I realize that this may sound complicated.  It's basically an inverse tree with dependencies among the different leaves.

I've attached the build-master.xml and the project build.xml file to perhaps make my effort more clear.

In looking at the build files it might be easier to understand if you know my directory structure.

projects/
projects/build-master.xml
projects/build-master.properties
projects/datamodel
projects/datamodel/build.xml
projects/datamodel/build.properties
projects/travel_web
projects/travel_web/build.xml
projects/travel_web/build.properties
projects/travel
projects/travel/build.xml
projects/travel/build.properties
projects/web
projects/web/build.xml
projects/web/build.properties

Thanks.

Yuji Yamano wrote:
On Tue, 13 Jul 2004 10:58:09 -0400,
Laran Evans <lc278@cornell.edu> wrote:

  
Can anyone explain this trace to me?  I'd be happy to provide the build 
files involved if needed.
    

  
parsing buildfile C:\dev\home\dfaFinSys\project\travel_web\build.xml 
    

  
Build sequence for target `compile' is [dependencies, compile]
Complete build sequence is [dependencies, compile, setup-workspace, 
init, clean,
jar, war, ]
    

  
dependencies:
    [subant] calling target jar in build file
C:\dev\home\dfaFinSys\project\travel_web\build.xml
parsing buildfile C:\dev\home\dfaFinSys\project\travel_web\build.xml 
    

  
Build sequence for target `jar' is [dependencies, compile, jar]
Complete build sequence is [dependencies, compile, jar, setup-workspace, 
init,
clean, war, ]

BUILD FAILED
C:\dev\home\dfaFinSys\project\build-master.xml:145: subant task calling 
a target
that depends on its parent target 'dependencies'.
    

1. ant calls "compile" target in travel_web/build.xml.
2. "compile" target depends on "dependencies" target,
   so "dependencies" target is called.
3. "dependencies" target calls "subant" task.
4. "subant" task calls "jar" target in the same build.xml.
5. "jar" target depends on "dependencies" target in the same build.xml,
   then build failed to avoid infinite dependency loop.

Hope this helps.

-- Yuji Yamano <yyamano@kt.rim.or.jp>
  Loan me your funky mind. So I can play with it,
  for nothing is good unless you play with it. --George Clinton

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

  
--------------050808060209060805050305-- --------------080200090009030006000607 Content-Type: text/xml; name="build-master.xml" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="build-master.xml" --------------080200090009030006000607 Content-Type: text/plain; name="build-master.properties" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="build-master.properties" # Workspace Properties dfa_workspace.root =C:/dev/home/dfaFinSys dfa_workspace.lib =${dfa_workspace.root}/lib dfa_workspace.dist =${dfa_workspace.root}/build # Common Project Properties dfa_project.src =src dfa_project.lib =lib dfa_project.build =build dfa_project.compile =classes dfa_project.webroot =defaultroot --------------080200090009030006000607 Content-Type: text/xml; name="build.xml" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="build.xml" --------------080200090009030006000607 Content-Type: text/plain; name="build.properties" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="build.properties" # Specific Project Properties # The name of the Project. This name will be used for the .jar and .war # files for this project. i.e. the jar and war files will be named # ${dfa_project.name}.jar and $dfa_{project.name}.war respectively. dfa_project.name =travel_web # The base package for the project. Nothing not included in this package # will be included in the .jar or .war file for this project. Use slashes # instead of periods to indicate package separation. dfa_project.package =edu/cornell/finsys/web # The version of this project. This property will be used as part of the # filename for the .jar file built for this project. This could be mapped # to the name of the CVS project/project branch. dfa_project.version =1.0 --------------080200090009030006000607 Content-Type: text/plain; charset=us-ascii --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org --------------080200090009030006000607--