Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 324105

Summary: [mediawiki-to-eclipse-help] ClassNotFoundException: org.apache.tools.ant.BuildException
Product: z_Archived Reporter: Nicolas Bros <nicolas.bros>
Component: MylynAssignee: David Green <greensopinion>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on: 290993    
Bug Blocks:    
Attachments:
Description Flags
project to reproduce the error
none
stacktrace none

Description Nicolas Bros CLA 2010-08-31 12:13:45 EDT
We are using the mediawiki-to-eclipse-help ant task.

When we launch ant in Eclipse as an external tool, with "Run in the same JRE as the workspace" set to true, we get the following error:

taskdef A class needed by class org.eclipse.mylyn.internal.wikitext.mediawiki.core.tasks.WikiToDocTask cannot be found: org/apache/tools/ant/BuildException

If on the other hand we set "Run in the same JRE as the workspace" to false, there is no such error.

But we need to use the mediawiki-to-eclipse-help task from Buckminster, to which we cannot tell to start ant in a different JVM.
Comment 1 Nicolas Bros CLA 2010-08-31 12:15:18 EDT
Created attachment 177857 [details]
project to reproduce the error

Here is a minimal project with which I can reproduce the error.
Comment 2 Nicolas Bros CLA 2010-08-31 12:16:48 EDT
Created attachment 177858 [details]
stacktrace
Comment 3 David Green CLA 2010-08-31 18:30:46 EDT
This is a shortcoming of Eclipse's Ant support, which doesn't set up classloaders correctly (that is, correctly for Ant).  In the past this has manifested itself as bug 290993, probably related to bug 278246.  

A workaround is to run Buckminster _without_ WikiText plug-ins installed, and have the Ant task define a classpath with WikiText in the standalone configuration.  
See the WikiText help, "Markup Conversion":http://help.eclipse.org/helios/topic/org.eclipse.mylyn.wikitext.help.ui/help/Markup-Conversion.html#ConversionusingAntbuildscripts for an example Ant script that sets up the classpath correctly.
The WikiText standalone package can be downloaded from http://www.eclipse.org/mylyn/downloads/

If the workaround works for you please let me know.
Comment 4 Nicolas Bros CLA 2010-09-01 04:45:12 EDT
It works! Thank you for your help and quick answer.
Comment 5 David Green CLA 2010-09-01 13:38:23 EDT
(In reply to comment #4)
> It works! Thank you for your help and quick answer.

Great to hear.  Have fun with Buckminster!