You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Laran Evans <lc...@cornell.edu> on 2004/07/13 16:58:09 UTC
Duplicate target names
Can anyone explain this trace to me? I'd be happy to provide the build
files involved if needed.
Start Trace ---
C:\dev\home\dfaFinSys\project\travel_web>ant -v compile
Apache Ant version 1.6.1 compiled on February 12 2004
Buildfile: build.xml
Detected Java version: 1.4 in: C:\j2sdk1.4.2_04\jre
Detected OS: Windows XP
parsing buildfile C:\dev\home\dfaFinSys\project\travel_web\build.xml
with URI =
file:///C:/dev/home/dfaFinSys/project/travel_web/build.xml
Project base dir set to: C:\dev\home\dfaFinSys\project\travel_web
[property] Loading C:\Documents and Settings\Evans\ant.properties
[property] Unable to find property file: C:\Documents and
Settings\Evans\ant.properties
[property] Loading
C:\dev\home\dfaFinSys\project\travel_web\build.properties
[property] Loading C:\dev\home\dfaFinSys\project\build-master.properties
Importing file ../build-master.xml from
C:\dev\home\dfaFinSys\project\travel_web\build.xml
parsing buildfile C:\dev\home\dfaFinSys\project\build-master.xml with URI =
file:///C:/dev/home/dfaFinSys/project/build-master.xml
Overriding previous definition of reference to dfa_project.dependencies
[property] Loading Environment env.
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
with URI =
file:///C:/dev/home/dfaFinSys/project/travel_web/build.xml
Project base dir set to: C:\dev\home\dfaFinSys\project\travel_web
[property] Loading C:\Documents and Settings\Evans\ant.properties
[property] Unable to find property file: C:\Documents and
Settings\Evans\ant.properties
[property] Loading
C:\dev\home\dfaFinSys\project\travel_web\build.properties
[property] Loading C:\dev\home\dfaFinSys\project\build-master.properties
Importing file ../build-master.xml from
C:\dev\home\dfaFinSys\project\travel_web\build.xml
parsing buildfile C:\dev\home\dfaFinSys\project\build-master.xml with URI =
file:///C:/dev/home/dfaFinSys/project/build-master.xml
Overriding previous definition of reference to dfa_project.dependencies
[property] Loading Environment env.
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'.
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:368)
at org.apache.tools.ant.taskdefs.SubAnt.execute(SubAnt.java:182)
at org.apache.tools.ant.taskdefs.SubAnt.execute(SubAnt.java:112)
at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:301)
at org.apache.tools.ant.Target.performTasks(Target.java:328)
at org.apache.tools.ant.Project.executeTarget(Project.java:1215)
at org.apache.tools.ant.Project.executeTargets(Project.java:1063)
at org.apache.tools.ant.Main.runBuild(Main.java:632)
at org.apache.tools.ant.Main.startAnt(Main.java:183)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:197)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:56)
Total time: 1 second
C:\dev\home\dfaFinSys\project\travel_web>
Stop Trace ----
Thanks in advance,
Laran Evans
Senior Programmer/Analyst
Cornell University Division of Financial Affairs
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: Duplicate target names
Posted by Laran Evans <lc...@cornell.edu>.
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 <lc...@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 <yy...@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
>
>
>
Re: Duplicate target names
Posted by Yuji Yamano <yy...@kt.rim.or.jp>.
On Tue, 13 Jul 2004 10:58:09 -0400,
Laran Evans <lc...@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 <yy...@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