diff --git a/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/scanner/DefaultRepositoryScanner.java b/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/scanner/DefaultRepositoryScanner.java index 0ad94eb27..cdaca58e2 100644 --- a/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/scanner/DefaultRepositoryScanner.java +++ b/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/scanner/DefaultRepositoryScanner.java @@ -143,9 +143,12 @@ public class DefaultRepositoryScanner stats.setKnownConsumers( gatherIds( knownContentConsumers ) ); stats.setInvalidConsumers( gatherIds( invalidContentConsumers ) ); - // generate RSS feeds - List newArtifacts = getNewArtifacts( scannerInstance.getNewFiles(), repository.getId() ); - rssFeedProcessor.process( newArtifacts ); + if ( scannerInstance.getNewFiles() != null && scannerInstance.getNewFiles().size() > 0 ) + { + // generate RSS feeds + List newArtifacts = getNewArtifacts( scannerInstance.getNewFiles(), repository.getId() ); + rssFeedProcessor.process( newArtifacts ); + } return stats; } diff --git a/archiva-modules/archiva-web/archiva-rss/src/main/java/org/apache/archiva/rss/RssFeedGenerator.java b/archiva-modules/archiva-web/archiva-rss/src/main/java/org/apache/archiva/rss/RssFeedGenerator.java index 36634af96..0cd5a7459 100644 --- a/archiva-modules/archiva-web/archiva-rss/src/main/java/org/apache/archiva/rss/RssFeedGenerator.java +++ b/archiva-modules/archiva-web/archiva-rss/src/main/java/org/apache/archiva/rss/RssFeedGenerator.java @@ -96,9 +96,9 @@ public class RssFeedGenerator feed.setLink( link ); feed.setDescription( description ); feed.setLanguage( DEFAULT_LANGUAGE ); - feed.setPublishedDate( Calendar.getInstance().getTime() ); } - + + feed.setPublishedDate( Calendar.getInstance().getTime() ); feed.setFeedType( DEFAULT_FEEDTYPE ); feed.setEntries( getEntries( dataEntries, existingEntries ) ); @@ -136,7 +136,6 @@ public class RssFeedGenerator { entry = new SyndEntryImpl(); entry.setTitle( dataEntry.getTitle() ); - entry.setLink( dataEntry.getLink() ); entry.setPublishedDate( Calendar.getInstance().getTime() ); description = new SyndContentImpl();