| <?xml version="1.0"?> |
| <!-- |
| Copyright 2008-2010 the EasyAnt project |
| |
| See the NOTICE file distributed with this work for additional information |
| regarding copyright ownership. |
| |
| Licensed 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. |
| --> |
| <project name="org.apache.easyant.plugins#eadoc" |
| xmlns:ea="antlib:org.apache.easyant" |
| xmlns:ivy="antlib:org.apache.ivy.ant" |
| xmlns:ac="antlib:net.sf.antcontrib"> |
| |
| <ea:core-version requiredrevision="[0.8,+]" /> |
| |
| <target name=":init" description="Read and verify property configuration, load required task libraries" phase="validate"> |
| <ea:parameter phase="validate" /> |
| <ea:parameter phase="documentation" /> |
| |
| <ea:parameter property="eadoc.repository.name" |
| description="name of the repository to document" default="local"/> |
| <ea:parameter property="target.documentation.dir" default="${target}/documentation" |
| description="directory where the documentation will be generated to" /> |
| <ea:parameter property="eadoc.documentation.dir" |
| description="target directory for generated documentation" default="${target.documentation.dir}"/> |
| |
| <ea:parameter property="eadoc.module.org" |
| description="org name for easyant modules" default="*" /> |
| <ea:parameter property="eadoc.module.includes" |
| description="name pattern of modules to document" default="*"/> |
| |
| <ea:parameter property="eadoc.module.types" |
| description="List of module types to be documented" default="plugin,buildtype"/> |
| |
| </target> |
| |
| <target name=":generate" |
| description="generate documentation for all EasyAnt plugins in the target repository" |
| depends="validate" phase="process-documentation-resources"> |
| |
| <!-- generate xooki TOC for each module type --> |
| <ac:for list="${eadoc.module.types}" param="current.type"> |
| <sequential> |
| <echo>Generating @{current.type} docs</echo> |
| |
| <ac:var name="current.menu" value="@{current.type}s"/> |
| <ac:var name="current.output.dir" value="${eadoc.documentation.dir}/ref/${current.menu}"/> |
| <ac:var name="current.toc" value="${current.output.dir}/toc.json"/> |
| |
| <ea:startmenu context="${current.menu}" file="${current.toc}"/> |
| |
| <ea:repreport organisation="org.apache.easyant.@{current.type}s" |
| module="*" toDir="${current.output.dir}" |
| xslfile="${org.apache.easyant.plugins#eadoc.eadoc-@{current.type}.xsl.file}"> |
| |
| <menugenerator context="${current.menu}"/> |
| |
| </ea:repreport> |
| |
| <ea:endmenu context="${current.menu}"/> |
| |
| </sequential> |
| </ac:for> |
| |
| </target> |
| |
| <target name="doit" depends=":generate" /> |
| |
| </project> |