maven-plugins/pom/plugin.jelly
dion 230698d6ee detab
git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@113229 13f79535-47bb-0310-9956-ffa450edef68
2003-03-30 16:18:05 +00:00

114 lines
3.5 KiB
XML

<?xml version="1.0"?>
<project
xmlns:j="jelly:core"
xmlns:d="jelly:define"
xmlns:v="jelly:validate"
xmlns:x="jelly:xml"
xmlns:deploy="deploy"
xmlns:pom="pom">
<!-- set up validation tag library -->
<d:taglib uri="pom">
<!--
<d:jellybean
name="validate"
className="org.apache.maven.Validator"
method="execute"
/>
-->
<d:jellybean
name="contentvalidator"
className="org.apache.maven.ContentValidator"
method="execute"
/>
</d:taglib>
<!-- default goal -->
<goal name="pom" description="Validate the Maven XML project descriptor"
prereqs="pom:validate" />
<!-- ================================================================== -->
<!-- V A L I D A T E P O M -->
<!-- ================================================================== -->
<goal
name="pom:validate"
description="Validate the Maven XML project descriptor">
<pom:validate
validator="${maven.home}/maven-project.xsd"
projectDescriptor="project.xml"
/>
<echo>POM is valid</echo>
</goal>
<goal
name="pom:contentvalidate"
description="Validate the content of the Maven POM">
<j:new className="org.apache.maven.ContentValidator" var="contentvalidator"/>
<j:setProperties object="${contentvalidator}" project="${pom}"/>
<j:set var="notices" value="${contentvalidator.execute()}"/>
<j:forEach var="notice" items="${notices}">
<echo>${notice.Level} : ${notice.Section} : ${notice.Message}</echo>
</j:forEach>
</goal>
<!-- ================================================================== -->
<!-- U P D A T E P O M -->
<!-- ================================================================== -->
<goal
name="pom:update"
description="Update the POM from its current version to a specified version">
</goal>
<!-- ========================================================================== -->
<!-- I N S T A L L P O M -->
<!-- ========================================================================== -->
<goal name="pom:install"
description="Install POM in the local repository.">
<copy
file="project.xml"
tofile="${maven.repo.local}/${pom.groupId}/poms/${pom.artifactId}-${pom.currentVersion}.pom"/>
</goal>
<!-- ========================================================================== -->
<!-- D E P L O Y P O M -->
<!-- ========================================================================== -->
<!-- POMs are deployed in the form ${pom.artifactId}-${pom.currentVersion}.pom -->
<!-- to match the same versioning convention as JARs. Having the POMs -->
<!-- deployed during each release will allow someone to build any -->
<!-- version of a project reliably. -->
<!-- ========================================================================== -->
<goal name="pom:deploy"
description="Deploy POM to the central repository.">
<copy
file="project.xml"
tofile="${pom.artifactId}-${pom.currentVersion}.pom"/>
<deploy:artifact
artifact="${pom.artifactId}-${pom.currentVersion}.pom"
type="poms"
assureDirectoryCommand="mkdir -p"
/>
<delete file="${pom.artifactId}-${pom.currentVersion}.pom"/>
</goal>
</project>