Plugin supplies global ant property, but build.xml doesn't see it [message #334865] |
Wed, 04 March 2009 14:56  |
Eclipse User |
|
|
|
Hi there,
I'm developing a plugin under Eclipse 3.4.1, build id M20080911-1700. Dev
environment is OSX 10.5.6, plugin will run under Windows XP or OSX.
I've added a global ant property using the
org.eclipse.ant.core.antProperties extension point, like so:
<extension point="org.eclipse.ant.core.antProperties">
<antProperty name="foo.home"
class="com.foo.FooHomeAntPropertyProvider" />
</extension>
where com.foo.FooHomeAntPropertyProvider implements
IAntPropertyValueProvider and defines getAntPropertyValue as:
private static final String FOO_HOME = "foo.home";
public String getAntPropertyValue(String key) {
String fooHome = null;
if (key.equals(FOO_HOME)) {
IPreferenceStore store = Activator.getDefault().getPreferenceStore();
fooHome = store.getString(PreferenceConstants.FOO_INSTALL_PATH);
}
return fooHome;
}
When I look at the global ant properties in the preferences panel of an
Eclipse that is running the plugin, I can see the correct value being
supplied to Eclipse - i..e, foo.home is visible, provided by my plugin,
and has the correct value that is set in the preferences. However, when I
execute a build.xml file using "Run As --> Ant Build," it doesn't see the
property. Anything that refers to the property blows up. This is also
true of the eclipse.home property, which is a global property supplied by
default rather than by my plugin. However, if I set the the property by
hand using the project's any properties, it sees it just fine.
Any thoughts here? I'm really blocked and Google is not helping. Thanks!
-Eli
|
|
|
|
Powered by
FUDForum. Page generated in 0.05741 seconds