don't die if the file downloaded from jira can't be parsed

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@344243 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
fgiust 2005-11-14 21:42:44 +00:00
parent cac88d0815
commit c343afe5b6
2 changed files with 27 additions and 13 deletions

View File

@ -23,7 +23,8 @@
xmlns:define="jelly:define" xmlns:define="jelly:define"
xmlns:jira="jira" xmlns:jira="jira"
xmlns:maven="jelly:maven" xmlns:maven="jelly:maven"
xmlns:doc="doc"> xmlns:doc="doc"
xmlns:ant="jelly:ant">
<goal name="maven-jira-plugin:register"> <goal name="maven-jira-plugin:register">
<doc:registerReport <doc:registerReport
@ -66,6 +67,8 @@
/> />
<mkdir dir="${maven.gen.docs}"/> <mkdir dir="${maven.gen.docs}"/>
<j:catch var="parseresult">
<doc:jslFile <doc:jslFile
input="${maven.build.dir}/jira/jira-results.xml" input="${maven.build.dir}/jira/jira-results.xml"
output="${maven.gen.docs}/jira.xml" output="${maven.gen.docs}/jira.xml"
@ -73,12 +76,22 @@
outputMode="xml" outputMode="xml"
prettyPrint="true" prettyPrint="true"
/> />
</j:catch>
<j:choose>
<j:when test="${!empty(parseresult)}">
<ant:echo>Error: unable to parse jira results due to an error: ${parseresult.message}. Jira report will not be generated</ant:echo>
</j:when>
<j:otherwise>
<!-- go on -->
<copy todir="${maven.docs.dest}/images/jira" overwrite="yes" filtering="yes"> <copy todir="${maven.docs.dest}/images/jira" overwrite="yes" filtering="yes">
<fileset dir="${plugin.resources}/images"> <fileset dir="${plugin.resources}/images">
<include name="**/*.gif"/> <include name="**/*.gif"/>
</fileset> </fileset>
</copy> </copy>
</j:otherwise>
</j:choose>
</goal> </goal>
</project> </project>

View File

@ -25,6 +25,7 @@
</properties> </properties>
<body> <body>
<release version="1.2-SNAPSHOT" date="in SVN"> <release version="1.2-SNAPSHOT" date="in SVN">
<action dev="fgiust" type="fix">Only log an error if the jira changes xml can't be parsed instead of throwing an Exception</action>
<action dev="fgiust" type="fix" issue="MPJIRA-4">Make the Jira report work also using a fancy JIRA url like http://jira.codehaus.org/browse/MPJIRA (it doesn't require <action dev="fgiust" type="fix" issue="MPJIRA-4">Make the Jira report work also using a fancy JIRA url like http://jira.codehaus.org/browse/MPJIRA (it doesn't require
the url with a numeric project id anymore)</action> the url with a numeric project id anymore)</action>
<action dev="aheritier" type="update" issue="MAVEN-1712">Update dependencies to match ones in maven 1.1 core and to unify them between plugins. The following dependencies are updated : <action dev="aheritier" type="update" issue="MAVEN-1712">Update dependencies to match ones in maven 1.1 core and to unify them between plugins. The following dependencies are updated :