Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Plugin supplies global ant property, but build.xml doesn't see it
Plugin supplies global ant property, but build.xml doesn't see it [message #334865] Wed, 04 March 2009 19:56 Go to next message
Eli Bingham is currently offline Eli BinghamFriend
Messages: 2
Registered: July 2009
Junior Member
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
Re: Plugin supplies global ant property, but build.xml doesn't see it [message #334866 is a reply to message #334865] Wed, 04 March 2009 21:23 Go to previous message
Eli Bingham is currently offline Eli BinghamFriend
Messages: 2
Registered: July 2009
Junior Member
Never mind. It turns out I had to check the "run in same JRE as
workspace" option in order for this to work.
Previous Topic:Login Required for feature update/install?
Next Topic:Common Navigator tutorial
Goto Forum:
  


Current Time: Sat Apr 27 02:22:57 GMT 2024

Powered by FUDForum. Page generated in 0.02385 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top