multiple Ant build files and classpath problems

N

Nick de Graeve

I seem to have problems when I want to pass classpath references to
delegating build scripts.

I have a master build file with a properties file, several classpath
definitions and targets.
Excerpt:

<target name="plugin">
<ant dir="${plugin.dir}" inheritrefs="true"></ant>
</target>
<path id="compile.classpath"> ... </path>

The plugin has its own build and properties file.
Excerpt:
<target name="compile-src" >
<javac srcdir="${src.dir}" destdir="${bin.dir}" >
<classpath refid="compile-src.classpath"></classpath>
</javac>
</target>
<path id="compile-src.classpath">
<path refid="compile.classpath" />
...
</path>

When I run it, I get:

nokeos@js002:~/testing/cruise/checkout/code$ ant test-build.xml testing
Buildfile: build.xml does not exist!
Build failed
nokeos@js002:~/testing/cruise/checkout/code$ ant -f test-build.xml
testing
Buildfile: test-build.xml

testing:

compile-src:
[javac] Compiling 4 source files to
/home/nokeos/testing/cruise/checkout/code/plugins/bin

BUILD FAILED
/home/nokeos/testing/cruise/checkout/code/test-build.xml:279: The
following error occurred while executing this line:
/home/nokeos/testing/cruise/checkout/code/plugins/build.xml:26:
Reference compile.classpath not found.

Total time: 2 seconds


I can't figure out what I'm doing wrong.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,982
Messages
2,570,190
Members
46,736
Latest member
zacharyharris

Latest Threads

Top