ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Shea <>
Subject Ant 1.8.0rc1 + Eclipse
Date Wed, 03 Feb 2010 22:50:29 GMT
Hi folks,

I am encountering a strange problem trying to use ant-1.8.0rc1 in 
Eclipse. My build works fine from the command-line, but the Eclipse Ant 
Editor and Ant View is not interpreting it correctly, so I can't run my 
ant builds from Eclipse (it thinks the file is not valid, so it can't 
display the ant targets for me to click on).

I'm not sure if this is an Ant bug or an Eclipse bug, but since 
ant-1.7.1 is working just fine for me in Eclipse, I will post to this 
mailing list first =).

Here is my build.xml file:

<project name="project" basedir="." 
xmlns:ivy="antlib:org.apache.ivy.ant" default="cruisecontrol">
    <!--  Load local properties -->
    <property file="${basedir}/"/>
    <!--  Load build properties -->
    <property file="${basedir}/"/>
    <!-- Import common build infrastructure -->
    <import file="${}"/>

Essentially, all of the work of my project's build is done by the 
"" file, so that I can share build infrastructure 
between projects. In the file, I have specified:
.. This is done in, so that different users can 
determine where they want to put the common build project themselves.

and in the file, I have this property:${}/build.xml
... This way, we pick up the file, so that we can import it in the 
project-specific build.xml file.

Unfortunately, the Eclipse IDE is complaining to me about the <import> 
directive. It says:

Cannot find ${}/build.xml imported from [path to my 
project build.xml file].

This looks to me like it is failing to apply the properties from the file when it is parsing the file; it's 
as if the variables are just not being set at all.

I have tried putting the 
"" in the file, before the "" property, and this 
works. If I do this, the Eclipse errors go away, and I can use my build 
in the IDE. But this is not a tenable solution, since that file gets 
committed, and everyone who uses it will have a different path that they 
need to specify.

Any ideas? Like I said, I don't know if this is Eclipse's problem, or 
Ant's problem. The build works just fine when I run it from the 


Mike Shea.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message