in src/main/java/org/apache/maven/plugins/changes/ChangesMojo.java [503:545]
private boolean generateFeed( final ChangesXML changesXml, final Locale locale )
{
getLog().debug( "Generating " + feedType + " feed." );
boolean success = true;
final FeedGenerator feed = new FeedGenerator( locale );
feed.setLink( project.getUrl() + "/changes-report.html" ); // TODO: better way?
feed.setTitle( project.getName() + ": " + changesXml.getTitle() );
feed.setAuthor( changesXml.getAuthor() );
feed.setDateFormat( new SimpleDateFormat( publishDateFormat, new Locale( publishDateLocale ) ) );
Writer writer = null;
try
{
writer = new FileWriter( new File( getReportOutputDirectory(), "changes.rss" ) );
feed.export( changesXml.getReleaseList(), feedType, writer );
}
catch ( IOException ex )
{
success = false;
getLog().warn( "Failed to create rss feed: " + ex.getMessage() );
getLog().debug( ex );
}
finally
{
try
{
if ( writer != null )
{
writer.close();
}
}
catch ( IOException ex )
{
getLog().warn( "Failed to close writer: " + ex.getMessage() );
getLog().debug( ex );
}
}
return success;
}