maven-plugins/xdoc/maven.xml

59 lines
2.7 KiB
XML

<!--
/*
* Copyright 2001-2005 The Apache Software Foundation.
*
* 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 xmlns:j="jelly:core" xmlns:u="jelly:util" xmlns:x="jelly:xml" xmlns:ant="jelly:ant" xmlns:maven="jelly:maven">
<postGoal name="site">
<!-- copy xsd/dtd files to the web site -->
<ant:copy todir="${maven.docs.dest}">
<ant:fileset dir="${basedir}/src/plugin-resources/xsd">
<ant:include name="*.xsd"/>
</ant:fileset>
<ant:fileset dir="${basedir}/src/xsd">
<ant:include name="*.xsd"/>
</ant:fileset>
<ant:fileset dir="${basedir}/src/plugin-resources/dtd">
<ant:include name="*.dtd"/>
<ant:include name="*.ent"/>
</ant:fileset>
<ant:fileset dir="${basedir}/src/dtd">
<ant:include name="*.dtd"/>
<ant:include name="*.ent"/>
</ant:fileset>
</ant:copy>
</postGoal>
<preGoal name="plugin:plugin">
<!-- Remove SNAPSHOT -->
<j:choose>
<j:when test="${pom.currentVersion.endsWith('-SNAPSHOT')}">
<j:set var="currentRelease" value="${pom.currentVersion.substring(0,pom.currentVersion.length()-9)}"/>
</j:when>
<j:otherwise>
<j:set var="currentRelease" value="${pom.currentVersion}"/>
</j:otherwise>
</j:choose>
<!-- Create / Update xsd for navigation.xml -->
<!-- We must work on maven-navigation.xsd but we publish maven-navigation-${currentRelease}.xsd -->
<j:set var="currentNavigationXSD">${basedir}/src/xsd/maven-navigation-${currentRelease}.xsd</j:set>
<j:set var="defaultNavigationXSD">${basedir}/src/plugin-resources/xsd/maven-navigation.xsd</j:set>
<ant:copy file="${defaultNavigationXSD}" tofile="${currentNavigationXSD}"/>
<!-- Create / Update dtd for xdoc -->
<!-- We must work on maven-xdoc.dtd but we publish maven-xdoc-${currentRelease}.dtd -->
<j:set var="currentXdocDTD">${basedir}/src/dtd/maven-xdoc-${currentRelease}.dtd</j:set>
<j:set var="defaultXdocDTD">${basedir}/src/plugin-resources/dtd/maven-xdoc.dtd</j:set>
<ant:copy file="${defaultXdocDTD}" tofile="${currentXdocDTD}"/>
</preGoal>
</project>