Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Sohn2010-05-26 00:54:46 +0000
committerMatthias Sohn2010-05-26 09:38:03 +0000
commit1f4145c15d84ac4bdbedf5268f1393ef84c32301 (patch)
tree7c56107a5d91924560ad9dbecf0fab99b44fe351
parent62e5fc7e91c88329a6a42150873bbecb3e1eacc7 (diff)
downloadegit-1f4145c15d84ac4bdbedf5268f1393ef84c32301.tar.gz
egit-1f4145c15d84ac4bdbedf5268f1393ef84c32301.tar.xz
egit-1f4145c15d84ac4bdbedf5268f1393ef84c32301.zip
Use latest wikitext for help generation and add additional wikis
With wikitext 1.3 the ant script can be simplified heavily. Also add additional wikis to be included in the EGit documentation. Change-Id: I3b9fb4bb65fe45d51fdd77e2356c0e722e10377c Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
-rw-r--r--org.eclipse.egit.doc/build-help.xml195
-rw-r--r--org.eclipse.egit.doc/build.properties7
-rw-r--r--org.eclipse.egit.doc/plugin.xml2
-rw-r--r--org.eclipse.egit.doc/pom.xml1
4 files changed, 62 insertions, 143 deletions
diff --git a/org.eclipse.egit.doc/build-help.xml b/org.eclipse.egit.doc/build-help.xml
index 4ea8be165f..9a8a86b8a4 100644
--- a/org.eclipse.egit.doc/build-help.xml
+++ b/org.eclipse.egit.doc/build-help.xml
@@ -1,137 +1,58 @@
-<?xml version="1.0" encoding="UTF-8"?><!--
- Copyright (c) 2010 Chris Aniszczyk and others.
- Copyright (c) 2010 Matthias Sohn <matthias.sohn@sap.com>
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
-
- Contributors:
- Chris Aniszczyk - initial API and implementation
- Matthias Sohn - maven integration
- -->
-
-<project name="org.eclipse.egit.doc" default="all">
- <description>
- Generate Eclipse help content for the EGit user guide
- </description>
-
- <property name="help.doc.url.base" value="http://wiki.eclipse.org"/>
- <property name="wiki.url.base" value="${help.doc.url.base}/EGit"/>
- <property name="imageFolder" value="images"/>
- <property name="tmpFolder" value="target/tmp"/>
-
- <path id="wikitext.tasks.classpath">
- <pathelement path="${compile_classpath}"/>
- </path>
- <echo message="compile classpath: ${compile_classpath}"/>
-
- <taskdef classpathref="wikitext.tasks.classpath" resource="org/eclipse/mylyn/internal/wikitext/mediawiki/core/tasks/tasks.properties"/>
- <taskdef classpathref="wikitext.tasks.classpath" resource="org/eclipse/mylyn/wikitext/core/util/anttask/tasks.properties"/>
-
- <target name="init">
- <mkdir dir="${tmpFolder}"/>
- </target>
-
- <target name="clean" depends="init">
- <delete includeemptydirs="true" failonerror="false">
- <fileset dir="${tmpFolder}"/>
- </delete>
- </target>
-
- <target name="all" depends="init" description="Generate Eclipse help content for the EGit user guide">
- <eclipse-wiki-to-help
- help.doc.filenamenoextension="EGit User Guide"
- help.doc.url.base="${help.doc.url.base}"
- help.doc.pageName="EGit/User_Guide"
- help.imagefolder="${imageFolder}"
- targetfolder="userguide"
- wiki.url.base="${help.doc.url.base}/EGit"/>
- <replaceregexp file="userguide/EGit User Guide-toc.xml" match="(&lt;topic.*?href=&quot;userguide/Task-Repository-Connectors.html.*?&gt;(\s*&lt;topic\s*href=&quot;.*?&quot;\s*label=&quot;.*&quot;&gt;\s*?&lt;/topic&gt;)+)(\s*)(&lt;/topic&gt;)"
- replace="\1\3&lt;anchor id=&quot;additions-repository-connectors&quot;/&gt;\3\4"
- flags="s"/>
- </target>
-
- <macrodef name="eclipse-wiki-to-help">
- <attribute name="help.doc.url.base"/>
- <attribute name="wiki.url.base"/>
- <attribute name="help.doc.pageName"/>
- <attribute name="help.doc.filenameNoExtension"/>
- <attribute name="help.imageFolder"/>
- <attribute name="targetFolder"/>
- <sequential>
- <get dest="${tmpFolder}/@{help.doc.filenameNoExtension}.mediawiki" src="@{help.doc.url.base}/index.php?title=@{help.doc.pageName}&amp;action=raw"/>
- <echo append="true" file="${tmpFolder}/@{help.doc.filenameNoExtension}.mediawiki">
-
-= Updating This Document =
-
-This document is maintained in a collaborative wiki. If you wish to update or modify this document please visit
-@{help.doc.url.base}/@{help.doc.pageName}
- </echo>
-
- <copy todir="${tmpFolder}">
- <fileset dir="userguide/images"/>
- </copy>
- <mediawiki-fetch-images dest="${tmpFolder}" url="@{help.doc.url.base}" pageName="@{help.doc.pageName}"/>
-
- <wikitext-to-eclipse-help markupLanguage="org.eclipse.mylyn.wikitext.mediawiki.core.MediaWikiLanguage"
- multipleOutputFiles="true"
- navigationImages="true"
- helpPrefix="@{targetFolder}"
- internallinkpattern="@{wiki.url.base}/{0}"
- validate="true"
- failonvalidationerror="true"
- prependImagePrefix="${imageFolder}"
- formatoutput="true"
- defaultAbsoluteLinkTarget="mylyn_external">
- <fileset dir="${tmpFolder}" includes="**/*.mediawiki"/>
- <stylesheet url="book.css"/>
- </wikitext-to-eclipse-help>
-
- <mkdir dir="@{targetFolder}/${imageFolder}"/>
- <copy todir="@{targetFolder}/${imageFolder}" overwrite="true">
- <fileset dir="${tmpFolder}">
- <include name="*.gif"/>
- <include name="*.png"/>
- </fileset>
- </copy>
- <copy todir="@{targetFolder}" overwrite="true">
- <fileset dir="${tmpFolder}">
- <include name="*.html"/>
- <include name="*toc.xml"/>
- <exclude name="help.doc.html"/>
- </fileset>
- </copy>
- <antcall target="test"/>
- </sequential>
- </macrodef>
-
- <target name="test" depends="init" description="verify that all of the HTML files are well-formed XML">
- <echo level="info">
-Validating help content XML and HTML files: The Eclipse help system expects well-formed XML
-
-If validation fails it is because either:
-
-* the userguide source code is poorly formed, or
-* the WikiText MediaWiki parser has a bug
-
-Problems with userguide source are usually caused by improper use of HTML markup in the MediaWiki source,
-or inadvertently starting a line with a space character (in MediaWiki this starts a preformatted block)
- </echo>
-
- <!--
- Don't bother with DTD validation: we only care if the files are well-formed.
- We therefore provide an empty DTD
- -->
- <echo file="${tmpFolder}/__empty.dtd" message=""/>
- <xmlvalidate lenient="true">
- <fileset dir="userguide">
- <include name="**/*.xml"/>
- </fileset>
- <fileset dir="userguide">
- <include name="**/*.html"/>
- </fileset>
- <dtd publicid="-//W3C//DTD XHTML 1.0 Transitional//EN" location="${basedir}/${tmpFolder}/__empty.dtd"/>
- </xmlvalidate>
- </target>
-</project>
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="org.eclipse.egit.doc" basedir="." default="all">
+<!--
+ Copyright (c) 2010 Chris Aniszczyk and others.
+ Copyright (c) 2010 Matthias Sohn <matthias.sohn@sap.com>
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
+
+ Contributors:
+ Chris Aniszczyk - initial API and implementation
+ Matthias Sohn - maven integration, update to wikitext 1.3, adding additional wikis
+-->
+ <description>
+ Generate Eclipse help content for the EGit user guide
+ </description>
+
+ <path id="wikitext.tasks.classpath">
+ <pathelement path="${compile_classpath}"/>
+ </path>
+ <echo message="compile classpath: ${compile_classpath}"/>
+ <taskdef classpathref="wikitext.tasks.classpath" resource="org/eclipse/mylyn/internal/wikitext/mediawiki/core/tasks/tasks.properties"/>
+ <taskdef classpathref="wikitext.tasks.classpath" resource="org/eclipse/mylyn/wikitext/core/util/anttask/tasks.properties"/>
+
+ <property name="egit.help.doc.url.base" value="http://wiki.eclipse.org" />
+
+ <target name="all" description="Generate Eclipse help content for the EGit documentation">
+ <sequential>
+ <delete failonerror="false">
+ <fileset dir="${basedir}/help/images" />
+ </delete>
+
+ <mediawiki-to-eclipse-help wikiBaseUrl="${egit.help.doc.url.base}"
+ validate="true" failonvalidationerror="true" prependImagePrefix="images"
+ formatoutput="true" defaultAbsoluteLinkTarget="egit_external" dest="${basedir}/help"
+ navigationimages="true" title="EGit Documentation" helpPrefix="help"
+ generateUnifiedToc="true">
+ <path name="EGit/User_Guide" title="EGit User Guide" />
+ <path name="EGit/Git_For_Eclipse_Users" title="Git for Eclipse Users" />
+ <path name="Git" title="Git at Eclipse" />
+ <path name="Git/Migrating_to_Git" title="Migrating to Git at Eclipse" />
+ <stylesheet url="book.css" />
+ <pageAppendum>
+
+ = Updating This Document =
+
+ This document is maintained in a collaborative wiki. If you wish to
+ update or modify this document please visit
+ {url}</pageAppendum>
+ </mediawiki-to-eclipse-help>
+ <mkdir dir="help/images" />
+ <copy todir="${basedir}/help/images" overwrite="true">
+ <fileset dir="images" />
+ </copy>
+ </sequential>
+ </target>
+</project>
diff --git a/org.eclipse.egit.doc/build.properties b/org.eclipse.egit.doc/build.properties
index 1a3c72ee38..a917749407 100644
--- a/org.eclipse.egit.doc/build.properties
+++ b/org.eclipse.egit.doc/build.properties
@@ -1,7 +1,6 @@
bin.includes = META-INF/,\
.,\
- images/,\
about.html,\
- plugin.xml,\
- userguide/,\
- plugin.properties
+ help/,\
+ plugin.properties,\
+ plugin.xml
diff --git a/org.eclipse.egit.doc/plugin.xml b/org.eclipse.egit.doc/plugin.xml
index 204aaf6fb1..7c562f63e7 100644
--- a/org.eclipse.egit.doc/plugin.xml
+++ b/org.eclipse.egit.doc/plugin.xml
@@ -5,7 +5,7 @@
<extension
point="org.eclipse.help.toc">
<toc
- file="userguide/EGit User Guide-toc.xml"
+ file="help/toc.xml"
primary="true">
</toc>
</extension>
diff --git a/org.eclipse.egit.doc/pom.xml b/org.eclipse.egit.doc/pom.xml
index 297bc3a4d2..bce19d77e1 100644
--- a/org.eclipse.egit.doc/pom.xml
+++ b/org.eclipse.egit.doc/pom.xml
@@ -40,7 +40,6 @@
<phase>generate-sources</phase>
<configuration>
<tasks if="update.egit.doc">
- <id>update-documentation</id>
<property name="compile_classpath" refid="maven.compile.classpath"/>
<ant target="all" inheritRefs="true" antfile="build-help.xml"/>
</tasks>

Back to the top