You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by vm...@apache.org on 2003/11/13 21:30:20 UTC
cvs commit: maven-plugins/pom plugin.jelly project.xml
vmassol 2003/11/13 12:30:20
Modified: pom/xdocs changes.xml
pom plugin.jelly project.xml
Log:
Added support for validating different POM versions.
Revision Changes Path
1.7 +5 -0 maven-plugins/pom/xdocs/changes.xml
Index: changes.xml
===================================================================
RCS file: /home/cvs/maven-plugins/pom/xdocs/changes.xml,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- changes.xml 29 Sep 2003 06:27:58 -0000 1.6
+++ changes.xml 13 Nov 2003 20:30:20 -0000 1.7
@@ -6,6 +6,11 @@
</properties>
<body>
<releases>
+ <release version="1.4" date="in CVS">
+ <action dev="vmassol" type="add">
+ Added support for validating different POM versions.
+ </action>
+ </release>
<release version="1.3" date="2003-09-29">
<action dev="dion" type="fix">
Make pom:validate work again. The xerces upgrade broke jarv.
1.11 +35 -42 maven-plugins/pom/plugin.jelly
Index: plugin.jelly
===================================================================
RCS file: /home/cvs/maven-plugins/pom/plugin.jelly,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- plugin.jelly 24 Sep 2003 04:46:33 -0000 1.10
+++ plugin.jelly 13 Nov 2003 20:30:20 -0000 1.11
@@ -5,48 +5,52 @@
xmlns:d="jelly:define"
xmlns:pom="pom"
xmlns:util="jelly:util"
- xmlns:artifact="artifact"
- >
+ xmlns:artifact="artifact">
<!-- set up pom tag library -->
<d:taglib uri="pom">
-
<d:jellybean
- name="contentvalidator"
- className="org.apache.maven.ContentValidator"
- method="execute"
- />
-
+ 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" />
+ 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">
+ <goal name="pom:validate"
+ description="Validate the Maven XML project descriptor">
<path id="validate.path">
<pathelement path="${plugin.getDependencyPath('isorelax')}"/>
<pathelement path="${plugin.getDependencyPath('thaiopensource:jing')}"/>
<pathelement path="${plugin.getDependencyPath('xerces')}"/>
</path>
+
+ <!-- Support Maven 1.0 rc1 and before which only had a single XSD file. -->
+ <j:set var="xsd"
+ value="${maven.home}/maven-project-${pom.pomVersion}.xsd"/>
+ <util:file var="xsdAsFile" name="${xsd}"/>
+ <j:if test="${not(xsdAsFile.exists())}">
+ <j:set var="xsd"
+ value="${maven.home}/maven-project-${pom.pomVersion}.xsd"/>
+ </j:if>
<java classname="com.thaiopensource.relaxng.util.Driver" fork="true">
<classpath refid="validate.path"/>
- <arg value="${maven.home}/maven-project.xsd"/>
+ <arg value="${xsd}"/>
<arg value="${pom.file.canonicalPath}"/>
</java>
+
</goal>
- <goal
- name="pom:contentvalidate"
- description="Validate the content of the Maven POM">
+ <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}"/>
@@ -61,11 +65,8 @@
<!-- ================================================================== -->
<!-- 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 name="pom:update"
+ description="Update the POM from its current version to a specified version">
</goal>
<!-- ========================================================================== -->
@@ -73,12 +74,13 @@
<!-- ========================================================================== -->
<goal name="pom:install"
- description="Install POM in the local repository.">
+ description="Install POM in the local repository.">
- <artifact:install
- artifact="project.xml"
- type="pom"
- project="${pom}"/>
+ <artifact:install
+ artifact="project.xml"
+ type="pom"
+ project="${pom}"/>
+
</goal>
<!-- ========================================================================== -->
@@ -91,48 +93,39 @@
<!-- ========================================================================== -->
<goal name="pom:deploy"
- description="Deploy POM to the central repository.">
+ description="Deploy POM to the central repository.">
<artifact:deploy
artifact="project.xml"
type="pom"
project="${pom}"/>
+
</goal>
-
-
-
-
<!--==================================================================-->
<!-- Install the snapshot version of the war in the local repository -->
<!--==================================================================-->
<goal name="pom:install-snapshot"
- description="Install the snapshot version of the POM in the local repository">
+ description="Install the snapshot version of the POM in the local repository">
- <artifact:install-snapshot
+ <artifact:install-snapshot
artifact="project.xml"
type="pom"
project="${pom}"/>
</goal>
-
-
<!--==================================================================-->
<!-- Deploys the snapshot of the war to the remote repository -->
<!--==================================================================-->
<goal name="pom:deploy-snapshot"
- description="Deploys the snapshot version of the POM to remote repository">
+ description="Deploys the snapshot version of the POM to remote repository">
- <artifact:deploy-snapshot
+ <artifact:deploy-snapshot
artifact="project.xml"
type="pom"
project="${pom}"/>
</goal>
-
-
-
-
</project>
1.29 +10 -1 maven-plugins/pom/project.xml
Index: project.xml
===================================================================
RCS file: /home/cvs/maven-plugins/pom/project.xml,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- project.xml 10 Oct 2003 19:21:02 -0000 1.28
+++ project.xml 13 Nov 2003 20:30:20 -0000 1.29
@@ -5,7 +5,7 @@
<pomVersion>3</pomVersion>
<id>maven-pom-plugin</id>
<name>Maven POM Plugin</name>
- <currentVersion>1.3</currentVersion>
+ <currentVersion>1.4-SNAPSHOT</currentVersion>
<description/>
<shortDescription>Check Project Object Model</shortDescription>
<url>http://maven.apache.org/reference/plugins/pom/</url>
@@ -41,6 +41,15 @@
<roles>
<role>Architect</role>
<role>Release Manager</role>
+ </roles>
+ </developer>
+ <developer>
+ <name>Vincent Massol</name>
+ <id>vmassol</id>
+ <email>vmassol@pivolis.com</email>
+ <organization>Pivolis</organization>
+ <roles>
+ <role>Java Developer</role>
</roles>
</developer>
</developers>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org