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}/local.properties"/>
<!-- Load build properties -->
<property file="${basedir}/build.properties"/>
<!-- Import common build infrastructure -->
<import file="${common.build.xml}"/>
</project>
Essentially, all of the work of my project's build is done by the
"common.build.xml" file, so that I can share build infrastructure
between projects. In the local.properties file, I have specified:
common.build.dir=/home/mike/work/eclipse/common-build
.. This is done in local.properties, so that different users can
determine where they want to put the common build project themselves.
and in the build.properties file, I have this property:
common.build.xml=${common.build.dir}/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 ${common.build.dir}/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
local.properties file when it is parsing the build.properties file; it's
as if the local.properties variables are just not being set at all.
I have tried putting the
"common.build.dir=/home/mike/work/eclipse/common-build" in the
build.properties file, before the "common.build.xml" 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
command-line.
Thanks,
Mike Shea.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@ant.apache.org
For additional commands, e-mail: user-h...@ant.apache.org