archiva-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From och...@apache.org
Subject svn commit: r648913 - in /archiva/trunk/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/
Date Thu, 17 Apr 2008 01:03:22 GMT
Author: oching
Date: Wed Apr 16 18:03:01 2008
New Revision: 648913

URL: http://svn.apache.org/viewvc?rev=648913&view=rev
Log:
-added check to not generate rss feed if there are no new artifacts
-do not set the link for the feed entries

Modified:
    archiva/trunk/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/scanner/DefaultRepositoryScanner.java
    archiva/trunk/archiva-modules/archiva-web/archiva-rss/src/main/java/org/apache/archiva/rss/RssFeedGenerator.java

Modified: archiva/trunk/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/scanner/DefaultRepositoryScanner.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/scanner/DefaultRepositoryScanner.java?rev=648913&r1=648912&r2=648913&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/scanner/DefaultRepositoryScanner.java
(original)
+++ archiva/trunk/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/scanner/DefaultRepositoryScanner.java
Wed Apr 16 18:03:01 2008
@@ -143,9 +143,12 @@
         stats.setKnownConsumers( gatherIds( knownContentConsumers ) );
         stats.setInvalidConsumers( gatherIds( invalidContentConsumers ) );
 
-        // generate RSS feeds
-        List<ArchivaArtifact> newArtifacts = getNewArtifacts( scannerInstance.getNewFiles(),
repository.getId() );
-        rssFeedProcessor.process( newArtifacts );
+        if ( scannerInstance.getNewFiles() != null && scannerInstance.getNewFiles().size()
> 0 )
+        {
+            // generate RSS feeds
+            List<ArchivaArtifact> newArtifacts = getNewArtifacts( scannerInstance.getNewFiles(),
repository.getId() );
+            rssFeedProcessor.process( newArtifacts );
+        }
         
         return stats;
     }

Modified: archiva/trunk/archiva-modules/archiva-web/archiva-rss/src/main/java/org/apache/archiva/rss/RssFeedGenerator.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-rss/src/main/java/org/apache/archiva/rss/RssFeedGenerator.java?rev=648913&r1=648912&r2=648913&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-rss/src/main/java/org/apache/archiva/rss/RssFeedGenerator.java
(original)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-rss/src/main/java/org/apache/archiva/rss/RssFeedGenerator.java
Wed Apr 16 18:03:01 2008
@@ -96,9 +96,9 @@
             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 @@
         {
             entry = new SyndEntryImpl();
             entry.setTitle( dataEntry.getTitle() );
-            entry.setLink( dataEntry.getLink() );
             entry.setPublishedDate( Calendar.getInstance().getTime() );
 
             description = new SyndContentImpl();



Mime
View raw message