git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@113363 13f79535-47bb-0310-9956-ffa450edef68
110 lines
3.6 KiB
XML
110 lines
3.6 KiB
XML
<?xml version="1.0"?>
|
|
|
|
<project
|
|
xmlns:j="jelly:core"
|
|
xmlns:d="jelly:define"
|
|
xmlns:deploy="deploy"
|
|
xmlns:pom="pom"
|
|
xmlns:util="jelly:util">
|
|
|
|
<!-- set up pom tag library -->
|
|
<d:taglib uri="pom">
|
|
|
|
<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">
|
|
|
|
<taskdef name="validate" classname="org.iso_relax.ant.JARVTask">
|
|
<classpath path="${plugin.getDependencyPath('isorelax')}"/>
|
|
<classpath path="${plugin.getDependencyPath('xercesjarv')}"/>
|
|
<classpath path="${plugin.getDependencyPath('xerces')}"/>
|
|
</taskdef>
|
|
|
|
<validate
|
|
schemaLanguage="http://www.w3.org/2001/XMLSchema"
|
|
schema="${maven.home}/maven-project.xsd"
|
|
file="${pom.file.canonicalPath}" />
|
|
|
|
</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>
|