1
votes

Basic task in does not work. I just want to include the Eclipse generated build.xml in my custom build file.

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project basedir="." name="rizotek_server">
    <include file="build.xml"/>
</project>

Both files are in the same directory.

I get exception. BUILD FAILED build_server.xml:3: Problem: failed to create task or type include Cause: The name is undefined. Action: Check the spelling. Action: Check that any custom tasks/types have been declared. Action: Check that any / declarations have taken place.

I looked at the Ant tutorials and I don't see any difference between the examples there and what I did. What am I doing wrong? Thanks everyone. Kirill.

3

3 Answers

2
votes

Import has a different result then include, and the way they work is quite different. So if you need include, then import may solve your problem or may not. That will depend on how you use it, but the two statements do very different things.

Besure that you're using a version of Ant that has support for include. It's probable that the version you're using doesn't. Include is only available in ant version 1.8.0 or later.

1
votes

try the import task e.g.

<!-- importing.xml -->
<project name="importing" basedir="." default="...">
<import file="${path_to_imported}/imported.xml"/>
</project>
0
votes

You have old version of Ant. I solved this problem by upgrading Ant.