How do I convert textile to Eclipse help using ant?

501 views Asked by At

I've been using the Mylyn WikiText User Guide to learn how to convert textile files to Eclipse help but I also want to be able to do this using ant because, ultimately, I want to have many textile files contribute to a single textile file then convert to Eclipse help to enable multiple developers to create help pages with minimal conflicts.

The following ant script should take all *.textile files in the 'doc' folder and convert them to Eclipse help:

<?xml version="1.0"?>
<project name="helpwikitext" default="generate-help">
  <property name="wikitext.standalone" value="doc" />
  <path id="wikitext.classpath">
    <fileset dir="${wikitext.standalone}">
      <include name="org.eclipse.mylyn.wikitext.*core*.jar" />
    </fileset>
  </path>
  <taskdef classpathref="wikitext.classpath" resource="org/eclipse/mylyn/wikitext/core/util/anttask/tasks.properties" />
  <target name="generate-help" description="Generate Eclipse help from textile source">
    <wikitext-to-eclipse-help markupLanguage="Textile" multipleOutputFiles="true" navigationImages="true" helpPrefix="help">
      <fileset dir="${basedir}">
        <include name="doc/*.textile" />
      </fileset>
      <stylesheet url="styles/help.css" />
      <stylesheet url="styles/main.css" />
     </wikitext-to-eclipse-help>
  </target>
</project>

I get the following error:

[taskdef] Could not load definitions from resource org/eclipse/mylyn/wikitext/core/util/anttask/tasks.properties. It could not be found.
build.xml:11: Problem: failed to create task or type wikitext-to-eclipse-help

I'm fairly sure that I have all the Mylyn features installed so it looks like the ant script doesn't know where to find them. Does anyone know how to fix this?

1

There are 1 answers

1
ewan.chalmers On BEST ANSWER

Do you have the wikitext standalone package installed in your doc directory?

That is what is expected as you define the path used by the taskdef like this:

<property name="wikitext.standalone" value="doc" />

I'll take a guess that your wikitext package is in a different dir.

You then use the same dir as the root for your textfiles. I would suggest to keep the wikitext standalone package separate from your textfiles.