Community
Participate
Working Groups
i am creating a small plugin containing an ant task and thus extending org.eclipse.ant.core.antTasks the extension point apprently requires a library, but it is not clear where that should come from. the code defining the task is _inside_ the plugin, there's no external library involved! "launching an Eclipse application" does not list my task in window->preferences->ant->runtime and on the console a message appears: !ENTRY org.eclipse.ant.core 4 3 2011-04-07 10:17:15.406 !MESSAGE The library "lib/myanttasks.jar" specified from "MyAntTasksPlugin" for the antTasks or antTypes extension does not exist ("lib/myanttasks.jar" is the last attempt, i tried otheres too, but nothing worked). when creating the plugin, the wizard specifically asked if the plugin will contain java code -- so i expect the code to be packed into an jar or whatever and made available, if necessary, w/o any interference by me! -- Configuration Details -- Product: Eclipse 1.3.2.20110218-0812 (org.eclipse.epp.package.jee.product) Installed Features: org.eclipse.pde 3.6.2.r362_v20110203-7b7mFL2FET3dhHalh1iNZtL
Looks like the script for generating the task lib is missing. Please have a look at the tutorial at http://www.ibm.com/developerworks/rational/library/09/eclipsecustomanttasks/ You may also refer source code of 'org.eclipse.pde.api.tools' and verify if you have similar settings in place. For further doubts, you may reach out to Eclipse community at http://www.eclipse.org/forums/ I am closing this as WORKSFORME. But do feel free to reopen it if you are sure there is a problem with Eclipse not the configuration.
the ibm link was what i came from, but thanks. > Looks like the script for generating the task lib is missing. what script? imo, when using the pde wizard at least, everything needed should be in place already. sorry, but i can't follow you -- so far it still looks like a shortcoming of the pde to me.
(In reply to comment #2) > what script? imo, when using the pde wizard at least, everything needed should > be in place already. > The 'script' in question is the Ant project builder that you must create to actually build the library you specify in the extension point. For example, API Tools uses the following project builder to create our /lib/apitooling-ant.jar: http://dev.eclipse.org/viewcvs/viewvc.cgi/pde/apitools/org.eclipse.pde.api.tools/.externalToolBuilders/Build%20Api%20Tools%20Ant%20Support%20Jar.launch?view=markup and the source of the Ant buildfile the project builder runs: http://dev.eclipse.org/viewcvs/viewvc.cgi/pde/apitools/org.eclipse.pde.api.tools/scripts/buildApiToolsAntSupportJar.xml?view=markup > when creating the plugin, the wizard specifically asked if the plugin will > contain java code -- so i expect the code to be packed into an jar or whatever > and made available, if necessary, w/o any interference by me! The class file(s) for the Ant task do get placed in your bundle (with the other class file(s)), but *you* have to build the jar file for the external Ant task support location yourself - i.e. the 'library' path you enter for the antTask extension point. Here are some useful help topics: 1. about the need for the extra jar and some other tidbits: http://help.eclipse.org/helios/index.jsp?topic=/org.eclipse.platform.doc.isv/guide/ant_contributing_task.htm 2. about project builders: http://help.eclipse.org/helios/topic/org.eclipse.platform.doc.user/gettingStarted/qs-92_project_builders.htm 3. about creating an Ant project builder: http://help.eclipse.org/helios/index.jsp?topic=/org.eclipse.platform.doc.user/gettingStarted/qs-93_project_builder.htm
ok, read those links and it somehow makes more sense now. i still see two issues, at least. - the library configured should be included in the export by default ("Export deployable plug-ins and fragments"), it took me a moment to realize i have to manually check that in the "Build Configuration" (the export wizard does ot make mention of that nor does it allow to configure there) - the infrastructure described in the links (separate source/output folders, build file, builder) should be easily set up by an example project created by the "Plug-In Project" wizard like is done for other plug-in types. at least the information necessary should be made available somehow, i've written one or two plug-ins already and it wasn't that complicated, so i expected the ant task plugin to be likewise straight forward (more or less). is it possible to make this report into an enhancement request, respective is it sensible at all to request such an enhancement?
(In reply to comment #4) > > is it possible to make this report into an enhancement request, respective is > it sensible at all to request such an enhancement? There really isn't anything to enhance, the PDE manifest editor cannot be customized to do any of the work for you and the export wizard would have no idea how you wanted to build the task jar - without you telling it via some kind of build script. I think the best bet here is that documentation for the antTasks extension point should be updated to point to the resources I mentioned, so contributors can immediately find help. Shipping over to platform Ant and changing the description and reopening.
Created attachment 195275 [details] fix the patch adds some information to the example section of the antTasks extension schema that refers users to the help topics I mentioned in comment #3
Curtis please review the patch
Changes look good to me. It is easy to look up the help topics using the search function.
applied to HEAD