mirror of https://github.com/apache/archiva.git
-added check to not generate rss feed if there are no new artifacts
-do not set the link for the feed entries git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@648913 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
a43d8e101d
commit
3ad24bfa31
archiva-modules
archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/scanner
archiva-web/archiva-rss/src/main/java/org/apache/archiva/rss
|
@ -143,9 +143,12 @@ public class DefaultRepositoryScanner
|
||||||
stats.setKnownConsumers( gatherIds( knownContentConsumers ) );
|
stats.setKnownConsumers( gatherIds( knownContentConsumers ) );
|
||||||
stats.setInvalidConsumers( gatherIds( invalidContentConsumers ) );
|
stats.setInvalidConsumers( gatherIds( invalidContentConsumers ) );
|
||||||
|
|
||||||
|
if ( scannerInstance.getNewFiles() != null && scannerInstance.getNewFiles().size() > 0 )
|
||||||
|
{
|
||||||
// generate RSS feeds
|
// generate RSS feeds
|
||||||
List<ArchivaArtifact> newArtifacts = getNewArtifacts( scannerInstance.getNewFiles(), repository.getId() );
|
List<ArchivaArtifact> newArtifacts = getNewArtifacts( scannerInstance.getNewFiles(), repository.getId() );
|
||||||
rssFeedProcessor.process( newArtifacts );
|
rssFeedProcessor.process( newArtifacts );
|
||||||
|
}
|
||||||
|
|
||||||
return stats;
|
return stats;
|
||||||
}
|
}
|
||||||
|
|
|
@ -96,9 +96,9 @@ public class RssFeedGenerator
|
||||||
feed.setLink( link );
|
feed.setLink( link );
|
||||||
feed.setDescription( description );
|
feed.setDescription( description );
|
||||||
feed.setLanguage( DEFAULT_LANGUAGE );
|
feed.setLanguage( DEFAULT_LANGUAGE );
|
||||||
feed.setPublishedDate( Calendar.getInstance().getTime() );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
feed.setPublishedDate( Calendar.getInstance().getTime() );
|
||||||
feed.setFeedType( DEFAULT_FEEDTYPE );
|
feed.setFeedType( DEFAULT_FEEDTYPE );
|
||||||
feed.setEntries( getEntries( dataEntries, existingEntries ) );
|
feed.setEntries( getEntries( dataEntries, existingEntries ) );
|
||||||
|
|
||||||
|
@ -136,7 +136,6 @@ public class RssFeedGenerator
|
||||||
{
|
{
|
||||||
entry = new SyndEntryImpl();
|
entry = new SyndEntryImpl();
|
||||||
entry.setTitle( dataEntry.getTitle() );
|
entry.setTitle( dataEntry.getTitle() );
|
||||||
entry.setLink( dataEntry.getLink() );
|
|
||||||
entry.setPublishedDate( Calendar.getInstance().getTime() );
|
entry.setPublishedDate( Calendar.getInstance().getTime() );
|
||||||
|
|
||||||
description = new SyndContentImpl();
|
description = new SyndContentImpl();
|
||||||
|
|
Loading…
Reference in New Issue