Author: ltheussl
Date: Fri Apr  7 14:19:35 2006
New Revision: 392403

URL: http://svn.apache.org/viewcvs?rev=392403&view=rev
Log:
PR: MPCHANGES-30
Missing changes.xml makes report fail

Modified:
    maven/maven-1/plugins/trunk/changes/plugin.jelly
    maven/maven-1/plugins/trunk/changes/xdocs/changes.xml

Modified: maven/maven-1/plugins/trunk/changes/plugin.jelly
URL: 
http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/changes/plugin.jelly?rev=392403&r1=392402&r2=392403&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/changes/plugin.jelly (original)
+++ maven/maven-1/plugins/trunk/changes/plugin.jelly Fri Apr  7 14:19:35 2006
@@ -27,6 +27,12 @@
   xmlns:plugin="plugin"
   xmlns:doc="doc">
 
+  <goal name="changes:init">
+    <available
+        file="${maven.docs.src}/changes.xml"
+        property="changesFileAvailable"/>
+  </goal>
+
   <goal name="maven-changes-plugin:register">
     <util:file var="changes" name="${maven.docs.src}/changes.xml"/>
     <j:if test="${changes.exists()}">
@@ -48,8 +54,11 @@
 
   <goal
     name="changes:report"
+    prereqs="changes:init"
     description="Generate a changes report">
 
+    <j:if test="${changesFileAvailable}">
+
     <doc:jsl
       input="${maven.docs.src}/changes.xml"
       output="changes-report.xml"
@@ -77,17 +86,20 @@
     <copy todir="${maven.docs.dest}/images">
       <fileset dir="${plugin.resources}/images"/>
     </copy>
-    
+
+    </j:if>
+
+    <j:if test="${not changesFileAvailable}">
+      <echo> *** WARNING: no file changes.xml found!</echo>
+    </j:if>
+
   </goal>
 
   <goal name="changes:validate"
+    prereqs="changes:init"
     description="Validates the changes.xml file">
 
-    <available
-        file="${maven.docs.src}/changes.xml"
-        property="changesFile.available"/>
-
-    <j:if test="${changesFile.available}">
+    <j:if test="${changesFileAvailable}">
         <plugin:validate-xml
             schema="${plugin.resources}/xsd/changes.xsd"
             file="${maven.docs.src}/changes.xml"/>

Modified: maven/maven-1/plugins/trunk/changes/xdocs/changes.xml
URL: 
http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/changes/xdocs/changes.xml?rev=392403&r1=392402&r2=392403&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/changes/xdocs/changes.xml (original)
+++ maven/maven-1/plugins/trunk/changes/xdocs/changes.xml Fri Apr  7 14:19:35 
2006
@@ -24,6 +24,7 @@
   </properties>
   <body>
     <release version="1.6.1" date="In SVN">
+      <action dev="ltheussl" type="fix" issue="MPCHANGES-30">Missing 
<code>changes.xml</code> makes report fail.</action>
       <action dev="aheritier" type="fix" issue="MPCHANGES-29">Add icons used 
by this plugin. This must be independent of the xdoc plugin.</action>
     </release>
     <release version="1.6" date="2005-12-12">


Reply via email to