You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by jv...@apache.org on 2003/02/02 17:02:30 UTC

cvs commit: jakarta-turbine-maven/src/plugins-build/release plugin.jelly

jvanzyl     2003/02/02 08:02:30

  Modified:    src/plugins-build/release plugin.jelly
  Log:
  o Start of a POM validation procedure for a release.
  
  Revision  Changes    Path
  1.2       +40 -0     jakarta-turbine-maven/src/plugins-build/release/plugin.jelly
  
  Index: plugin.jelly
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-maven/src/plugins-build/release/plugin.jelly,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- plugin.jelly	24 Jan 2003 03:45:38 -0000	1.1
  +++ plugin.jelly	2 Feb 2003 16:02:30 -0000	1.2
  @@ -35,4 +35,44 @@
      |    of the latest snapshot.
      -->
   
  +   <!--
  +    |
  +    | Convert SNAPSHOT version identifiers to real snapshot versions.
  +    | You cannot leave SNAPSHOT version identifiers in the POM for a
  +    | release.
  +    |
  +    -->
  +   <goal name="convert-snapshots">
  +   </goal>
  +    
  +   <!--
  +    |
  +    | Validate the POM for a release. This consists of:
  +    |
  +    | 1) Making sure all SNAPSHOT version identifiers are converted.
  +    |
  +    -->
  +   <goal name="validate-pom-for-release">
  +     
  +     <j:useBean var="snapshots" class="java.util.ArrayList"/>
  +     
  +     <j:forEach var="dependency" items="${pom.dependencies}">
  +       <j:if test="${dependency.version == 'SNAPSHOT'}">
  +         <j:set var="dummy" value="${snapshots.add(dependency)}"/>
  +       </j:if>
  +     </j:forEach>
  +     
  +     <j:if test="${size(snapshots) > 0}">
  +       <echo/>
  +       <echo>The following dependencies have SNAPSHOT identifiers:</echo>
  +       <echo/>
  +       <j:forEach var="dependency" items="${snapshots}">
  +         <echo>${dependency.artifactId}</echo>
  +       </j:forEach>
  +       <fail message="">
  +       </fail>
  +     </j:if>
  +     
  +   </goal>
  +
   </project>