You are viewing a plain text version of this content. The canonical link for it is here.
Posted to easyant-commits@incubator.apache.org by hi...@apache.org on 2011/02/22 14:59:20 UTC
svn commit: r1073355 [3/8] - in /incubator/easyant/plugins/trunk: ./
abstract-coverage/ abstract-coverage/src/main/resources/ abstract-test/
abstract-test/src/main/resources/ antcontrib-activator/
antcontrib-activator/src/main/resources/ antunit/ antun...
Modified: incubator/easyant/plugins/trunk/distribution/src/main/resources/distribution.ant
URL: http://svn.apache.org/viewvc/incubator/easyant/plugins/trunk/distribution/src/main/resources/distribution.ant?rev=1073355&r1=1073354&r2=1073355&view=diff
==============================================================================
--- incubator/easyant/plugins/trunk/distribution/src/main/resources/distribution.ant (original)
+++ incubator/easyant/plugins/trunk/distribution/src/main/resources/distribution.ant Tue Feb 22 14:59:17 2011
@@ -16,169 +16,169 @@
-->
<project name="org.apache.easyant.plugins;distribution" xmlns:ac="antlib:net.sf.antcontrib" xmlns:ivy="antlib:org.apache.ivy.ant" xmlns:ea="antlib:org.apache.easyant">
- <ea:core-version requiredrevision="[0.8,+]" />
+ <ea:core-version requiredrevision="[0.8,+]" />
- <macrodef name="generate-bundle-checksum" description="generate checksum files for a given file">
- <attribute name="usechecksum" description="Defines if checksum files need to be generated" default="true" />
- <attribute name="file" description="The file to generate checksum for." />
- <attribute name="algorithm" default="MD5" description="Specifies the algorithm to be used to compute the checksum. Defaults to 'MD5'. Other popular algorithms like 'SHA' or 'SHA-512' may be used as well. " />
- <sequential>
- <ac:if>
- <istrue value="@{usechecksum}" />
- <ac:then>
- <checksum file="@{file}" algorithm="@{algorithm}" />
- </ac:then>
- </ac:if>
- </sequential>
- </macrodef>
-
- <!-- macro for generating distribution zip -->
- <macrodef name="bundle" description="Generate tar.gz, tar.bz2, zip, and corresponding MD5 hash files for a release directory">
-
- <attribute name="destfile" description="Destination file for the generated archives, without extensions" />
- <attribute name="archivetype" description="Defines the archivetype to generate (zip, tar.gz, tar.bz2)" default="zip" />
- <attribute name="usechecksum" description="Defines if checksum files need to be generated" default="true" />
- <element name="contents" description="nested include, exclude, or pattern directives" implicit="true" optional="true" />
-
- <sequential>
-
- <ac:if>
- <contains string="@{archivetype}" substring="zip" />
- <ac:then>
- <zip destfile="@{destfile}.zip">
- <contents />
- </zip>
- <generate-bundle-checksum file="@{destfile}.zip" usechecksum="@{usechecksum}" />
- </ac:then>
- </ac:if>
- <ac:if>
- <contains string="@{archivetype}" substring="tar.gz" />
- <ac:then>
- <tar destfile="@{destfile}.tar.gz" compression="gzip">
- <contents />
- </tar>
- <generate-bundle-checksum file="@{destfile}.tar.gz" usechecksum="@{usechecksum}" />
- </ac:then>
- </ac:if>
- <ac:if>
- <contains string="@{archivetype}" substring="tar.bz2" />
- <ac:then>
- <tar destfile="@{destfile}.tar.bz2" compression="bzip2">
- <contents />
- </tar>
- <generate-bundle-checksum file="@{destfile}.tar.bz2" usechecksum="@{usechecksum}" />
- </ac:then>
- </ac:if>
- <ac:if>
- <contains string="@{archivetype}" substring="jar" />
- <ac:then>
- <jar destfile="@{destfile}.jar" filesetmanifest="merge">
- <contents />
- </jar>
- <generate-bundle-checksum file="@{destfile}.jar" usechecksum="@{usechecksum}" />
- </ac:then>
- </ac:if>
-
-
- </sequential>
-
- </macrodef>
-
- <target name=":init" phase="validate">
- <ea:parameter property="target.distributions" default="${target}/distributions" description="directory where distribution packages will be generated" />
- <ea:parameter property="project.basedir" default="${basedir}" description="defines the project base directory" />
- <ea:parameter property="project.prefix" default="" description="defines the project prefix, used as distribution root directory" />
- <ea:parameter property="target.artifacts" default="${basedir}/target/artifacts" description="destination directory for target artifacts"/>
- <ea:parameter property="project.bin.dir" default="${basedir}/bin" description="directory of project binaries (scripts, executables, etc...)"/>
- <ea:parameter property="lib.main" default="${basedir}/lib/main" description="directory where main libraries are picked up" />
-
-
- <!-- project artifacts -->
- <zipfileset id="project.artifacts.zipfileset" dir="${target.artifacts}" prefix="${project.prefix}/lib">
- <exclude name="**/*-test.jar"/>
- </zipfileset>
- <!-- project dependencies -->
- <zipfileset id ="project.dependencies.zipfileset" dir="${lib.main}" prefix="${project.prefix}/lib" erroronmissingdir="false"/>
- <!-- make scripts executable -->
- <zipfileset id="project.executables.zipfileset" dir="${project.bin.dir}" prefix="${project.prefix}/bin" filemode="744" erroronmissingdir="false"/>
- <!-- ship the documentation -->
- <zipfileset id="project.documentation.zipfileset" dir="${target.documentation.dir}" prefix="${project.prefix}/doc" erroronmissingdir="false"/>
- <!--additional files -->
- <zipfileset id="project.additionalfiles.zipfileset" dir="${project.basedir}" prefix="${project.prefix}" >
- <include name="README" />
- <include name="NOTICE" />
- <include name="LICENSE" />
- </zipfileset>
-
- <!-- all project files -->
- <zipfileset id="project.allfiles.zipfileset" dir="${project.basedir}" prefix="${project.prefix}" >
- <exclude name="**/target/**"/>
- <exclude name="${project.bin.dir}/**"/>
- <exclude name="**/lib/**"/>
- <exclude name="**/.git/**"/>
- </zipfileset>
-
- <mkdir dir="${target.distributions}" />
- </target>
-
- <target name=":clean" description="clean distribution dir">
- <delete dir="${target.distributions}"/>
- </target>
-
- <target name="-force-retrieve" depends="validate">
- <property name="retrieve.dependencies" value="true"/>
- </target>
-
- <target name=":bin" depends="-force-retrieve,package" description="create a binary distribution">
- <bundle destfile="${target.distributions}/${module.name}-bin">
- <!-- project artifacts -->
- <zipfileset refid="project.artifacts.zipfileset" />
- <!-- project dependencies -->
- <zipfileset refid="project.dependencies.zipfileset"/>
- <!-- make scripts executable -->
- <zipfileset refid="project.executables.zipfileset"/>
- <!-- ship the documentation -->
- <zipfileset refid="project.documentation.zipfileset"/>
- <!--additional files -->
- <zipfileset refid="project.additionalfiles.zipfileset"/>
- </bundle>
- </target>
-
- <target name=":jar-with-dependencies" depends="-force-retrieve,package" description="create a jar archive which contains the binary output of your project, along its the unpacked dependencies (only works on jar projects)">
- <condition property="target.main.artifact.exist">
- <and>
- <isset property="target.main.artifact"/>
- <available file="${target.main.artifact}"/>
- </and>
- </condition>
- <fail unless="${target.main.artifact.exist}" message="${target.main.artifact} not found"/>
- <ea:parameter property="bundle.withdependencies.excludes.pattern" default="META-INF/MANIFEST.MF"
- description="Pattern describing files excluded in the bundle jar with dependencies" />
- <bundle destfile="${target.distributions}/${module.name}-with-dependencies" archivetype="jar">
- <zipfileset excludes="${bundle.withdependencies.excludes.pattern}" >
- <fileset dir="${lib.main}" includes="**/*.jar"/>
- </zipfileset>
- <zipfileset>
- <fileset file="${target.main.artifact}"/>
- </zipfileset>
- </bundle>
- </target>
-
- <target name=":source" depends="package" description="create a source distribution">
- <bundle destfile="${target.distributions}/${module.name}-source">
- <!-- project artifacts -->
- <zipfileset refid="project.artifacts.zipfileset" />
- <!-- project dependencies -->
- <zipfileset refid="project.dependencies.zipfileset"/>
- <!-- make scripts executable -->
- <zipfileset refid="project.executables.zipfileset"/>
- <!-- ship the documentation -->
- <zipfileset refid="project.documentation.zipfileset"/>
- <!-- all project files -->
- <zipfileset refid="project.allfiles.zipfileset" />
- </bundle>
- </target>
-
- <!-- define a generic default target for this plugin -->
- <target name="doit" depends="validate" />
+ <macrodef name="generate-bundle-checksum" description="generate checksum files for a given file">
+ <attribute name="usechecksum" description="Defines if checksum files need to be generated" default="true" />
+ <attribute name="file" description="The file to generate checksum for." />
+ <attribute name="algorithm" default="MD5" description="Specifies the algorithm to be used to compute the checksum. Defaults to 'MD5'. Other popular algorithms like 'SHA' or 'SHA-512' may be used as well. " />
+ <sequential>
+ <ac:if>
+ <istrue value="@{usechecksum}" />
+ <ac:then>
+ <checksum file="@{file}" algorithm="@{algorithm}" />
+ </ac:then>
+ </ac:if>
+ </sequential>
+ </macrodef>
+
+ <!-- macro for generating distribution zip -->
+ <macrodef name="bundle" description="Generate tar.gz, tar.bz2, zip, and corresponding MD5 hash files for a release directory">
+
+ <attribute name="destfile" description="Destination file for the generated archives, without extensions" />
+ <attribute name="archivetype" description="Defines the archivetype to generate (zip, tar.gz, tar.bz2)" default="zip" />
+ <attribute name="usechecksum" description="Defines if checksum files need to be generated" default="true" />
+ <element name="contents" description="nested include, exclude, or pattern directives" implicit="true" optional="true" />
+
+ <sequential>
+
+ <ac:if>
+ <contains string="@{archivetype}" substring="zip" />
+ <ac:then>
+ <zip destfile="@{destfile}.zip">
+ <contents />
+ </zip>
+ <generate-bundle-checksum file="@{destfile}.zip" usechecksum="@{usechecksum}" />
+ </ac:then>
+ </ac:if>
+ <ac:if>
+ <contains string="@{archivetype}" substring="tar.gz" />
+ <ac:then>
+ <tar destfile="@{destfile}.tar.gz" compression="gzip">
+ <contents />
+ </tar>
+ <generate-bundle-checksum file="@{destfile}.tar.gz" usechecksum="@{usechecksum}" />
+ </ac:then>
+ </ac:if>
+ <ac:if>
+ <contains string="@{archivetype}" substring="tar.bz2" />
+ <ac:then>
+ <tar destfile="@{destfile}.tar.bz2" compression="bzip2">
+ <contents />
+ </tar>
+ <generate-bundle-checksum file="@{destfile}.tar.bz2" usechecksum="@{usechecksum}" />
+ </ac:then>
+ </ac:if>
+ <ac:if>
+ <contains string="@{archivetype}" substring="jar" />
+ <ac:then>
+ <jar destfile="@{destfile}.jar" filesetmanifest="merge">
+ <contents />
+ </jar>
+ <generate-bundle-checksum file="@{destfile}.jar" usechecksum="@{usechecksum}" />
+ </ac:then>
+ </ac:if>
+
+
+ </sequential>
+
+ </macrodef>
+
+ <target name=":init" phase="validate">
+ <ea:parameter property="target.distributions" default="${target}/distributions" description="directory where distribution packages will be generated" />
+ <ea:parameter property="project.basedir" default="${basedir}" description="defines the project base directory" />
+ <ea:parameter property="project.prefix" default="" description="defines the project prefix, used as distribution root directory" />
+ <ea:parameter property="target.artifacts" default="${basedir}/target/artifacts" description="destination directory for target artifacts"/>
+ <ea:parameter property="project.bin.dir" default="${basedir}/bin" description="directory of project binaries (scripts, executables, etc...)"/>
+ <ea:parameter property="lib.main" default="${basedir}/lib/main" description="directory where main libraries are picked up" />
+
+
+ <!-- project artifacts -->
+ <zipfileset id="project.artifacts.zipfileset" dir="${target.artifacts}" prefix="${project.prefix}/lib">
+ <exclude name="**/*-test.jar"/>
+ </zipfileset>
+ <!-- project dependencies -->
+ <zipfileset id ="project.dependencies.zipfileset" dir="${lib.main}" prefix="${project.prefix}/lib" erroronmissingdir="false"/>
+ <!-- make scripts executable -->
+ <zipfileset id="project.executables.zipfileset" dir="${project.bin.dir}" prefix="${project.prefix}/bin" filemode="744" erroronmissingdir="false"/>
+ <!-- ship the documentation -->
+ <zipfileset id="project.documentation.zipfileset" dir="${target.documentation.dir}" prefix="${project.prefix}/doc" erroronmissingdir="false"/>
+ <!--additional files -->
+ <zipfileset id="project.additionalfiles.zipfileset" dir="${project.basedir}" prefix="${project.prefix}" >
+ <include name="README" />
+ <include name="NOTICE" />
+ <include name="LICENSE" />
+ </zipfileset>
+
+ <!-- all project files -->
+ <zipfileset id="project.allfiles.zipfileset" dir="${project.basedir}" prefix="${project.prefix}" >
+ <exclude name="**/target/**"/>
+ <exclude name="${project.bin.dir}/**"/>
+ <exclude name="**/lib/**"/>
+ <exclude name="**/.git/**"/>
+ </zipfileset>
+
+ <mkdir dir="${target.distributions}" />
+ </target>
+
+ <target name=":clean" description="clean distribution dir">
+ <delete dir="${target.distributions}"/>
+ </target>
+
+ <target name="-force-retrieve" depends="validate">
+ <property name="retrieve.dependencies" value="true"/>
+ </target>
+
+ <target name=":bin" depends="-force-retrieve,package" description="create a binary distribution">
+ <bundle destfile="${target.distributions}/${module.name}-bin">
+ <!-- project artifacts -->
+ <zipfileset refid="project.artifacts.zipfileset" />
+ <!-- project dependencies -->
+ <zipfileset refid="project.dependencies.zipfileset"/>
+ <!-- make scripts executable -->
+ <zipfileset refid="project.executables.zipfileset"/>
+ <!-- ship the documentation -->
+ <zipfileset refid="project.documentation.zipfileset"/>
+ <!--additional files -->
+ <zipfileset refid="project.additionalfiles.zipfileset"/>
+ </bundle>
+ </target>
+
+ <target name=":jar-with-dependencies" depends="-force-retrieve,package" description="create a jar archive which contains the binary output of your project, along its the unpacked dependencies (only works on jar projects)">
+ <condition property="target.main.artifact.exist">
+ <and>
+ <isset property="target.main.artifact"/>
+ <available file="${target.main.artifact}"/>
+ </and>
+ </condition>
+ <fail unless="${target.main.artifact.exist}" message="${target.main.artifact} not found"/>
+ <ea:parameter property="bundle.withdependencies.excludes.pattern" default="META-INF/MANIFEST.MF"
+ description="Pattern describing files excluded in the bundle jar with dependencies" />
+ <bundle destfile="${target.distributions}/${module.name}-with-dependencies" archivetype="jar">
+ <zipfileset excludes="${bundle.withdependencies.excludes.pattern}" >
+ <fileset dir="${lib.main}" includes="**/*.jar"/>
+ </zipfileset>
+ <zipfileset>
+ <fileset file="${target.main.artifact}"/>
+ </zipfileset>
+ </bundle>
+ </target>
+
+ <target name=":source" depends="package" description="create a source distribution">
+ <bundle destfile="${target.distributions}/${module.name}-source">
+ <!-- project artifacts -->
+ <zipfileset refid="project.artifacts.zipfileset" />
+ <!-- project dependencies -->
+ <zipfileset refid="project.dependencies.zipfileset"/>
+ <!-- make scripts executable -->
+ <zipfileset refid="project.executables.zipfileset"/>
+ <!-- ship the documentation -->
+ <zipfileset refid="project.documentation.zipfileset"/>
+ <!-- all project files -->
+ <zipfileset refid="project.allfiles.zipfileset" />
+ </bundle>
+ </target>
+
+ <!-- define a generic default target for this plugin -->
+ <target name="doit" depends="validate" />
</project>
Modified: incubator/easyant/plugins/trunk/docbook/module.ivy
URL: http://svn.apache.org/viewvc/incubator/easyant/plugins/trunk/docbook/module.ivy?rev=1073355&r1=1073354&r2=1073355&view=diff
==============================================================================
--- incubator/easyant/plugins/trunk/docbook/module.ivy (original)
+++ incubator/easyant/plugins/trunk/docbook/module.ivy Tue Feb 22 14:59:17 2011
@@ -15,28 +15,28 @@
limitations under the License.
-->
<ivy-module version="2.0" xmlns:m="http://ant.apache.org/ivy/maven" xmlns:ea="http://www.easyant.org">
- <info organisation="org.apache.easyant.plugins" module="docbook" revision="0.1">
- <description>Generates project documentation as HTML or PDF using docbook-xsl.
- See <a href="http://www.sagehill.net/docbookxsl">http://www.sagehill.net/docbookxsl</a>
- for instructions on writing DocBook documentation and configuring the DocBook generator.
- </description>
- <ea:build organisation="org.apache.easyant.buildtypes" module="build-std-ant-plugin" revision="0.1"/>
+ <info organisation="org.apache.easyant.plugins" module="docbook" revision="0.1">
+ <description>Generates project documentation as HTML or PDF using docbook-xsl.
+ See <a href="http://www.sagehill.net/docbookxsl">http://www.sagehill.net/docbookxsl</a>
+ for instructions on writing DocBook documentation and configuring the DocBook generator.
+ </description>
+ <ea:build organisation="org.apache.easyant.buildtypes" module="build-std-ant-plugin" revision="0.1"/>
</info>
<configurations>
<conf name="default" description="runtime dependencies artifact can be used with this conf"/>
<conf name="test" description="this scope indicates that the dependency is not required for normal use of the application, and is only available for the test compilation and execution phases."/>
<conf name="provided" description="this is much like compile, but indicates you expect the JDK or a container to provide it. It is only available on the compilation classpath, and is not transitive."/>
- <conf name="docbook_dist"/>
- </configurations>
+ <conf name="docbook_dist"/>
+ </configurations>
<publications>
<artifact type="ant"/>
</publications>
- <dependencies>
- <dependency org="saxon" name="saxon" rev="6.5.3" conf="default"/>
- <dependency org="xerces" name="xercesImpl" rev="2.9.1" conf="default"/>
- <dependency org="net.sf.docbook" name="docbook-xsl-saxon" rev="1.0.0" conf="default"/>
- <dependency org="net.sf.docbook" name="docbook-xsl" rev="1.75.1" conf="docbook_dist->default">
- <artifact name="docbook-xsl" type="zip" m:classifier="resources" conf="docbook_dist"/>
- </dependency>
- </dependencies>
+ <dependencies>
+ <dependency org="saxon" name="saxon" rev="6.5.3" conf="default"/>
+ <dependency org="xerces" name="xercesImpl" rev="2.9.1" conf="default"/>
+ <dependency org="net.sf.docbook" name="docbook-xsl-saxon" rev="1.0.0" conf="default"/>
+ <dependency org="net.sf.docbook" name="docbook-xsl" rev="1.75.1" conf="docbook_dist->default">
+ <artifact name="docbook-xsl" type="zip" m:classifier="resources" conf="docbook_dist"/>
+ </dependency>
+ </dependencies>
</ivy-module>
Modified: incubator/easyant/plugins/trunk/docbook/src/main/resources/docbook.ant
URL: http://svn.apache.org/viewvc/incubator/easyant/plugins/trunk/docbook/src/main/resources/docbook.ant?rev=1073355&r1=1073354&r2=1073355&view=diff
==============================================================================
--- incubator/easyant/plugins/trunk/docbook/src/main/resources/docbook.ant (original)
+++ incubator/easyant/plugins/trunk/docbook/src/main/resources/docbook.ant Tue Feb 22 14:59:17 2011
@@ -15,77 +15,77 @@
limitations under the License.
-->
<project name="org.apache.easyant.plugins#docbook"
- xmlns:ivy="antlib:org.apache.ivy.ant"
- xmlns:m="http://ant.apache.org/ivy/maven"
- xmlns:ea="antlib:org.apache.easyant">
-
- <ea:core-version requiredrevision="[0.8,+]" />
- <dirname file="${ant.file.org.apache.easyant.plugins#docbook}" property="docbook.module.dir" />
-
- <target name=":init" phase="validate">
-
- <ea:parameter phase="validate" />
- <ea:parameter phase="documentation" />
-
- <ea:parameter property="target.documentation.dir" description="directory where the documentation will be generated to"
- default="target/documentation"/>
- <ea:parameter property="src.documentation.dir" description="directory where documentation sources reside"
- default="src/documentation"/>
-
- <ea:parameter property="docbook.documentation.dir" description="directory where the documentation is stored in the project"
- default="${src.documentation.dir}/docbook"/>
-
- <ea:parameter property="docbook.index.file" description="the main docbook source file"
- default="${docbook.documentation.dir}/index.xml"/>
- <ea:parameter property="docbook.output.file" description="path of the HTML index file for generated documentation"
- default="${target.documentation.dir}/index.html"/>
-
- <ea:parameter property="docbook.parameters"
- description="whitespace-separated list of parameter values to pass to the DocBook XSL, for example 'param1=value1 param2=value2'"
- default=""/>
-
- </target>
-
- <target name=":generate" phase="documentation" depends=":init" unless="skip.documentation" description="generate documentation">
-
- <!-- unpack docbook xsl resources into the local module directory -->
- <mkdir dir="${docbook.module.dir}/docbook-xsl"/>
-
- <ivy:retrieve inline="true"
- organisation="org.apache.easyant.plugins"
- module="docbook"
- revision="0.1"
- conf="docbook_dist"
- pattern="${docbook.module.dir}/docbook-xsl/[artifact](-[classifier]).[ext]"
- settingsRef="easyant.ivy.instance"/>
-
- <echo>Unpacking docbook XSL distribution...</echo>
- <unzip src="${docbook.module.dir}/docbook-xsl/docbook-xsl-resources.zip"
- dest="${docbook.module.dir}" overwrite="false"/>
-
- <mkdir dir="${target.documentation.dir}/html" />
- <copy todir="${target.documentation.dir}/html">
- <fileset dir="${src.documentation.dir}/html" includes="**/*" erroronmissingdir="false"/>
- </copy>
-
- <!-- convert to absolute path -->
- <property name="docbook.index.path" location="${docbook.index.file}"/>
-
- <!-- TODO: support other transforms: PDF, html-single, manpage, slides -->
- <java classname="com.icl.saxon.StyleSheet" fork="true"
- failonerror="true" dir="${target.documentation.dir}/html"
- classpathref="org.apache.easyant.plugins#docbook.classpath">
- <sysproperty key="javax.xml.parsers.DocumentBuilderFactory" value="org.apache.xerces.jaxp.DocumentBuilderFactoryImpl"/>
- <sysproperty key="javax.xml.parsers.SAXParserFactory" value="org.apache.xerces.jaxp.SAXParserFactoryImpl"/>
- <sysproperty key="org.apache.xerces.xni.parser.XMLParserConfiguration" value="org.apache.xerces.parsers.XIncludeParserConfiguration"/>
- <jvmarg value="-Xmx256M"/>
- <arg value="${docbook.index.path}"/>
- <arg value="${docbook.module.dir}/docbook/html/chunk.xsl"/>
- <arg line="${docbook.parameters}"/>
- </java>
-
- </target>
+ xmlns:ivy="antlib:org.apache.ivy.ant"
+ xmlns:m="http://ant.apache.org/ivy/maven"
+ xmlns:ea="antlib:org.apache.easyant">
+
+ <ea:core-version requiredrevision="[0.8,+]" />
+ <dirname file="${ant.file.org.apache.easyant.plugins#docbook}" property="docbook.module.dir" />
+
+ <target name=":init" phase="validate">
+
+ <ea:parameter phase="validate" />
+ <ea:parameter phase="documentation" />
+
+ <ea:parameter property="target.documentation.dir" description="directory where the documentation will be generated to"
+ default="target/documentation"/>
+ <ea:parameter property="src.documentation.dir" description="directory where documentation sources reside"
+ default="src/documentation"/>
+
+ <ea:parameter property="docbook.documentation.dir" description="directory where the documentation is stored in the project"
+ default="${src.documentation.dir}/docbook"/>
+
+ <ea:parameter property="docbook.index.file" description="the main docbook source file"
+ default="${docbook.documentation.dir}/index.xml"/>
+ <ea:parameter property="docbook.output.file" description="path of the HTML index file for generated documentation"
+ default="${target.documentation.dir}/index.html"/>
+
+ <ea:parameter property="docbook.parameters"
+ description="whitespace-separated list of parameter values to pass to the DocBook XSL, for example 'param1=value1 param2=value2'"
+ default=""/>
+
+ </target>
+
+ <target name=":generate" phase="documentation" depends=":init" unless="skip.documentation" description="generate documentation">
+
+ <!-- unpack docbook xsl resources into the local module directory -->
+ <mkdir dir="${docbook.module.dir}/docbook-xsl"/>
+
+ <ivy:retrieve inline="true"
+ organisation="org.apache.easyant.plugins"
+ module="docbook"
+ revision="0.1"
+ conf="docbook_dist"
+ pattern="${docbook.module.dir}/docbook-xsl/[artifact](-[classifier]).[ext]"
+ settingsRef="easyant.ivy.instance"/>
+
+ <echo>Unpacking docbook XSL distribution...</echo>
+ <unzip src="${docbook.module.dir}/docbook-xsl/docbook-xsl-resources.zip"
+ dest="${docbook.module.dir}" overwrite="false"/>
+
+ <mkdir dir="${target.documentation.dir}/html" />
+ <copy todir="${target.documentation.dir}/html">
+ <fileset dir="${src.documentation.dir}/html" includes="**/*" erroronmissingdir="false"/>
+ </copy>
+
+ <!-- convert to absolute path -->
+ <property name="docbook.index.path" location="${docbook.index.file}"/>
+
+ <!-- TODO: support other transforms: PDF, html-single, manpage, slides -->
+ <java classname="com.icl.saxon.StyleSheet" fork="true"
+ failonerror="true" dir="${target.documentation.dir}/html"
+ classpathref="org.apache.easyant.plugins#docbook.classpath">
+ <sysproperty key="javax.xml.parsers.DocumentBuilderFactory" value="org.apache.xerces.jaxp.DocumentBuilderFactoryImpl"/>
+ <sysproperty key="javax.xml.parsers.SAXParserFactory" value="org.apache.xerces.jaxp.SAXParserFactoryImpl"/>
+ <sysproperty key="org.apache.xerces.xni.parser.XMLParserConfiguration" value="org.apache.xerces.parsers.XIncludeParserConfiguration"/>
+ <jvmarg value="-Xmx256M"/>
+ <arg value="${docbook.index.path}"/>
+ <arg value="${docbook.module.dir}/docbook/html/chunk.xsl"/>
+ <arg line="${docbook.parameters}"/>
+ </java>
+
+ </target>
- <target name="doit" depends=":generate" />
-
+ <target name="doit" depends=":generate" />
+
</project>
Modified: incubator/easyant/plugins/trunk/documentation/module.ivy
URL: http://svn.apache.org/viewvc/incubator/easyant/plugins/trunk/documentation/module.ivy?rev=1073355&r1=1073354&r2=1073355&view=diff
==============================================================================
--- incubator/easyant/plugins/trunk/documentation/module.ivy (original)
+++ incubator/easyant/plugins/trunk/documentation/module.ivy Tue Feb 22 14:59:17 2011
@@ -15,8 +15,8 @@
limitations under the License.
-->
<ivy-module version="2.0" xmlns:ea="http://www.easyant.org">
- <info organisation="org.apache.easyant.plugins" module="documentation" revision="0.1">
- <description><p>This module is used to generate documentation (out of XDOC files).<br/>
+ <info organisation="org.apache.easyant.plugins" module="documentation" revision="0.1">
+ <description><p>This module is used to generate documentation (out of XDOC files).<br/>
Your project must have the following structure:<br/>
src--<br/>
|documentation ($src.documentation.dir)<br/>
@@ -25,7 +25,7 @@
You can provide a CSS-Stylesheet for the format of the page ($documentation.css.dir), furthermore, you can provide your <br/>
own XSL-Stylesheet for the conversion of the XDOC-Documents to HTML.</p>
</description>
- <ea:build organisation="org.apache.easyant.buildtypes" module="build-std-ant-plugin" revision="0.1"/>
+ <ea:build organisation="org.apache.easyant.buildtypes" module="build-std-ant-plugin" revision="0.1"/>
</info>
<configurations>
<conf name="default" description="runtime dependencies artifact can be used with this conf"/>
@@ -37,5 +37,5 @@
<artifact type="xsl" name="site"/>
<artifact type="css" name="style"/>
</publications>
- <dependencies/>
+ <dependencies/>
</ivy-module>
Modified: incubator/easyant/plugins/trunk/documentation/src/main/resources/documentation.ant
URL: http://svn.apache.org/viewvc/incubator/easyant/plugins/trunk/documentation/src/main/resources/documentation.ant?rev=1073355&r1=1073354&r2=1073355&view=diff
==============================================================================
--- incubator/easyant/plugins/trunk/documentation/src/main/resources/documentation.ant (original)
+++ incubator/easyant/plugins/trunk/documentation/src/main/resources/documentation.ant Tue Feb 22 14:59:17 2011
@@ -15,89 +15,89 @@
limitations under the License.
-->
<project name="org.apache.easyant.plugins#documentation" xmlns:ea="antlib:org.apache.easyant">
-
- <ea:core-version requiredrevision="[0.8,+]" />
+
+ <ea:core-version requiredrevision="[0.8,+]" />
- <dirname file="${org.apache.easyant.plugins#documentation.style.css.file}" property="org.apache.easyant.plugins#documentation.style.css.dir" />
+ <dirname file="${org.apache.easyant.plugins#documentation.style.css.file}" property="org.apache.easyant.plugins#documentation.style.css.dir" />
- <target name=":init" phase="validate">
- <ea:parameter phase="validate" />
- <ea:parameter phase="verify" />
- <ea:parameter phase="documentation" />
-
- <ea:parameter property="documentation.xsl.file" default="${org.apache.easyant.plugins#documentation.site.xsl.file}" description="xsl, used to transform XML -> HTML" />
- <ea:parameter property="documentation.css.dir" default="{org.apache.easyant.plugins#documentation.style.css.dir}" description="path where the css are stored, used for nice looking HTML" />
- <ea:parameter property="target.documentation.dir" default="${target}/documentation" description="directory where the documentation will be generated to" />
- <ea:parameter property="src.dir" default="${user.dir}/src" description="directory containing projects sources" />
- <ea:parameter property="src.documentation.dir" default="${src.dir}/documentation" description="directory where the documentation is stored in the project" />
- <ea:parameter property="documentation.menu.file" default="${src.documentation.dir}/menu.xml" description="the file, which stores the navigation" />
-
- <condition property="xslt.available">
- <available classname="org.apache.tools.ant.taskdefs.optional.TraXLiaison" />
- </condition>
- <fail message="Ant xslt was not found. Please install ant-nodeps in your ANT_HOME" unless="xslt.available" />
-
- <available file="${documentation.xsl.file}" property="has.documentation.xsl.file" />
- <fail message="documentation.xsl.file was not found. Please reference this file appropriately" unless="has.documentation.xsl.file" />
-
- <available file="${src.documentation.dir}" property="has.src.documentation.dir" />
- <available file="${documentation.menu.file}" property="has.documentation.menu.file" />
-
- <available file="${documentation.css.dir}" property="has.documentation.css.dir" />
- </target>
-
- <target name="-warn-src.documentation.dir.missing" unless="has.src.documentation.dir">
- <echo>WARN: Your project doesn't match with documentation structure.</echo>
- <echo> If you want to use the documentation feature you must create ${src.documentation.dir} directory. This directory must have a menu.xml file</echo>
- <echo> If you want to have more information, you should look at the documentation of this module.</echo>
- <property name="skip.documentation" value="true" />
- </target>
-
- <target name="-warn-documentation.menu.file.missing" unless="has.documentation.menu.file">
- <echo>WARN: Your project doesn't match with documentation structure (documentation menu file is missing).</echo>
- <echo> If you want to have more information, you should look at the documentation of this module.</echo>
- <property name="skip.documentation" value="true" />
- </target>
-
- <target name="-documentation" unless="skip.documentation"
- phase="documentation"
- depends="validate, -warn-src.documentation.dir.missing, -warn-documentation.menu.file.missing, -copy-css, process-documentation-resources">
- <mkdir dir="${target.documentation.dir}" />
-
- <echo message="Transforming the site documents..." />
- <xslt basedir="${src.documentation.dir}" destdir="${target.documentation.dir}" extension=".html" style="${documentation.xsl.file}" excludes="${documentation.menu.file}" includes="*.xml"> <param name="relative-path" expression="." />
- <param name="menu-src-path" expression="${src.documentation.dir}" />
- <param name="menu-file" expression="${documentation.menu.file}" />
- </xslt>
+ <target name=":init" phase="validate">
+ <ea:parameter phase="validate" />
+ <ea:parameter phase="verify" />
+ <ea:parameter phase="documentation" />
+
+ <ea:parameter property="documentation.xsl.file" default="${org.apache.easyant.plugins#documentation.site.xsl.file}" description="xsl, used to transform XML -> HTML" />
+ <ea:parameter property="documentation.css.dir" default="{org.apache.easyant.plugins#documentation.style.css.dir}" description="path where the css are stored, used for nice looking HTML" />
+ <ea:parameter property="target.documentation.dir" default="${target}/documentation" description="directory where the documentation will be generated to" />
+ <ea:parameter property="src.dir" default="${user.dir}/src" description="directory containing projects sources" />
+ <ea:parameter property="src.documentation.dir" default="${src.dir}/documentation" description="directory where the documentation is stored in the project" />
+ <ea:parameter property="documentation.menu.file" default="${src.documentation.dir}/menu.xml" description="the file, which stores the navigation" />
+
+ <condition property="xslt.available">
+ <available classname="org.apache.tools.ant.taskdefs.optional.TraXLiaison" />
+ </condition>
+ <fail message="Ant xslt was not found. Please install ant-nodeps in your ANT_HOME" unless="xslt.available" />
+
+ <available file="${documentation.xsl.file}" property="has.documentation.xsl.file" />
+ <fail message="documentation.xsl.file was not found. Please reference this file appropriately" unless="has.documentation.xsl.file" />
+
+ <available file="${src.documentation.dir}" property="has.src.documentation.dir" />
+ <available file="${documentation.menu.file}" property="has.documentation.menu.file" />
+
+ <available file="${documentation.css.dir}" property="has.documentation.css.dir" />
+ </target>
+
+ <target name="-warn-src.documentation.dir.missing" unless="has.src.documentation.dir">
+ <echo>WARN: Your project doesn't match with documentation structure.</echo>
+ <echo> If you want to use the documentation feature you must create ${src.documentation.dir} directory. This directory must have a menu.xml file</echo>
+ <echo> If you want to have more information, you should look at the documentation of this module.</echo>
+ <property name="skip.documentation" value="true" />
+ </target>
+
+ <target name="-warn-documentation.menu.file.missing" unless="has.documentation.menu.file">
+ <echo>WARN: Your project doesn't match with documentation structure (documentation menu file is missing).</echo>
+ <echo> If you want to have more information, you should look at the documentation of this module.</echo>
+ <property name="skip.documentation" value="true" />
+ </target>
+
+ <target name="-documentation" unless="skip.documentation"
+ phase="documentation"
+ depends="validate, -warn-src.documentation.dir.missing, -warn-documentation.menu.file.missing, -copy-css, process-documentation-resources">
+ <mkdir dir="${target.documentation.dir}" />
+
+ <echo message="Transforming the site documents..." />
+ <xslt basedir="${src.documentation.dir}" destdir="${target.documentation.dir}" extension=".html" style="${documentation.xsl.file}" excludes="${documentation.menu.file}" includes="*.xml"> <param name="relative-path" expression="." />
+ <param name="menu-src-path" expression="${src.documentation.dir}" />
+ <param name="menu-file" expression="${documentation.menu.file}" />
+ </xslt>
- <!-- Copy static resource files
+ <!-- Copy static resource files
in the future try to solve this via a patternset.
-->
- <echo message="Copying static resource files... (images)" />
- <copy todir="${target.documentation.dir}" filtering="no">
- <fileset dir="${src.documentation.dir}">
- <include name="**/*.gif" />
- <include name="**/*.png" />
- <include name="**/*.jpg" />
- </fileset>
- </copy>
-
- </target>
-
- <!-- Copy CSS stylesheets -->
- <target name="-copy-css" if="has.documentation.css.dir" unless="skip.documentation" phase="process-documentation-resources">
- <echo message="Copying CSS files..." />
- <copy todir="${target.documentation.dir}" filtering="no">
- <fileset dir="${documentation.css.dir}">
- <include name="**/*.css" />
- </fileset>
- </copy>
- </target>
-
- <target name=":documentation" depends="-documentation" unless="skip.documentation" description="generate documentation">
- <fail if="documentation.failure" message="There are documentation violation(s)" />
- </target>
+ <echo message="Copying static resource files... (images)" />
+ <copy todir="${target.documentation.dir}" filtering="no">
+ <fileset dir="${src.documentation.dir}">
+ <include name="**/*.gif" />
+ <include name="**/*.png" />
+ <include name="**/*.jpg" />
+ </fileset>
+ </copy>
+
+ </target>
+
+ <!-- Copy CSS stylesheets -->
+ <target name="-copy-css" if="has.documentation.css.dir" unless="skip.documentation" phase="process-documentation-resources">
+ <echo message="Copying CSS files..." />
+ <copy todir="${target.documentation.dir}" filtering="no">
+ <fileset dir="${documentation.css.dir}">
+ <include name="**/*.css" />
+ </fileset>
+ </copy>
+ </target>
+
+ <target name=":documentation" depends="-documentation" unless="skip.documentation" description="generate documentation">
+ <fail if="documentation.failure" message="There are documentation violation(s)" />
+ </target>
- <target name="doit" depends=":documentation" />
+ <target name="doit" depends=":documentation" />
</project>
Modified: incubator/easyant/plugins/trunk/documentation/src/main/resources/site.xsl
URL: http://svn.apache.org/viewvc/incubator/easyant/plugins/trunk/documentation/src/main/resources/site.xsl?rev=1073355&r1=1073354&r2=1073355&view=diff
==============================================================================
--- incubator/easyant/plugins/trunk/documentation/src/main/resources/site.xsl (original)
+++ incubator/easyant/plugins/trunk/documentation/src/main/resources/site.xsl Tue Feb 22 14:59:17 2011
@@ -37,9 +37,9 @@
<xsl:param name="menu-src-path" select="'.'"/>
<!-- Process an entire document into an HTML page -->
<xsl:template match="document">
- <xsl:variable name="filename" select="concat($menu-src-path, '/menu.xml')"/>
+ <xsl:variable name="filename" select="concat($menu-src-path, '/menu.xml')"/>
<xsl:variable name="project"
- select="document($filename)/project"/>
+ select="document($filename)/project"/>
<xsl:variable name="homelink" select="project/@href"/>
<xsl:variable name="title" select="$project/title"/>
@@ -65,7 +65,7 @@
</xsl:if>
<style type="text/css" media="all">
- @import url("style.css");
+ @import url("style.css");
</style>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
</head>
@@ -75,10 +75,10 @@
<div id="inner_body">
<div id="frame_logo">
<div class="logo">
- <a href="{$homelink}"
- title="{$title}">
- <img src="{$logo}" alt="{$title}" border="0" />
- </a>
+ <a href="{$homelink}"
+ title="{$title}">
+ <img src="{$logo}" alt="{$title}" border="0" />
+ </a>
</div>
<div class="title">
@@ -96,11 +96,11 @@
</div>
</div>
- <div id="footer">
+ <div id="footer">
<em>Copyright © 1999-2008, The Apache Software Foundation</em>
</div>
- </div>
- </div>
+ </div>
+ </div>
</body>
</html>
</xsl:template>
Modified: incubator/easyant/plugins/trunk/documentation/src/main/resources/style.css
URL: http://svn.apache.org/viewvc/incubator/easyant/plugins/trunk/documentation/src/main/resources/style.css?rev=1073355&r1=1073354&r2=1073355&view=diff
==============================================================================
--- incubator/easyant/plugins/trunk/documentation/src/main/resources/style.css (original)
+++ incubator/easyant/plugins/trunk/documentation/src/main/resources/style.css Tue Feb 22 14:59:17 2011
@@ -69,14 +69,14 @@ h4 {
}
#frame_logo {
- height: 70px;
- width: 100%;
+ height: 70px;
+ width: 100%;
}
#frame_logo .logo {
- float: left;
- width: 30%;
- padding-top: 0;
+ float: left;
+ width: 30%;
+ padding-top: 0;
}
#frame_logo .title {
@@ -88,10 +88,10 @@ h4 {
}
#empty_header {
- clear: both;
- width: 100%;
- height: 21px;
- background: #E9E9E9;
+ clear: both;
+ width: 100%;
+ height: 21px;
+ background: #E9E9E9;
}
#content_wrapper {
@@ -103,7 +103,7 @@ h4 {
#content_wrapper .nav_left {
float: left;
- width: 15%;
+ width: 15%;
}
#content_wrapper .nav_left h1 {
Modified: incubator/easyant/plugins/trunk/eadoc/module.ivy
URL: http://svn.apache.org/viewvc/incubator/easyant/plugins/trunk/eadoc/module.ivy?rev=1073355&r1=1073354&r2=1073355&view=diff
==============================================================================
--- incubator/easyant/plugins/trunk/eadoc/module.ivy (original)
+++ incubator/easyant/plugins/trunk/eadoc/module.ivy Tue Feb 22 14:59:17 2011
@@ -15,24 +15,24 @@
limitations under the License.
-->
<ivy-module version="2.0" xmlns:ea="http://www.easyant.org">
- <info organisation="org.apache.easyant.plugins" module="eadoc" revision="0.1">
- <description>
- EADoc generates <a href="http://xooki.sourceforge.net/">xooki</a>
- documentation for EasyAnt modules (plugins and buildtypes).
- The description for each module is culled from that module's Ivy descriptor.
- Information about the module's phases and parameters is taken from the module's
- Ant script.
- </description>
- <ea:build organisation="org.apache.easyant.buildtypes" module="build-std-ant-plugin" revision="0.1"/>
+ <info organisation="org.apache.easyant.plugins" module="eadoc" revision="0.1">
+ <description>
+ EADoc generates <a href="http://xooki.sourceforge.net/">xooki</a>
+ documentation for EasyAnt modules (plugins and buildtypes).
+ The description for each module is culled from that module's Ivy descriptor.
+ Information about the module's phases and parameters is taken from the module's
+ Ant script.
+ </description>
+ <ea:build organisation="org.apache.easyant.buildtypes" module="build-std-ant-plugin" revision="0.1"/>
</info>
<configurations>
<conf name="default" description="runtime dependencies artifact can be used with this conf"/>
<conf name="test" description="this scope indicates that the dependency is not required for normal use of the application, and is only available for the test compilation and execution phases."/>
<conf name="provided" description="this is much like compile, but indicates you expect the JDK or a container to provide it. It is only available on the compilation classpath, and is not transitive."/>
</configurations>
- <publications>
- <artifact type="ant"/>
- <artifact name="eadoc-plugin" type="xsl"/>
- <artifact name="eadoc-buildtype" type="xsl"/>
- </publications>
+ <publications>
+ <artifact type="ant"/>
+ <artifact name="eadoc-plugin" type="xsl"/>
+ <artifact name="eadoc-buildtype" type="xsl"/>
+ </publications>
</ivy-module>
Modified: incubator/easyant/plugins/trunk/eadoc/src/main/resources/eadoc-buildtype.xsl
URL: http://svn.apache.org/viewvc/incubator/easyant/plugins/trunk/eadoc/src/main/resources/eadoc-buildtype.xsl?rev=1073355&r1=1073354&r2=1073355&view=diff
==============================================================================
--- incubator/easyant/plugins/trunk/eadoc/src/main/resources/eadoc-buildtype.xsl (original)
+++ incubator/easyant/plugins/trunk/eadoc/src/main/resources/eadoc-buildtype.xsl Tue Feb 22 14:59:17 2011
@@ -16,372 +16,372 @@
limitations under the License.
-->
- <!--
- Generate xooki documentation from a buildtype ant file. Stylesheet
- parameters are passed in by eadoc.ant at runtime.
- -->
+ <!--
+ Generate xooki documentation from a buildtype ant file. Stylesheet
+ parameters are passed in by eadoc.ant at runtime.
+ -->
<xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ea="antlib:org.apache.easyant"
- xmlns:exsl="http://exslt.org/common" extension-element-prefixes="exsl"
- exclude-result-prefixes="#all">
-
- <xsl:param name="pluginOrganisation">org.apache.easyant.plugins</xsl:param>
- <xsl:param name="typeOrganisation">org.apache.easyant.buildtypes</xsl:param>
-
- <!-- xooki TOC level for the output HTML document -->
- <xsl:param name="tocLevel">2</xsl:param>
-
- <xsl:output method="html" indent="yes" omit-xml-declaration="yes"
- doctype-public="-//W3C//DTD HTML 4.01//EN" doctype-system="http://www.w3.org/TR/html4/strict.dtd" />
-
- <xsl:template match="/ivy-report/dependencies/module/revision">
- <xsl:variable name="moduleVersion" select="@name" />
- <xsl:variable name="moduleDescription" select="description" />
- <xsl:variable name="typeName" select="../@name" />
- <xsl:variable name="moduleOrganisation" select="../@organisation"/>
- <xsl:comment>
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
- </xsl:comment>
- <xsl:text>
- </xsl:text>
- <xsl:comment>
- <xsl:value-of select="$typeName" />
- documentation autogenerated by EADoc
- </xsl:comment>
- <xsl:text>
- </xsl:text>
- <html>
- <head>
- <title>
- EasyAnt BuildType <xsl:value-of select="$typeName" /><xsl:text> </xsl:text><xsl:value-of select="concat('v', $moduleVersion)" />
- </title>
- <script type="text/javascript">
- var xookiConfig = {level:<xsl:value-of select="$tocLevel" />};
- </script>
- <script type="text/javascript" src="../../xooki/xooki.js">
- <xsl:text></xsl:text>
- </script>
- </head>
- <body>
- <textarea id="xooki-source">
-
- <xsl:call-template name="outputHeader">
- <xsl:with-param name="typeName" select="$typeName" />
- <xsl:with-param name="typeVersion" select="$moduleVersion" />
- </xsl:call-template>
-
- <xsl:if test="$moduleDescription">
- <h2>Overview</h2>
- <p>
- <xsl:copy-of select="$moduleDescription"/>
- </p>
- </xsl:if>
-
- <div id="sample">
- <h2>Example</h2>
- You can use this buildtype by adding the following code in your module.ivy (or module.ant) file
- <code type="xml">
- <ea:build>
- <xsl:attribute name="organisation">
- <xsl:value-of select="$moduleOrganisation"/>
- </xsl:attribute>
- <xsl:attribute name="module">
- <xsl:value-of select="$typeName"/>
- </xsl:attribute>
- <xsl:attribute name="rev">
- <xsl:value-of select="$moduleVersion"/>
- </xsl:attribute>
- </ea:build>
- </code>
- <xsl:if test="$moduleOrganisation='org.apache.easyant.buildtypes'">
- <div id="note">Note: The organisation argument in <b>ea:build</b> tag is optional. If not specified easyant will use the default one (org.apache.easyant.buildtypes).</div>
- Shorter form :
- <code type="xml">
- <ea:build>
- <xsl:attribute name="module">
- <xsl:value-of select="$typeName"/>
- </xsl:attribute>
- <xsl:attribute name="rev">
- <xsl:value-of select="$moduleVersion"/>
- </xsl:attribute>
- </ea:build>
- </code>
- </xsl:if>
- </div>
- <xsl:call-template name="outputPhaseDescriptions" />
- <xsl:call-template name="outputParameterTable" />
-
-
- </textarea>
- <script type="text/javascript">xooki.postProcess();</script>
- </body>
- </html>
-
- </xsl:template>
-
-
- <!-- Output type name and generate links to extended types -->
- <xsl:template name="outputHeader">
- <xsl:param name="typeName" />
- <xsl:param name="typeVersion" />
- <h1>
- BuildType
- <xsl:value-of select="$typeName" />
- <xsl:text> </xsl:text>
- <xsl:value-of select="concat('v', $typeVersion)" />
- </h1>
- <xsl:if test="easyant/imports/import[@organisation = $typeOrganisation]">
- <div class="parent-types">
- extends
- <xsl:for-each
- select="easyant/imports/import[@organisation = $typeOrganisation]">
- <xsl:variable name="parentName" select="@name" />
- <xsl:element name="a">
- <xsl:attribute name="href"><xsl:value-of
- select="concat($parentName, '.html')" /></xsl:attribute>
- <xsl:value-of select="$parentName" />
- </xsl:element>
- </xsl:for-each>
- </div>
- </xsl:if>
- <hr />
- </xsl:template>
-
- <!-- Generate an HTML table summarizing parameters used by the type -->
- <xsl:template name="outputParameterTable">
- <xsl:if test="easyant/properties/property">
- <h2>Parameters</h2>
- <p>The following property values can be changed to tune the behavior of this buildtype.
- Required parameters must be defined upon import, or the build will fail.</p>
- <table class="sortable" id="type-parameters">
- <thead>
- <tr>
- <th>Parameter</th>
- <th>Required?</th>
- <th class="unsortable">Description</th>
- </tr>
- </thead>
- <tbody>
- <xsl:for-each select="easyant/properties/property">
- <xsl:sort select="@name" />
- <tr>
- <td>
- <xsl:value-of select="@name" />
- </td>
- <td>
- <xsl:choose>
- <xsl:when test="@required = 'true'">Yes</xsl:when>
- <xsl:otherwise>No</xsl:otherwise>
- </xsl:choose>
- </td>
- <td>
- <xsl:if test="@description">
- <xsl:value-of select="@description" /><br/>
- </xsl:if>
- <xsl:if test="not(@value) and @default">
- <span class="bold">Default: </span><span id="defaultValue"><xsl:value-of select="@default" /></span><br/>
- </xsl:if>
- <xsl:if test="@value">
- <span class="bold">BuildType value: </span><span id="buildTypeValue"><xsl:value-of select="@value" /></span>
- </xsl:if>
- </td>
- </tr>
- </xsl:for-each>
- </tbody>
- </table>
- </xsl:if>
- </xsl:template>
-
- <!--
- Generate a list describing what the type does during each build phase
- -->
- <xsl:template name="outputPhaseDescriptions">
-
- <!--
- an XML fragment that condenses nested phases and targets into a flat
- list, so that we can then make an output summary table.
- -->
- <xsl:variable name="typeSummary">
- <project>
- <xsl:call-template name="add-plugin-targets">
- <xsl:with-param name="as" select="" />
- </xsl:call-template>
- </project>
- </xsl:variable>
- <xsl:variable name="phaseTargets" select="exsl:node-set($typeSummary)/project" />
-
- <h2>Plugins</h2>
- <p>
- This build type loads each of the following <a href="../plugins/plugins.html">plugins</a>:
- </p>
- <div class="type-plugins">
- <xsl:for-each select="easyant/imports/import[@organisation=$pluginOrganisation]">
- <xsl:variable name="pluginName" select="@name"/>
- <xsl:if test="position() > 1"><xsl:text>, </xsl:text></xsl:if>
- <a href="{concat('../plugins/', $pluginName, '.html')}">
- <xsl:value-of select="$pluginName"/>
- </a>
- </xsl:for-each>
- </div>
-
-
- <h2>Build Phases</h2>
- <p>
- This build type takes the following actions during each <a href="../phases.html">build phase</a> :
- </p>
- <table id="buildtype-phases">
- <thead>
- <tr class="header-row">
- <th>Phase</th>
- <th>Description</th>
- </tr>
- </thead>
- <tbody>
- <xsl:for-each
- select="$phaseTargets/phase[not(@name = preceding::phase/@name)]">
- <xsl:variable name="currentPhase" select="string(@name)" />
- <xsl:variable name="currentPhaseTargets"
- select="$phaseTargets/target[@phase=$currentPhase]" />
- <xsl:if test="$currentPhaseTargets">
- <tr class="phase-row">
- <td>
- <span class="phase-name">
- <xsl:value-of select="$currentPhase" />
- </span>
- </td>
- <td>
- <span class="phase-description">
- <xsl:value-of select="@description" />
- </span>
- <table class="sortable" id="type-phases">
- <thead>
- <tr class="header-row">
- <th>Target</th>
- <th>Description</th>
- <th>From Plugin</th>
- </tr>
- </thead>
- <tbody>
- <xsl:for-each select="$currentPhaseTargets">
- <tr>
- <td class="target-name">
- <xsl:value-of select="@name" />
- </td>
- <td>
- <xsl:value-of select="@description" />
- </td>
- <td>
- <xsl:if test="@plugin">
- <a>
- <xsl:attribute name="href"><xsl:value-of
- select="concat('../plugins/', @plugin, '.html')" /></xsl:attribute>
- <xsl:value-of select="@plugin" />
- </a>
- </xsl:if>
- </td>
-
- </tr>
- </xsl:for-each>
- </tbody>
- </table>
- </td>
- </tr>
-
- </xsl:if>
- </xsl:for-each>
- </tbody>
- </table>
-
- <xsl:if test="$phaseTargets/target[not(@phase or starts-with(@name, '-'))]">
- <h2>Extra Targets</h2>
- <p>
- This type defines some extra Ant targets not attached to any <a href="../phases.html">build phase</a> :
- </p>
- <table class="sortable" id="type-phases">
- <thead>
- <tr class="header-row">
- <th>Target</th>
- <th class="unsortable">Description</th>
- <th>From Plugin</th>
- </tr>
- </thead>
- <tbody>
- <xsl:for-each
- select="$phaseTargets/target[not(@phase or starts-with(@name, '-'))]">
- <tr>
- <td class="target-name">
- <xsl:value-of select="@name" />
- </td>
- <td>
- <xsl:value-of select="@description" />
- </td>
- <xsl:if test="@plugin">
- <td>
- <a>
- <xsl:attribute name="href"><xsl:value-of
- select="concat('../plugins/', @plugin, '.html')" /></xsl:attribute>
- <xsl:value-of select="@plugin" />
- </a>
- </td>
- </xsl:if>
- </tr>
- </xsl:for-each>
- </tbody>
- </table>
- </xsl:if>
- </xsl:template>
-
- <!--
- for the current module, output one 'target' element for each target in
- that module, recursively adding targets for imported plugins. The
- optional parameter 'as' is prepended to the name of each target.
- -->
- <xsl:template name="add-plugin-targets">
- <xsl:param name="as" />
- <xsl:for-each
- select="easyant/imports/import[@organisation=$pluginOrganisation]">
- <xsl:variable name="pluginName" select="@name" />
- <xsl:variable name="prefix" select="concat($as, @as)" />
- <xsl:for-each select="easyant/phases/phase">
- <phase>
- <xsl:attribute name="name"><xsl:value-of
- select="@name" /></xsl:attribute>
- <xsl:attribute name="description"><xsl:value-of
- select="@description" /></xsl:attribute>
- </phase>
- </xsl:for-each>
- <xsl:for-each select="easyant/targets/target">
- <target>
- <xsl:attribute name="name"><xsl:value-of
- select="concat($prefix, @name)" /></xsl:attribute>
- <xsl:attribute name="plugin"><xsl:value-of
- select="$pluginName" /></xsl:attribute>
- <xsl:for-each select="@*[name() != 'name']">
- <xsl:copy-of select="." />
- </xsl:for-each>
- </target>
- </xsl:for-each>
- <xsl:call-template name="add-plugin-targets">
- <xsl:with-param name="as" select="$prefix" />
- </xsl:call-template>
- </xsl:for-each>
- </xsl:template>
-
- <xsl:template match="text()"/>
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ea="antlib:org.apache.easyant"
+ xmlns:exsl="http://exslt.org/common" extension-element-prefixes="exsl"
+ exclude-result-prefixes="#all">
+
+ <xsl:param name="pluginOrganisation">org.apache.easyant.plugins</xsl:param>
+ <xsl:param name="typeOrganisation">org.apache.easyant.buildtypes</xsl:param>
+
+ <!-- xooki TOC level for the output HTML document -->
+ <xsl:param name="tocLevel">2</xsl:param>
+
+ <xsl:output method="html" indent="yes" omit-xml-declaration="yes"
+ doctype-public="-//W3C//DTD HTML 4.01//EN" doctype-system="http://www.w3.org/TR/html4/strict.dtd" />
+
+ <xsl:template match="/ivy-report/dependencies/module/revision">
+ <xsl:variable name="moduleVersion" select="@name" />
+ <xsl:variable name="moduleDescription" select="description" />
+ <xsl:variable name="typeName" select="../@name" />
+ <xsl:variable name="moduleOrganisation" select="../@organisation"/>
+ <xsl:comment>
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ </xsl:comment>
+ <xsl:text>
+ </xsl:text>
+ <xsl:comment>
+ <xsl:value-of select="$typeName" />
+ documentation autogenerated by EADoc
+ </xsl:comment>
+ <xsl:text>
+ </xsl:text>
+ <html>
+ <head>
+ <title>
+ EasyAnt BuildType <xsl:value-of select="$typeName" /><xsl:text> </xsl:text><xsl:value-of select="concat('v', $moduleVersion)" />
+ </title>
+ <script type="text/javascript">
+ var xookiConfig = {level:<xsl:value-of select="$tocLevel" />};
+ </script>
+ <script type="text/javascript" src="../../xooki/xooki.js">
+ <xsl:text></xsl:text>
+ </script>
+ </head>
+ <body>
+ <textarea id="xooki-source">
+
+ <xsl:call-template name="outputHeader">
+ <xsl:with-param name="typeName" select="$typeName" />
+ <xsl:with-param name="typeVersion" select="$moduleVersion" />
+ </xsl:call-template>
+
+ <xsl:if test="$moduleDescription">
+ <h2>Overview</h2>
+ <p>
+ <xsl:copy-of select="$moduleDescription"/>
+ </p>
+ </xsl:if>
+
+ <div id="sample">
+ <h2>Example</h2>
+ You can use this buildtype by adding the following code in your module.ivy (or module.ant) file
+ <code type="xml">
+ <ea:build>
+ <xsl:attribute name="organisation">
+ <xsl:value-of select="$moduleOrganisation"/>
+ </xsl:attribute>
+ <xsl:attribute name="module">
+ <xsl:value-of select="$typeName"/>
+ </xsl:attribute>
+ <xsl:attribute name="rev">
+ <xsl:value-of select="$moduleVersion"/>
+ </xsl:attribute>
+ </ea:build>
+ </code>
+ <xsl:if test="$moduleOrganisation='org.apache.easyant.buildtypes'">
+ <div id="note">Note: The organisation argument in <b>ea:build</b> tag is optional. If not specified easyant will use the default one (org.apache.easyant.buildtypes).</div>
+ Shorter form :
+ <code type="xml">
+ <ea:build>
+ <xsl:attribute name="module">
+ <xsl:value-of select="$typeName"/>
+ </xsl:attribute>
+ <xsl:attribute name="rev">
+ <xsl:value-of select="$moduleVersion"/>
+ </xsl:attribute>
+ </ea:build>
+ </code>
+ </xsl:if>
+ </div>
+ <xsl:call-template name="outputPhaseDescriptions" />
+ <xsl:call-template name="outputParameterTable" />
+
+
+ </textarea>
+ <script type="text/javascript">xooki.postProcess();</script>
+ </body>
+ </html>
+
+ </xsl:template>
+
+
+ <!-- Output type name and generate links to extended types -->
+ <xsl:template name="outputHeader">
+ <xsl:param name="typeName" />
+ <xsl:param name="typeVersion" />
+ <h1>
+ BuildType
+ <xsl:value-of select="$typeName" />
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="concat('v', $typeVersion)" />
+ </h1>
+ <xsl:if test="easyant/imports/import[@organisation = $typeOrganisation]">
+ <div class="parent-types">
+ extends
+ <xsl:for-each
+ select="easyant/imports/import[@organisation = $typeOrganisation]">
+ <xsl:variable name="parentName" select="@name" />
+ <xsl:element name="a">
+ <xsl:attribute name="href"><xsl:value-of
+ select="concat($parentName, '.html')" /></xsl:attribute>
+ <xsl:value-of select="$parentName" />
+ </xsl:element>
+ </xsl:for-each>
+ </div>
+ </xsl:if>
+ <hr />
+ </xsl:template>
+
+ <!-- Generate an HTML table summarizing parameters used by the type -->
+ <xsl:template name="outputParameterTable">
+ <xsl:if test="easyant/properties/property">
+ <h2>Parameters</h2>
+ <p>The following property values can be changed to tune the behavior of this buildtype.
+ Required parameters must be defined upon import, or the build will fail.</p>
+ <table class="sortable" id="type-parameters">
+ <thead>
+ <tr>
+ <th>Parameter</th>
+ <th>Required?</th>
+ <th class="unsortable">Description</th>
+ </tr>
+ </thead>
+ <tbody>
+ <xsl:for-each select="easyant/properties/property">
+ <xsl:sort select="@name" />
+ <tr>
+ <td>
+ <xsl:value-of select="@name" />
+ </td>
+ <td>
+ <xsl:choose>
+ <xsl:when test="@required = 'true'">Yes</xsl:when>
+ <xsl:otherwise>No</xsl:otherwise>
+ </xsl:choose>
+ </td>
+ <td>
+ <xsl:if test="@description">
+ <xsl:value-of select="@description" /><br/>
+ </xsl:if>
+ <xsl:if test="not(@value) and @default">
+ <span class="bold">Default: </span><span id="defaultValue"><xsl:value-of select="@default" /></span><br/>
+ </xsl:if>
+ <xsl:if test="@value">
+ <span class="bold">BuildType value: </span><span id="buildTypeValue"><xsl:value-of select="@value" /></span>
+ </xsl:if>
+ </td>
+ </tr>
+ </xsl:for-each>
+ </tbody>
+ </table>
+ </xsl:if>
+ </xsl:template>
+
+ <!--
+ Generate a list describing what the type does during each build phase
+ -->
+ <xsl:template name="outputPhaseDescriptions">
+
+ <!--
+ an XML fragment that condenses nested phases and targets into a flat
+ list, so that we can then make an output summary table.
+ -->
+ <xsl:variable name="typeSummary">
+ <project>
+ <xsl:call-template name="add-plugin-targets">
+ <xsl:with-param name="as" select="" />
+ </xsl:call-template>
+ </project>
+ </xsl:variable>
+ <xsl:variable name="phaseTargets" select="exsl:node-set($typeSummary)/project" />
+
+ <h2>Plugins</h2>
+ <p>
+ This build type loads each of the following <a href="../plugins/plugins.html">plugins</a>:
+ </p>
+ <div class="type-plugins">
+ <xsl:for-each select="easyant/imports/import[@organisation=$pluginOrganisation]">
+ <xsl:variable name="pluginName" select="@name"/>
+ <xsl:if test="position() > 1"><xsl:text>, </xsl:text></xsl:if>
+ <a href="{concat('../plugins/', $pluginName, '.html')}">
+ <xsl:value-of select="$pluginName"/>
+ </a>
+ </xsl:for-each>
+ </div>
+
+
+ <h2>Build Phases</h2>
+ <p>
+ This build type takes the following actions during each <a href="../phases.html">build phase</a> :
+ </p>
+ <table id="buildtype-phases">
+ <thead>
+ <tr class="header-row">
+ <th>Phase</th>
+ <th>Description</th>
+ </tr>
+ </thead>
+ <tbody>
+ <xsl:for-each
+ select="$phaseTargets/phase[not(@name = preceding::phase/@name)]">
+ <xsl:variable name="currentPhase" select="string(@name)" />
+ <xsl:variable name="currentPhaseTargets"
+ select="$phaseTargets/target[@phase=$currentPhase]" />
+ <xsl:if test="$currentPhaseTargets">
+ <tr class="phase-row">
+ <td>
+ <span class="phase-name">
+ <xsl:value-of select="$currentPhase" />
+ </span>
+ </td>
+ <td>
+ <span class="phase-description">
+ <xsl:value-of select="@description" />
+ </span>
+ <table class="sortable" id="type-phases">
+ <thead>
+ <tr class="header-row">
+ <th>Target</th>
+ <th>Description</th>
+ <th>From Plugin</th>
+ </tr>
+ </thead>
+ <tbody>
+ <xsl:for-each select="$currentPhaseTargets">
+ <tr>
+ <td class="target-name">
+ <xsl:value-of select="@name" />
+ </td>
+ <td>
+ <xsl:value-of select="@description" />
+ </td>
+ <td>
+ <xsl:if test="@plugin">
+ <a>
+ <xsl:attribute name="href"><xsl:value-of
+ select="concat('../plugins/', @plugin, '.html')" /></xsl:attribute>
+ <xsl:value-of select="@plugin" />
+ </a>
+ </xsl:if>
+ </td>
+
+ </tr>
+ </xsl:for-each>
+ </tbody>
+ </table>
+ </td>
+ </tr>
+
+ </xsl:if>
+ </xsl:for-each>
+ </tbody>
+ </table>
+
+ <xsl:if test="$phaseTargets/target[not(@phase or starts-with(@name, '-'))]">
+ <h2>Extra Targets</h2>
+ <p>
+ This type defines some extra Ant targets not attached to any <a href="../phases.html">build phase</a> :
+ </p>
+ <table class="sortable" id="type-phases">
+ <thead>
+ <tr class="header-row">
+ <th>Target</th>
+ <th class="unsortable">Description</th>
+ <th>From Plugin</th>
+ </tr>
+ </thead>
+ <tbody>
+ <xsl:for-each
+ select="$phaseTargets/target[not(@phase or starts-with(@name, '-'))]">
+ <tr>
+ <td class="target-name">
+ <xsl:value-of select="@name" />
+ </td>
+ <td>
+ <xsl:value-of select="@description" />
+ </td>
+ <xsl:if test="@plugin">
+ <td>
+ <a>
+ <xsl:attribute name="href"><xsl:value-of
+ select="concat('../plugins/', @plugin, '.html')" /></xsl:attribute>
+ <xsl:value-of select="@plugin" />
+ </a>
+ </td>
+ </xsl:if>
+ </tr>
+ </xsl:for-each>
+ </tbody>
+ </table>
+ </xsl:if>
+ </xsl:template>
+
+ <!--
+ for the current module, output one 'target' element for each target in
+ that module, recursively adding targets for imported plugins. The
+ optional parameter 'as' is prepended to the name of each target.
+ -->
+ <xsl:template name="add-plugin-targets">
+ <xsl:param name="as" />
+ <xsl:for-each
+ select="easyant/imports/import[@organisation=$pluginOrganisation]">
+ <xsl:variable name="pluginName" select="@name" />
+ <xsl:variable name="prefix" select="concat($as, @as)" />
+ <xsl:for-each select="easyant/phases/phase">
+ <phase>
+ <xsl:attribute name="name"><xsl:value-of
+ select="@name" /></xsl:attribute>
+ <xsl:attribute name="description"><xsl:value-of
+ select="@description" /></xsl:attribute>
+ </phase>
+ </xsl:for-each>
+ <xsl:for-each select="easyant/targets/target">
+ <target>
+ <xsl:attribute name="name"><xsl:value-of
+ select="concat($prefix, @name)" /></xsl:attribute>
+ <xsl:attribute name="plugin"><xsl:value-of
+ select="$pluginName" /></xsl:attribute>
+ <xsl:for-each select="@*[name() != 'name']">
+ <xsl:copy-of select="." />
+ </xsl:for-each>
+ </target>
+ </xsl:for-each>
+ <xsl:call-template name="add-plugin-targets">
+ <xsl:with-param name="as" select="$prefix" />
+ </xsl:call-template>
+ </xsl:for-each>
+ </xsl:template>
+
+ <xsl:template match="text()"/>
</xsl:stylesheet>