|
@@ -38,11 +38,22 @@
|
|
|
|
|
|
<!-- Aether Ant Tasks configuration -->
|
|
|
<property name="aether.jar.version" value="1.0.0.v20140518" />
|
|
|
- <property name="aether.jar.checksum" value="95dadd03392a75564904da45108cf048abe6e5bb" />
|
|
|
+ <property name="aether.jar.checksum"
|
|
|
+ value="9008c0c96390eacc0f7fdde542dacbd921f942dcd5c139465e21f8b583942edb995304025bb436cfeeea0b89698ef9dfccf8a027da68cd079669adea8cca381f" />
|
|
|
<property name="aether.jar.src"
|
|
|
value="http://search.maven.org/remotecontent?filepath=org/eclipse/aether/aether-ant-tasks/${aether.jar.version}/aether-ant-tasks-${aether.jar.version}-uber.jar" />
|
|
|
<property name="aether.jar.file" value="${lib.dir}/aether-ant-tasks-uber.jar" />
|
|
|
|
|
|
+ <!-- Wikitext download configuration -->
|
|
|
+ <property name="wikitext.zip.version" value="1.0.0.v20140518" />
|
|
|
+ <property name="wikitext.zip.checksum"
|
|
|
+ value="f0f2fb383227cd926b2cdee2049b199639c39ffddc2ff5828d9eda995d8c4d864a5093567957b6e4f7febc968210073d34c8ceea26618737e467ecde0e0294a8" />
|
|
|
+ <property name="wikitext.zip.src"
|
|
|
+ value="http://www.eclipse.org/downloads/download.php?file=/mylyn/snapshots/nightly/docs/wikitext-standalone-latest.zip" />
|
|
|
+ <property name="wikitext.zip.file" value="${lib.dir}/wikitext.zip" />
|
|
|
+ <property name="wikitext.basename" value="wikitext-standalone" />
|
|
|
+ <property name="wikitext.version" value="2.8.0-SNAPSHOT" />
|
|
|
+
|
|
|
|
|
|
|
|
|
<!-- The DocBook XML distribution ZIP file will be unpacked to this directory: -->
|
|
@@ -88,7 +99,7 @@
|
|
|
"clean" target. If the JAR is present, a typedef will make Aether Ant Tasks' elements available in the Ant
|
|
|
build file. -->
|
|
|
<target name="init.aether"
|
|
|
- description="Initialized Aether Ant Tasks JAR by downloading the JAR and defining a type.">
|
|
|
+ description="Initializes Aether Ant Tasks JAR by downloading the JAR and defining a type.">
|
|
|
<condition property="target.exists">
|
|
|
<available file="${aether.jar.file}" />
|
|
|
</condition>
|
|
@@ -99,7 +110,7 @@
|
|
|
<condition>
|
|
|
<not>
|
|
|
<checksum file="${aether.jar.file}"
|
|
|
- algorithm="SHA"
|
|
|
+ algorithm="SHA-512"
|
|
|
property="${aether.jar.checksum}"
|
|
|
verifyproperty="checksum.matches" />
|
|
|
</not>
|
|
@@ -112,6 +123,39 @@
|
|
|
classpathref="aether-ant-tasks.classpath" />
|
|
|
</target>
|
|
|
|
|
|
+ <!-- Download and unpack the wikitext standalone distribution. Unfortunately it is currently available as a nightly build only. -->
|
|
|
+ <target name="wikitext.download" description="Download and unpack the wikitext standalone distribution.">
|
|
|
+ <condition property="wikitext.zip.file.exists">
|
|
|
+ <available file="${wikitext.zip.file}" />
|
|
|
+ </condition>
|
|
|
+ <sequential unless:set="wikitext.zip.file.exists">
|
|
|
+ <mkdir dir="${lib.dir}" />
|
|
|
+ <get src="${wikitext.zip.src}" dest="${wikitext.zip.file}" skipexisting="true" usetimestamp="true" />
|
|
|
+ <fail message="Checksum mismatch for ${wikitext.zip.file}. Please delete it and rerun ant to redownload.">
|
|
|
+ <condition>
|
|
|
+ <not>
|
|
|
+ <checksum file="${wikitext.zip.file}"
|
|
|
+ algorithm="SHA-512"
|
|
|
+ property="${wikitext.zip.checksum}"
|
|
|
+ verifyproperty="checksum.matches" />
|
|
|
+ </not>
|
|
|
+ </condition>
|
|
|
+ </fail>
|
|
|
+ <unzip dest="${lib.dir}" src="${wikitext.zip.file}" />
|
|
|
+ </sequential>
|
|
|
+ </target>
|
|
|
+
|
|
|
+ <!-- Resolves the necessary dependencies: -->
|
|
|
+ <target name="init.wikitext"
|
|
|
+ description="Resolves the necessary wikitext dependencies."
|
|
|
+ depends="wikitext.download">
|
|
|
+ <property name="wikitext.dir" location="${lib.dir}/${wikitext.basename}-${wikitext.version}" />
|
|
|
+ <path id="wikitext.classpath">
|
|
|
+ <fileset dir="${wikitext.dir}">
|
|
|
+ <include name="*.jar" />
|
|
|
+ </fileset>
|
|
|
+ </path>
|
|
|
+ </target>
|
|
|
|
|
|
<!-- Resolves the necessary dependencies: -->
|
|
|
<target name="init.dependencies" description="Resolves the necessary dependencies." depends="init.aether">
|
|
@@ -244,11 +288,11 @@
|
|
|
<!-- Generates the documentation in all supported formats. -->
|
|
|
<target name="generate.all"
|
|
|
description="Generates the documentation in all supported formats."
|
|
|
- depends="generate.html, generate.eclipsehelp, generate.pdf" />
|
|
|
+ depends="generate.eclipsehelp" />
|
|
|
|
|
|
|
|
|
<!-- Generates the documentation as HTML. -->
|
|
|
- <target name="generate.html"
|
|
|
+ <target name="generate.html.from.docbook"
|
|
|
description="Generates the documentation as HTML."
|
|
|
depends="validate, init.docbook-xsl">
|
|
|
<docbook.conversion src.dir="${res.dir.name}"
|
|
@@ -260,7 +304,7 @@
|
|
|
|
|
|
|
|
|
<!-- Generates the documentation as Eclipse help. This is essentially chunked HTML with a TOC file. -->
|
|
|
- <target name="generate.eclipsehelp"
|
|
|
+ <target name="generate.eclipsehelp.from.docbook"
|
|
|
description="Generates the documentation as Eclipse help."
|
|
|
depends="validate, init.docbook-xsl">
|
|
|
<docbook.conversion src.dir="${res.dir.name}"
|
|
@@ -271,8 +315,22 @@
|
|
|
</target>
|
|
|
|
|
|
|
|
|
+ <!-- Generates the documentation as Eclipse help. This is essentially chunked HTML with a TOC file. -->
|
|
|
+ <target name="generate.eclipsehelp"
|
|
|
+ description="Generates the documentation as Eclipse help from the textile (wikitext) sources."
|
|
|
+ depends="init.wikitext">
|
|
|
+ <wikitext.conversion src.dir="${src.dir.name}"
|
|
|
+ src.file.name="${src.basename}.textile"
|
|
|
+ dst.dir="${help.dir.name}"
|
|
|
+ dst.file.name="---"
|
|
|
+ style="---" />
|
|
|
+ </target>
|
|
|
+
|
|
|
+
|
|
|
<!-- Generates the documentation as PDF. -->
|
|
|
- <target name="generate.pdf" description="Generates the documentation as PDF." depends="validate, init.docbook-xsl">
|
|
|
+ <target name="generate.pdf.from.docbook"
|
|
|
+ description="Generates the documentation as PDF."
|
|
|
+ depends="validate, init.docbook-xsl">
|
|
|
<docbook.conversion src.dir="${res.dir.name}"
|
|
|
src.file.name="${res.basename}.xml"
|
|
|
dst.dir="${pdf.dir.name}"
|
|
@@ -286,6 +344,61 @@
|
|
|
</target>
|
|
|
|
|
|
|
|
|
+
|
|
|
+ <!-- Converts a Textile document into Eclipsehelp format. Produces an HTML document and a corresponding toc.xml -->
|
|
|
+ <macrodef name="wikitext.conversion"
|
|
|
+ description="Converts a textile document into a target format. Produces an HTML document and a corresponding toc.xml">
|
|
|
+ <attribute name="src.dir" />
|
|
|
+ <attribute name="src.file.name" />
|
|
|
+ <attribute name="dst.dir" />
|
|
|
+ <attribute name="dst.file.name" />
|
|
|
+ <attribute name="style" />
|
|
|
+
|
|
|
+ <sequential>
|
|
|
+ <basename property="src.file.basename" file="@{src.file.name}" suffix=".textile" />
|
|
|
+ <taskdef classpathref="wikitext.classpath"
|
|
|
+ resource="org/eclipse/mylyn/wikitext/core/ant/tasks.properties" />
|
|
|
+ <wikitext-to-eclipse-help markupLanguage="Textile"
|
|
|
+ multipleOutputFiles="false"
|
|
|
+ navigationImages="true"
|
|
|
+ formatoutput="true"
|
|
|
+ validate="true"
|
|
|
+ failOnValidationError="true"
|
|
|
+ failOnValidationWarning="false"
|
|
|
+ title="YAKINDU Statechart Tools – User Documentation"
|
|
|
+ helpPrefix="@{dst.dir}">
|
|
|
+ <fileset dir="@{src.dir}">
|
|
|
+ <include name="@{src.file.name}" />
|
|
|
+ </fileset>
|
|
|
+ <stylesheet url="css/style.css" />
|
|
|
+ </wikitext-to-eclipse-help>
|
|
|
+
|
|
|
+ <!-- Files have been generated in the source directory, which is bad practice. Move them to the destination
|
|
|
+ directory: -->
|
|
|
+ <move todir="@{dst.dir}">
|
|
|
+ <fileset dir="${src.dir}">
|
|
|
+ <include name="${src.file.basename}.html" />
|
|
|
+ <include name="${src.file.basename}-toc.xml" />
|
|
|
+ </fileset>
|
|
|
+ </move>
|
|
|
+
|
|
|
+ <!-- Copy the CSS files to the destination directory: -->
|
|
|
+ <copy todir="@{dst.dir}/${css.dir.name}">
|
|
|
+ <fileset dir="${css.dir}">
|
|
|
+ <include name="*" />
|
|
|
+ </fileset>
|
|
|
+ </copy>
|
|
|
+
|
|
|
+ <!-- Copy the image files to the destination directory: -->
|
|
|
+ <copy todir="@{dst.dir}/${img.dir.name}">
|
|
|
+ <fileset dir="${img.dir}">
|
|
|
+ <include name="*" />
|
|
|
+ </fileset>
|
|
|
+ </copy>
|
|
|
+
|
|
|
+ </sequential>
|
|
|
+ </macrodef>
|
|
|
+
|
|
|
<!-- Converts a DocBook document into a target format. -->
|
|
|
<macrodef name="docbook.conversion" description="Converts a DocBook document into a target format.">
|
|
|
<attribute name="src.dir" />
|