This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 273325 - Ease wikitext ant tasks usage in Eclipse
Summary: Ease wikitext ant tasks usage in Eclipse
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: unspecified   Edit
Hardware: PC All
: P3 enhancement (vote)
Target Milestone: 1.2.0   Edit
Assignee: Chris Aniszczyk CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 286738 (view as bug list)
Depends on: 276085 302616
Blocks: 301297
  Show dependency tree
 
Reported: 2009-04-22 14:50 EDT by Alexander Kurtakov CLA
Modified: 2011-01-05 11:10 EST (History)
6 users (show)

See Also:


Attachments
The patch (135.10 KB, patch)
2009-04-22 14:51 EDT, Alexander Kurtakov CLA
no flags Details | Diff
Second version (1.32 KB, patch)
2009-04-23 16:16 EDT, Alexander Kurtakov CLA
greensopinion: iplog+
Details | Diff
mylyn/context/zip (1.18 KB, application/octet-stream)
2009-04-23 18:58 EDT, David Green CLA
no flags Details
org.eclipse.mylyn.wikitext.core.patch (133.61 KB, patch)
2009-07-13 13:14 EDT, Chris Aniszczyk CLA
no flags Details | Diff
org.eclipse.mylyn.wikitext.core.patch (139.43 KB, patch)
2009-07-13 13:43 EDT, Chris Aniszczyk CLA
no flags Details | Diff
org.eclipse.mylyn.wikitext.core.patch (141.71 KB, patch)
2009-08-21 12:06 EDT, Chris Aniszczyk CLA
no flags Details | Diff
a candidate plug-in (sources) (11.72 KB, application/octet-stream)
2009-08-21 22:44 EDT, David Green CLA
no flags Details
org.eclipse.mylyn.wikitext.core.patch (141.18 KB, patch)
2009-08-24 12:05 EDT, Chris Aniszczyk CLA
no flags Details | Diff
workspace preferences (169.07 KB, image/png)
2009-08-27 22:11 EDT, David Green CLA
no flags Details
external tool configuration (118.23 KB, image/png)
2009-08-27 22:12 EDT, David Green CLA
no flags Details
wikitext sdk javadoc builder patch (831 bytes, patch)
2009-08-27 22:25 EDT, David Green CLA
no flags Details | Diff
org.eclipse.mylyn.wikitext.core.patch (139.88 KB, patch)
2009-09-04 11:07 EDT, Chris Aniszczyk CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Kurtakov CLA 2009-04-22 14:50:48 EDT
Wikitext ant tasks should use org.eclipse.ant.core.antTasks and org.eclipse.ant.core.extraClasspathEntries extension points so these tasks can be freely used in Eclipse.
Attached patch is doing all the things to make the wikitext tasks available to ant editor completion and ant classpath is set so the tasks work.
The patch is doing the following:
1. Extract ant tasks to a separate src_ant source folder.
2. Adds a custom builder to build the ant tasks library.
3. Adds all tasks to the org.eclipse.ant.core.antTasks and the new library to the org.eclipse.ant.core.extraClasspathEntries extension points.
4. Other project settings changes needed.

This work is based on the org.eclipse.equinox.p2.publisher way of adding its ant tasks.
Comment 1 Alexander Kurtakov CLA 2009-04-22 14:51:32 EDT
Created attachment 132824 [details]
The patch
Comment 2 David Green CLA 2009-04-22 23:39:12 EDT
Thanks for the feature request and patch.
Is there a way to do this without having a separate jar and source folder for the Ant tasks?
Comment 3 Alexander Kurtakov CLA 2009-04-23 03:44:47 EDT
I don't know other way. I've looked at most p2 plugins and all of them are acting in this way. So even if it's not the cleanest way to do it, this should be a recognized pattern :).
Comment 4 David Green CLA 2009-04-23 15:17:27 EDT
I'm not sure that we can use the patch as-is.  One of the key requirements of the org.eclipse.mylyn.wikitext.core project is that it can be used as-is without an Eclipse runtime by putting it on a Java classpath.  Having jars inside the org.eclipse.mylyn.wikitext.core jar is a problem.

