vmassol     2004/08/09 10:30:43

  Modified:    announcement/xdocs changes.xml
               announcement plugin.jelly
  Log:
  Added check to verify that the POM has a <code>version</code> element for the 
announcement to be generated.
  
  Revision  Changes    Path
  1.24      +4 -0      maven-plugins/announcement/xdocs/changes.xml
  
  Index: changes.xml
  ===================================================================
  RCS file: /home/cvs/maven-plugins/announcement/xdocs/changes.xml,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- changes.xml       7 Aug 2004 16:00:27 -0000       1.23
  +++ changes.xml       9 Aug 2004 17:30:43 -0000       1.24
  @@ -25,6 +25,10 @@
     </properties>
     <body>
       <release version="1.3-SNAPSHOT" date="in CVS">
  +      <action dev="vmassol" type="add" issue="MPANNOUNCEMENT-14" due-to="Felipe 
Leme">
  +        Added check to verify that the POM has a <code>version</code> element for 
the
  +        announcement to be generated.
  +      </action>
         <action dev="vmassol" type="add" issue="MPANNOUNCEMENT-13" due-to="Felipe 
Leme">
           Added new optional <code>maven.announcement.encoding</code> property 
           that defines which charset encoding to use to generate the text announcement
  
  
  
  1.14      +15 -1     maven-plugins/announcement/plugin.jelly
  
  Index: plugin.jelly
  ===================================================================
  RCS file: /home/cvs/maven-plugins/announcement/plugin.jelly,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- plugin.jelly      7 Aug 2004 16:00:27 -0000       1.13
  +++ plugin.jelly      9 Aug 2004 17:30:43 -0000       1.14
  @@ -80,7 +80,21 @@
       </jsl:stylesheet>
       
       <j:if test="${versionFound == null}">
  -      <ant:fail>The release '${versionVariable}' could not be found in change 
log</ant:fail>
  +      <ant:fail>The ${versionVariable} release could not be found in the 
changes.xml file.</ant:fail>
  +    </j:if>
  +
  +    <!-- Check if a <version> tag is defined in the POM for the current release to 
be announced -->
  +    <j:if test="${size(pom.versions)!=0}">
  +      <j:set var="foundTag" value="false"/>
  +      <j:forEach var="version" items="${pom.versions}">
  +        <j:if test="${version.id==versionVariable}">
  +          <j:set var="foundTag" value="true"/>
  +          <j:break/>
  +        </j:if>
  +      </j:forEach>
  +      <j:if test="${!foundTag}">
  +        <ant:fail>Missing "version" element in the POM for release 
${versionVariable}.</ant:fail>
  +      </j:if>
       </j:if>
       
     </goal>
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to