Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[platform-ant-dev] Impossible to contribute custom Ant task from plugin fragment

Hi.

I've created a plugin with simple Ant task. The I did all the things needed to make Eclipse's Ant understand my custom task. Everything worked fine.

Then I've created a plugin fragment, attached it to org.eclipse.pde.core (I need to use internal classes). Did all the things I did earlier, but Ant didn't want to see my contributed task.

Then I've downloaded org.eclipse.ant.core sources and debugged a little through them. I've found the problem in class org.eclipse.ant.core.AntCorePreferences, method configureAntObject.

Here we have such code:

Bundle bundle = Platform.getBundle(contributor.getName());
URL url = "">
which throws an exception, because my library (jar which contains Ant task) is on fragment's classpath, not on host's classpath. As I understood, fragments don't contribute their classpathes to host, and this code is made to search hosts classpath.

How can I overcome this issue?

Thanks.


ps I've included sample fragment plugin in attachment.

Attachment: test.zip
Description: Zip archive


Back to the top