The way I see it is we have a couple of ways to move forward:
# the approach is modified such that the org.eclipse.mylyn.wikitext.core jar remains in its current form, or
# a new plug-in is created

What are your thoughts?
Comment 5 Alexander Kurtakov CLA 2009-04-23 16:16:24 EDT
Created attachment 133015 [details]
Second version
Comment 6 Alexander Kurtakov CLA 2009-04-23 16:19:19 EDT
I've attached a new patch that just modifies plugin.xml. It seems to work but looks a little hack-ish because library is mandatory and it is just setting it to the current folder.
I'm not sure whether this can cause some problems I haven't found. In case there are any problem I would be in favour of making a new plugin. 
Comment 7 David Green CLA 2009-04-23 16:50:38 EDT
(In reply to comment #6)
> I've attached a new patch that just modifies plugin.xml. It seems to work but
> looks a little hack-ish because library is mandatory and it is just setting it
> to the current folder.
> I'm not sure whether this can cause some problems I haven't found.

Nice, thanks!  I've posted the question to the JDT newsgroup.
Comment 8 David Green CLA 2009-04-23 17:35:33 EDT
BTW, for future please create workspace-relative patches.  They are much easier to apply.
Comment 9 David Green CLA 2009-04-23 18:58:28 EDT
reassigned to give Alexander credit
Comment 10 David Green CLA 2009-04-23 18:58:55 EDT
patch applied
Comment 11 David Green CLA 2009-04-23 18:58:57 EDT
Created attachment 133038 [details]
mylyn/context/zip
Comment 12 David Green CLA 2009-05-13 18:08:36 EDT
apparently the classpath hack only works when self-hosting.   See bug 276085
Comment 13 David Green CLA 2009-05-13 19:50:01 EDT
Unless we can workaround this classpath issue then I'm afraid that we'll have to remove this from 3.2.
From bug 276085 it appears as if org.eclipse.ant.core.extraClasspathEntries of '.' is not acceptable except in a self-hosted environment.
Comment 14 Olivier Thomann CLA 2009-05-13 20:00:46 EDT
You should put the ant task code into a separate output folder and built them into a separate jar file that is nested within the bundle jar file.
You can find example into the JDT/Core bundle or inside the API tooling bundle.
Let me know if you need more details.
Comment 15 Alexander Kurtakov CLA 2009-05-25 07:26:10 EDT
(In reply to comment #14)
> You should put the ant task code into a separate output folder and built them
> into a separate jar file that is nested within the bundle jar file.
> You can find example into the JDT/Core bundle or inside the API tooling bundle.
> Let me know if you need more details.

My first patch is doing exactly this but David said it's unacceptable because it prevents using wikitext outside of OSGi container. I'm really not sure what else can I do.
Comment 16 Vivien Tintillier CLA 2009-05-27 03:43:59 EDT
Didn't PDE build sole ths problem by using nested jars in a *folder* plugin, instead of a *jar* plugin?

As an everyday Ant user, I agree that is it is important for the Ant community to be able to run Eclipse ant tasks out of Equinox. I had the same problem with PDE API Tools Ant tasks, where ant tasks are in a nested jar: cannot be used in standalone Ant.

Thanks for the great Wiki Text anyway!
Comment 17 David Green CLA 2009-05-27 11:29:51 EDT
Thanks for the feedback.

I've been considering creating a WikiText IDE plug-in to address this issue and bug 273013.  Unfortunately it's a lot of work and would involve API breakage as per bug 273013 comment 4.  Something to consider for after the Mylyn 3.2 release.

What I was thinking is that the jars included in the WikiText stand-alone package would be included in the IDE plug-in.

Of course an alternative that would resolve this issue but not bug 273013 would be to submit a patch to the Ant plug-in that allows a plug-in jar itself to be the classpath contribution to Ant.

Whichever route we go, contributions in this area would be greatly appreciated.
Comment 18 Vivien Tintillier CLA 2009-05-28 08:05:25 EDT
(In reply to comment #14)
> You should put the ant task code into a separate output folder and built them
> into a separate jar file that is nested within the bundle jar file.
> You can find example into the JDT/Core bundle or inside the API tooling bundle.
> Let me know if you need more details.
> 

Is there any rational behind this? Why can't Ant tasks come into their own plugin. I guess the Ant tasks are not used by the core plugin, so why is this organization not possible? :
 - *.core plugin
 - *.anttasks plugin, that depends on *.core plugin
both without any nested jar. The plugin with Ant tasks would be a classic "POJO" jar with Equinox manifest.mf and plugin.xml.

But it seems a lot of project are using the nested jar way you describe, so we can hope there were good reasons for this, can't we? ;-)
Comment 19 David Green CLA 2009-05-28 12:12:02 EDT
(In reply to comment #18)
> Is there any rational behind this? Why can't Ant tasks come into their own
> plugin. I guess the Ant tasks are not used by the core plugin, so why is this
> organization not possible? :

Considering that the WikiText plug-in jars can be used directly by Ant without modification, there's no reason why this cannot be done.

I've created a feature request bug 278246
Comment 20 Chris Aniszczyk CLA 2009-07-13 13:14:44 EDT
Created attachment 141439 [details]
org.eclipse.mylyn.wikitext.core.patch

Here's an updated patch.
Comment 21 Chris Aniszczyk CLA 2009-07-13 13:43:46 EDT
Created attachment 141441 [details]
org.eclipse.mylyn.wikitext.core.patch

Here's an improved patch that adds a builder for the wikitext-ant.jar

I think this is good enough now to warrant further testing from the community that it meets their needs.
Comment 22 David Green CLA 2009-07-13 18:00:04 EDT
Chris, thanks for the excellent patch.  

Unfortunately the patch suffers from the same problem as previous patches: WikiText plug-in jars cannot be put on the Ant classpath because they contain nested jars.

In my opinion there's a lot of value in having the WikiText core bundle as a plain-old-jar which can be put on anyone's classpath both for Ant task usage and other stand-alone usage.  This is how WikiText has been packaged since day one; changing it not only breaks backward compatibility, it adds unnecessary complexity.  Unless there's a compelling reason to do otherwise it should stay that way.

As far as I can see the best way to move forward on this issue is either to fix bug 278246, or to provide an _additional_ WikiText bundle (@org.eclipse.mylyn.wikitext.ide.core@?) that provides Ant tasks in a nested jar.  That way the @org.eclipse.mylyn.wikitext.core@ bundle can remain in its current state, consumable by stand-alone WikiText users and Eclipse users alike.
Comment 23 Chris Aniszczyk CLA 2009-07-13 18:20:40 EDT
(In reply to comment #22)
> Chris, thanks for the excellent patch.  
> 
> Unfortunately the patch suffers from the same problem as previous patches:
> WikiText plug-in jars cannot be put on the Ant classpath because they contain
> nested jars.
> 
> In my opinion there's a lot of value in having the WikiText core bundle as a
> plain-old-jar which can be put on anyone's classpath both for Ant task usage
> and other stand-alone usage.  This is how WikiText has been packaged since day
> one; changing it not only breaks backward compatibility, it adds unnecessary
> complexity.  Unless there's a compelling reason to do otherwise it should stay
> that way.

I understand the needs for backwards compatibility here.

One compelling reason is that at its current state, wikitext is painful for people to use within the Eclipse . As a seasoned Eclipse developer, I was having issues in getting access to the ant tasks which I'm going. I'm used to things just being there as most Eclipse projects contribute their ant tasks for the ant.core extension points.

> As far as I can see the best way to move forward on this issue is either to fix
> bug 278246, or to provide an _additional_ WikiText bundle
> (@org.eclipse.mylyn.wikitext.ide.core@?) that provides Ant tasks in a nested
> jar.  That way the @org.eclipse.mylyn.wikitext.core@ bundle can remain in its
> current state, consumable by stand-alone WikiText users and Eclipse users
> alike.

Let me ponder this a bit.
Comment 24 Chris Aniszczyk CLA 2009-07-13 18:34:32 EDT
Off the top of my head, one option could be to have wikitext.core be unpacked and people need to add it to their classpath along with the wikitext-ant.jar to get the ant tasks. That may meet the standalone case... but that's two jars still :/

Another thing I'm looking at is if the ant.core extension points support platform URLs... 

   <extension
         point="org.eclipse.ant.core.extraClasspathEntries">
      <extraClasspathEntry
            library="platform:/plugin/org.apache.ant/lib/ant.jar">
      </extraClasspathEntry>
   </extension>

Something to that effect.
Comment 25 David Green CLA 2009-08-20 13:08:08 EDT
*** Bug 286738 has been marked as a duplicate of this bug. ***
Comment 26 David Carver CLA 2009-08-20 15:28:25 EDT
(In reply to comment #24)
> Off the top of my head, one option could be to have wikitext.core be unpacked
> and people need to add it to their classpath along with the wikitext-ant.jar to
> get the ant tasks. That may meet the standalone case... but that's two jars
> still :/
> 
> Another thing I'm looking at is if the ant.core extension points support
> platform URLs... 
> 
>    <extension
>          point="org.eclipse.ant.core.extraClasspathEntries">
>       <extraClasspathEntry
>             library="platform:/plugin/org.apache.ant/lib/ant.jar">
>       </extraClasspathEntry>
>    </extension>
> 
> Something to that effect.
> 

You might want to take a look at org.eclipse.wst.xsl.core and particularly the xinclude.jar.   The xinclude.jar file can be used within Eclipse or it can be used outside.

Works quitewell.

Chris the problem you have is that Eclipse is taking the wrong approach to it's usage of ant.   It's a build anti-pattern to have to depend on the IDE to build.  These documentation builds should not have to depend on Eclipse to build the docs.    There are many cases where eclipse ant tasks could be useful outside of eclipse-headless as standalone tasks that don't depend on eclipse.
Comment 27 Chris Aniszczyk CLA 2009-08-20 15:42:56 EDT
How does xinclude.jar get built? I don't see a builder for it.

How does this work in ant standalone without AntRunner?

If you provide details, maybe we can come to a good consensus on how to do this.
Comment 28 David Carver CLA 2009-08-20 16:21:08 EDT
(In reply to comment #27)
> How does xinclude.jar get built? I don't see a builder for it.
> 
> How does this work in ant standalone without AntRunner?
> 
> If you provide details, maybe we can come to a good consensus on how to do
> this.
> 

Right now I just export the jar, when I make a change to the Xinclude classes, and then include the jar in the lib.   If you configure and tweak your automated builds, you can create the necessary jar during the build process.

You then have two jars, one you include for the necessary Eclipse ANT integration in the lib.jar, and the other that is used external.

So in the case of wiki text, you have your standalone jars now, and the jars in the lib folder.  You may want a separate plugin for this and to keep it unpacked for easier access.  In ant standalone you use a TaskDef (TypeDef) to make the task available.

http://ant.apache.org/manual/CoreTasks/taskdef.html

<taskdef classpathref="wikitext.classpath" resource="org/eclipse/mylyn/wikitext/core/util/anttask/tasks.properties" />
	

The taskdef is a typdef which means it can take a classpath to point where to find the necessary jar.

<taskdef classpathref="wikitext.classpath" resource="org/eclipse/mylyn/wikitext/core/util/anttask/tasks.properties">
   <classpath location="path/to/jar/file"/>
   <classpath location="more/paths/to/jar/file"/>
</taskdef>
	
This way you get the best of both worlds, it running within eclipse, and available as a jar.

You could also point the external class to the appropriate plugins bin directory and reference the whole folder without refering to the jar.

Comment 29 Chris Aniszczyk CLA 2009-08-20 16:27:02 EDT
If I understand this, the class files that represent the Ant task will be duplicated, one in the standalone ant jar (in the lib directory) and one in the bundle jar itself?

If this is the case, I think we may have a winner.
Comment 30 David Carver CLA 2009-08-20 16:34:49 EDT
(In reply to comment #29)
> If I understand this, the class files that represent the Ant task will be
> duplicated, one in the standalone ant jar (in the lib directory) and one in the
> bundle jar itself?
> 
> If this is the case, I think we may have a winner.
> 

That is correct, or you could just keep the bundle unjarred, and access the wikitext.jar file in the lib directory of the bundle directly from the standalone ant instance.

Comment 31 David Carver CLA 2009-08-20 16:47:29 EDT
Just thought of one more option.

You will still need the lib directory and a jar in there, for Eclipse (why it requires this is beyond me), but you could just distribute the bundle jars, and reference those from standalone ant. 

Just create the taskdef and add the bundles to the classpath.  Should work just the same.  After all a bundle is just a jar with some manifest info.

Comment 32 David Green CLA 2009-08-20 18:51:31 EDT
(In reply to comment #31)
> After all a bundle is just a jar with some manifest info.

YES!! WikiText stand-alone simply uses the bundles as jars on the classpath.  Simple and easy.
 
> You will still need the lib directory and a jar in there, for Eclipse (why it
> requires this is beyond me)

Agreed.  I've filed bug 278246 against Eclipse.  From the bug:

bq. several people watching but very little to no enhancement work planned for Platform Ant.

Committers seem unwilling to work on it.

> Just create the taskdef and add the bundles to the classpath.  Should work just
> the same.  After all a bundle is just a jar with some manifest info.

That is how WikiText is intended to be used: stand-alone (without Eclipse) using taskdefs.
See http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse.mylyn.wikitext.help.ui/help/Markup-Conversion.html
Comment 33 David Carver CLA 2009-08-20 20:53:02 EDT
All the eclipse extension point really does is add a taskdef to the lib.  The wikitext jars could be added to a customTarget in a pde build, with the necessary task def, and made available with a reference where they can be found.

The extension point just provides a convience method to create the necessary taskdef.
Comment 34 Chris Aniszczyk CLA 2009-08-21 12:06:54 EDT
Created attachment 145285 [details]
org.eclipse.mylyn.wikitext.core.patch

An updated patch. The big changes are that the build.properties was updated to include src_ant in both the ant supporter jar and the bundle itself. Furthermore, the Eclipse-BundleShape header was added to the MANIFEST.MF to ensure that the bundle comes out in the directory shape instead of the jar shape. If there is a feature for wikitext.core, the feature should be updated to specify unpack=false

Now, you should be able to use both wikitext as standalone and within Eclipse.
Comment 35 Chris Aniszczyk CLA 2009-08-21 12:07:23 EDT
Let me know if this works for your David.
Comment 36 David Green CLA 2009-08-21 22:44:36 EDT
Created attachment 145328 [details]
a candidate plug-in (sources)

If I understand your patch correctly, the o.e.m.wikitect.core bundle jar could no longer be used as-is stand-alone.  That's a major issue, since it would affect existing users of Mylyn WikiText (they'd have to reconfigure their classpath).  For me that's a show-stopper.

I hate to beat this one to death, but how about the attached?  It involves creating a new bundle (plug-in) that contains the wikitext-ant.jar (which is why it can't be a patch).
Comment 37 Chris Aniszczyk CLA 2009-08-24 12:05:10 EDT
Created attachment 145446 [details]
org.eclipse.mylyn.wikitext.core.patch

An updated patch that removes the Eclipse-BundleShape header

This patch should have the bundle both work in standalone and within Eclipse. The only downside is the duplication of the ant task classes but that's something we live with to make things easier for Eclipse folks.
Comment 38 David Green CLA 2009-08-27 13:23:18 EDT
(In reply to comment #37)
> Created an attachment (id=145446)
> org.eclipse.mylyn.wikitext.core.patch

Thanks for your great work!
To be clear, any solution that involves nested jars in the wikitext.core bundle is not acceptable.  Nested jars _are_ okay if we're putting them in a new bundle, as suggested in comment #36.
Comment 39 Chris Aniszczyk CLA 2009-08-27 13:34:04 EDT
(In reply to comment #38)
> (In reply to comment #37)
> > Created an attachment (id=145446) [details]
> > org.eclipse.mylyn.wikitext.core.patch
> 
> Thanks for your great work!
> To be clear, any solution that involves nested jars in the wikitext.core bundle
> is not acceptable.  Nested jars _are_ okay if we're putting them in a new
> bundle, as suggested in comment #36.

Why wouldn't nested jars work? It shouldn't break anything existing... we are simply duplicating the ant classes in the new nested JAR. One of the cases that I view nested jars OK is this specific case we're dealing with. For example, look how a p2 bundle deals with ant tasks via a nested jar:

org.eclipse.equinox.p2.repository.tools
Comment 40 David Green CLA 2009-08-27 13:40:41 EDT
(In reply to comment #39)
> Why wouldn't nested jars work? It shouldn't break anything existing... we are

It's not that they won't work, it's that it breaks backward compatibility for users who are using the bundle as a normal jar on their classpath.

The nested jar solution looks like the way to go, however I don't want to see nested jars in any of the _existing_ *.wikitext.*core bundles.  I'm quite happy with nested jars as long as they are isolated to _new_ bundles.
Comment 41 Chris Aniszczyk CLA 2009-08-27 13:42:46 EDT
(In reply to comment #40)
> (In reply to comment #39)
> > Why wouldn't nested jars work? It shouldn't break anything existing... we are
> 
> It's not that they won't work, it's that it breaks backward compatibility for
> users who are using the bundle as a normal jar on their classpath.

How does it break backwards compatibility? Can you be specific, may I haven't had coffee this morning.
Comment 42 David Carver CLA 2009-08-27 14:01:07 EDT
Actually, I don't see how nested jars are going to break existing implementations.  The reason being is that when a standalone ant task is done, you just add the existing bundle jar with the nested jar in the lib folder included.  The nested jar isn't even refrenced by the ant task.  Existing users can still include the other bundle jars on the taskdef class path as necessary.

Comment 43 David Green CLA 2009-08-27 19:59:28 EDT
(In reply to comment #42)
> Actually, I don't see how nested jars are going to break existing
> implementations.  The reason being is that when a standalone ant task is done,
> you just add the existing bundle jar with the nested jar in the lib folder
> included. 

Exactly, that's the point: they'll have to change their classpath.  Currently all they need on their classpath is the bundle jars.  What you're proposing is that they also have to add the nested jar to their classpath.  I want to avoid such a burden unless there's a compelling reason to do otherwise.
Comment 44 David Carver CLA 2009-08-27 21:33:30 EDT
(In reply to comment #43)
> (In reply to comment #42)
> > Actually, I don't see how nested jars are going to break existing
> > implementations.  The reason being is that when a standalone ant task is done,
> > you just add the existing bundle jar with the nested jar in the lib folder
> > included. 
> 
> Exactly, that's the point: they'll have to change their classpath.  Currently
> all they need on their classpath is the bundle jars.  What you're proposing is
> that they also have to add the nested jar to their classpath.  I want to avoid
> such a burden unless there's a compelling reason to do otherwise.
> 

No, they just keep things as they are.  The nested Jar is only for internal eclipse headless mode, and the extension point.   Otherwise if it's used external they just use the bundle jars as is, as they are just jars.

Try it out, instead of using your standalone jars, replace them with the bundle jars instead.  Should still work the same.
Comment 45 David Green CLA 2009-08-27 21:42:40 EDT
I must have missed something.  Let me take another look.
Comment 46 David Green CLA 2009-08-27 22:09:13 EDT
Here's what I missed before: even though the classes in src_ant are compiled by the external Ant script and jarred as a nested jar, they are _also_ included in the bundle jar.  I've confirmed that this works by using the PDE manifest editor to export the bundle jar... it all seems to just work.

I did some testing with a self-hosted Eclipse instance, and the Ant editor picked up the WikiText tasks nicely, however when running the Ant build script I got the following:

pre. 
BUILD FAILED
/Users/dgreen/Documents/mine/runtime-mylyn.wikitext/test2/build.xml:4: Problem: failed to create task or type wikitext-to-html
Cause: The name is undefined.
Action: Check the spelling.
Action: Check that any custom tasks/types have been declared.
Action: Check that any <presetdef>/<macrodef> declarations have taken place.

What am I missing?  I looked at the classpath under Preferences->Ant->Runtime and the classpath entry was there -- however looking at the external tool configuration classpath I can't see the contributed jars.

And the last remaining question.... (drum roll) does this work with the headless build?
Comment 47 David Green CLA 2009-08-27 22:11:14 EDT
Created attachment 145881 [details]
workspace preferences

screenshot of my self-hosted Eclipse workspace preferences (Ant runtime)
Comment 48 David Green CLA 2009-08-27 22:12:58 EDT
Created attachment 145882 [details]
external tool configuration

I don't see the classpath contributions in the external tool configuration
Comment 49 David Green CLA 2009-08-27 22:23:53 EDT
btw, sorry this one has taken so long but it's important to get it right!
Comment 50 David Green CLA 2009-08-27 22:25:27 EDT
Created attachment 145883 [details]
wikitext sdk javadoc builder patch
Comment 51 David Green CLA 2009-08-27 22:26:11 EDT
btw, sorry this one has taken so long but it's important to get it right!
Comment 52 David Carver CLA 2009-08-27 22:48:32 EDT
(In reply to comment #46)
> pre. 
> BUILD FAILED
> /Users/dgreen/Documents/mine/runtime-mylyn.wikitext/test2/build.xml:4: Problem:
> failed to create task or type wikitext-to-html
> Cause: The name is undefined.
> Action: Check the spelling.
> Action: Check that any custom tasks/types have been declared.
> Action: Check that any <presetdef>/<macrodef> declarations have taken place.
> 
> What am I missing?  I looked at the classpath under Preferences->Ant->Runtime
> and the classpath entry was there -- however looking at the external tool
> configuration classpath I can't see the contributed jars.

Check on the JRE tab, to make sure that you have it checked to: "Use the SAME JRE as Eclipse" so that it picks up the ant tasks.  The tasks should show up on in Windows->Prefrences->Ant->Runtime->Tasks if the new plugin is installed with the patch

> 
> And the last remaining question.... (drum roll) does this work with the
> headless build?

I've tried this with ant standalone (no eclipse) and dropped the bundle jars in place of the existing standalone jars, and had to change one thing in build.  Apparently tasks.properties has been renamed wikitext-tasks.properties.   Once I changed that on my taskdef, everything ran fine.
Comment 53 David Green CLA 2009-08-28 10:56:11 EDT
Chris I'm ready to commit this patch with the following changes:

# change the copyright header of buildWikiTextAntSupportJar.xml to the standard one that mentions the EPL (including your name and EclipseSource is fine of course)
# rename wikitext-tasks.properties to tasks.properties and restore its original copyright header

Great work!
Comment 54 David Green CLA 2009-08-28 10:57:44 EDT
(In reply to comment #52)
> Check on the JRE tab, to make sure that you have it checked to: "Use the SAME
> JRE as Eclipse" so that it picks up the ant tasks.  The tasks should show up on
> in Windows->Prefrences->Ant->Runtime->Tasks if the new plugin is installed with
> the patch

Great tip!  It works!
Comment 55 Chris Aniszczyk CLA 2009-09-01 14:19:32 EDT
(In reply to comment #53)
> Chris I'm ready to commit this patch with the following changes:
> 
> # change the copyright header of buildWikiTextAntSupportJar.xml to the standard
> one that mentions the EPL (including your name and EclipseSource is fine of
> course)
> # rename wikitext-tasks.properties to tasks.properties and restore its original
> copyright header

Those changes work for me.

Commit away :)
Comment 56 Chris Aniszczyk CLA 2009-09-04 11:07:00 EDT
Created attachment 146509 [details]
org.eclipse.mylyn.wikitext.core.patch

Here's an updated patch c/o David's comments.
Comment 57 David Green CLA 2009-09-08 12:23:08 EDT
Just made the commit.  Thanks very much Chris and others for your contribution.
Assigning to Chris for credit.
Comment 58 David Green CLA 2010-01-29 15:59:32 EST
This change has introduced an issue running wikitext Ant tasks from within Eclipse in the same VM as the workbench.
Comment 59 Chris Aniszczyk CLA 2010-01-29 16:00:40 EST
I believe the solution is to unpack the jars as part of the build and we should all be good.
Comment 60 David Green CLA 2010-01-29 16:02:04 EST
I've tackled this one elsewhere and what I discovered is that the plug-in containing the ant tasks jar must not have any references to ant classes in the bundle classpath.
Comment 61 David Green CLA 2010-01-29 16:02:55 EST
What I mean by bundle classpath, is the classes that make up the bundle, not including the ant contrib jar.
Comment 62 David Green CLA 2010-02-11 13:33:30 EST
Closing per project guidelines to maintain history of contributions to 3.3 release.  Bug 302616 opened to continue this discussion