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:45:07 UTC
cvs commit: maven-plugins/pom plugin.jelly
vmassol 2003/11/13 12:45:07
Modified: pom/xdocs changes.xml
pom plugin.jelly
Log:
Verify valid POM versions. Only "3" and "4" are currently allowed.
Revision Changes Path
1.8 +3 -0 maven-plugins/pom/xdocs/changes.xml
Index: changes.xml
===================================================================
RCS file: /home/cvs/maven-plugins/pom/xdocs/changes.xml,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- changes.xml 13 Nov 2003 20:30:20 -0000 1.7
+++ changes.xml 13 Nov 2003 20:45:07 -0000 1.8
@@ -8,6 +8,9 @@
<releases>
<release version="1.4" date="in CVS">
<action dev="vmassol" type="add">
+ Verify valid POM versions. Only "3" and "4" are currently allowed.
+ </action>
+ <action dev="vmassol" type="add">
Added support for validating different POM versions.
</action>
</release>
1.12 +15 -1 maven-plugins/pom/plugin.jelly
Index: plugin.jelly
===================================================================
RCS file: /home/cvs/maven-plugins/pom/plugin.jelly,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- plugin.jelly 13 Nov 2003 20:30:20 -0000 1.11
+++ plugin.jelly 13 Nov 2003 20:45:07 -0000 1.12
@@ -5,6 +5,7 @@
xmlns:d="jelly:define"
xmlns:pom="pom"
xmlns:util="jelly:util"
+ xmlns:ant="jelly:ant"
xmlns:artifact="artifact">
<!-- set up pom tag library -->
@@ -19,10 +20,23 @@
<goal name="pom" description="Validate the Maven XML project descriptor"
prereqs="pom:validate"/>
+ <!--
+ ========================================================================
+ Verify validity of <pomVersion> element.
+ ========================================================================
+ -->
+ <goal name="pom:verify-version">
+
+ <j:if test="${not(pom.pomVersion == '3' or pom.pomVersion == '4')}">
+ <ant:fail>POM version should be either "3" or "4", found "${pom.pomVersion}".</ant:fail>
+ </j:if>
+
+ </goal>
+
<!-- ================================================================== -->
<!-- V A L I D A T E P O M -->
<!-- ================================================================== -->
- <goal name="pom:validate"
+ <goal name="pom:validate" prereqs="pom:verify-version"
description="Validate the Maven XML project descriptor">
<path id="validate.path">
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org