Only generate roadmap report if there are scheduled versions in the jira roadmap.
git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@373592 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
9085bf2e19
commit
8391e75e08
@ -59,6 +59,8 @@
|
||||
name="maven-jira-plugin:report"
|
||||
description="Generate report with all entries defined in Jira">
|
||||
<mkdir dir="${maven.build.dir}/jira"/>
|
||||
<copy tofile="${maven.build.dir}/jira/jira-roadmap.xml" file="${plugin.resources}/templates/jira-template.xml"/>
|
||||
<copy tofile="${maven.build.dir}/jira/jira-results.xml" file="${plugin.resources}/templates/jira-template.xml"/>
|
||||
|
||||
<jira:jira
|
||||
project="${pom}"
|
||||
|
||||
@ -359,24 +359,27 @@ public final class JiraDownloader
|
||||
Number fixforNumber =
|
||||
nf.parse( projectPage, new ParsePosition( fixforIndex + 7 ) );
|
||||
String fixfor = Integer.toString( fixforNumber.intValue() );
|
||||
// TODO: check if fixfor = -1: no versions scheduled in roadmap
|
||||
|
||||
setFilter( "&&fixfor=" + fixfor
|
||||
+ "&sorter/field=status&sorter/order=ASC" );
|
||||
fullURL =
|
||||
jiraUrl + "/secure/IssueNavigator.jspa?view=rss&pid=" + id;
|
||||
fullURL += createFilter();
|
||||
fullURL += ( "&tempMax=" + nbEntriesMax
|
||||
+ "&reset=true&decorator=none" );
|
||||
// if fixfor = "-1": no versions scheduled in roadmap
|
||||
if ( !fixfor.equals( "-1" ) )
|
||||
{
|
||||
setFilter( "&&fixfor=" + fixfor
|
||||
+ "&sorter/field=status&sorter/order=ASC" );
|
||||
fullURL =
|
||||
jiraUrl + "/secure/IssueNavigator.jspa?view=rss&pid=" + id;
|
||||
fullURL += createFilter();
|
||||
fullURL += ( "&tempMax=" + nbEntriesMax
|
||||
+ "&reset=true&decorator=none" );
|
||||
|
||||
String outFile = output.getAbsolutePath().replace('\\','/');
|
||||
int endIndex = outFile.lastIndexOf( '/' );
|
||||
String outFile = output.getAbsolutePath().replace('\\','/');
|
||||
int endIndex = outFile.lastIndexOf( '/' );
|
||||
|
||||
outFile =
|
||||
outFile.substring( 0, endIndex ) + "/jira-roadmap.xml";
|
||||
outFile =
|
||||
outFile.substring( 0, endIndex ) + "/jira-roadmap.xml";
|
||||
|
||||
// execute the GET
|
||||
download( cl, fullURL, new File( outFile ) );
|
||||
// execute the GET
|
||||
download( cl, fullURL, new File( outFile ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
catch ( Exception e )
|
||||
|
||||
13
jira/src/plugin-resources/templates/jira-template.xml
Normal file
13
jira/src/plugin-resources/templates/jira-template.xml
Normal file
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1" ?>
|
||||
|
||||
<rss version="0.92">
|
||||
|
||||
<channel>
|
||||
<title>jira.codehaus.org</title>
|
||||
<link>http://jira.codehaus.org</link>
|
||||
<description>This file is an XML representation of some issues</description>
|
||||
<language>en</language>
|
||||
</channel>
|
||||
|
||||
</rss>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user