You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@archiva.apache.org by ma...@apache.org on 2019/11/15 19:12:16 UTC

[archiva] branch master updated (08a51f0 -> 3a08931)

This is an automated email from the ASF dual-hosted git repository.

martin_s pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/archiva.git.


    from 08a51f0  Switching to zip file for index test
     new e41fb34  Fixing time zone issue
     new 3a08931  Removing plexus dependency

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../archiva/rss/processor/NewArtifactsRssFeedProcessor.java      | 3 +--
 .../archiva/rss/processor/NewArtifactsRssFeedProcessorTest.java  | 6 ++++--
 .../org/apache/archiva/webdav/ArchivaDavResourceFactory.java     | 9 +--------
 3 files changed, 6 insertions(+), 12 deletions(-)


[archiva] 02/02: Removing plexus dependency

Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

martin_s pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/archiva.git

commit 3a08931d197522fad9440ade10eb96364d2ca405
Author: Martin Stockhammer <ma...@apache.org>
AuthorDate: Fri Nov 15 20:05:48 2019 +0100

    Removing plexus dependency
---
 .../archiva/rss/processor/NewArtifactsRssFeedProcessorTest.java  | 6 ++++--
 .../org/apache/archiva/webdav/ArchivaDavResourceFactory.java     | 9 +--------
 2 files changed, 5 insertions(+), 10 deletions(-)

diff --git a/archiva-modules/archiva-web/archiva-rss/src/test/java/org/apache/archiva/rss/processor/NewArtifactsRssFeedProcessorTest.java b/archiva-modules/archiva-web/archiva-rss/src/test/java/org/apache/archiva/rss/processor/NewArtifactsRssFeedProcessorTest.java
index 8caccdb..2e59131 100644
--- a/archiva-modules/archiva-web/archiva-rss/src/test/java/org/apache/archiva/rss/processor/NewArtifactsRssFeedProcessorTest.java
+++ b/archiva-modules/archiva-web/archiva-rss/src/test/java/org/apache/archiva/rss/processor/NewArtifactsRssFeedProcessorTest.java
@@ -97,7 +97,7 @@ public class NewArtifactsRssFeedProcessorTest
         throws Exception
     {
         List<ArtifactMetadata> newArtifacts = new ArrayList<>();
-        ZonedDateTime whenGathered = ZonedDateTime.of(LocalDateTime.now(), ZoneId.systemDefault());
+        ZonedDateTime whenGathered = ZonedDateTime.now();
 
         newArtifacts.add( createArtifact( "artifact-one", "1.0", whenGathered ) );
         newArtifacts.add( createArtifact( "artifact-one", "1.1", whenGathered ) );
@@ -116,8 +116,10 @@ public class NewArtifactsRssFeedProcessorTest
 
         SyndFeed feed = newArtifactsProcessor.process( reqParams );
 
+
         // check that the date used in the call is close to the one passed (5 seconds difference at most)
-        ZonedDateTime cal = ZonedDateTime.of(LocalDateTime.now(), ZoneId.systemDefault()).minusDays(30);
+        ZonedDateTime cal = ZonedDateTime.now().minusDays(30);
+
         assertTrue(ChronoUnit.SECONDS.between(cal.toInstant(), metadataRepository.getFrom().toInstant())<5);
         assertEquals( null, metadataRepository.getTo() );
         assertEquals( TEST_REPO, metadataRepository.getRepoId() );
diff --git a/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/archiva/webdav/ArchivaDavResourceFactory.java b/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/archiva/webdav/ArchivaDavResourceFactory.java
index 7cc6632..b9bd4ad 100644
--- a/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/archiva/webdav/ArchivaDavResourceFactory.java
+++ b/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/archiva/webdav/ArchivaDavResourceFactory.java
@@ -92,7 +92,6 @@ import org.apache.jackrabbit.webdav.DavServletResponse;
 import org.apache.jackrabbit.webdav.DavSession;
 import org.apache.jackrabbit.webdav.lock.LockManager;
 import org.apache.jackrabbit.webdav.lock.SimpleLockManager;
-import org.codehaus.plexus.digest.DigesterException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.slf4j.MarkerFactory;
@@ -379,12 +378,6 @@ public class ArchivaDavResourceFactory
                             throw new DavException( HttpServletResponse.SC_INTERNAL_SERVER_ERROR,
                                                     "Error occurred while generating checksum files." );
                         }
-                        catch ( DigesterException de )
-                        {
-                            throw new DavException( HttpServletResponse.SC_INTERNAL_SERVER_ERROR,
-                                                    "Error occurred while generating checksum files."
-                                                        + de.getMessage() );
-                        }
                         catch ( LayoutException e )
                         {
                             log.error("Incompatible layout: {}", e.getMessage(), e);
@@ -1250,7 +1243,7 @@ public class ArchivaDavResourceFactory
     }
 
     private StorageAsset writeMergedMetadataToFile( RepositoryGroup repoGroup, ArchivaRepositoryMetadata mergedMetadata, String outputFilename )
-        throws RepositoryMetadataException, DigesterException, IOException
+        throws RepositoryMetadataException, IOException
     {
         StorageAsset asset = repoGroup.addAsset( outputFilename, false );
         OutputStream stream = asset.getWriteStream( true );


[archiva] 01/02: Fixing time zone issue

Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

martin_s pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/archiva.git

commit e41fb343bc872569b61b92bbc13be94d29e2f42a
Author: Martin Stockhammer <ma...@apache.org>
AuthorDate: Fri Nov 15 20:05:15 2019 +0100

    Fixing time zone issue
---
 .../org/apache/archiva/rss/processor/NewArtifactsRssFeedProcessor.java | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/archiva-modules/archiva-web/archiva-rss/src/main/java/org/apache/archiva/rss/processor/NewArtifactsRssFeedProcessor.java b/archiva-modules/archiva-web/archiva-rss/src/main/java/org/apache/archiva/rss/processor/NewArtifactsRssFeedProcessor.java
index 718a3fa..27008c3 100644
--- a/archiva-modules/archiva-web/archiva-rss/src/main/java/org/apache/archiva/rss/processor/NewArtifactsRssFeedProcessor.java
+++ b/archiva-modules/archiva-web/archiva-rss/src/main/java/org/apache/archiva/rss/processor/NewArtifactsRssFeedProcessor.java
@@ -68,7 +68,6 @@ public class NewArtifactsRssFeedProcessor
 
     private Logger log = LoggerFactory.getLogger( NewArtifactsRssFeedProcessor.class );
 
-    private static final TimeZone GMT_TIME_ZONE = TimeZone.getTimeZone( "GMT" );
 
     /**
      * Process the newly discovered artifacts in the repository. Generate feeds for new artifacts in the repository and
@@ -93,7 +92,7 @@ public class NewArtifactsRssFeedProcessor
         throws FeedException
     {
 
-        ZonedDateTime greaterThanThisDate = ZonedDateTime.now(GMT_TIME_ZONE.toZoneId()).minusDays(
+        ZonedDateTime greaterThanThisDate = ZonedDateTime.now().minusDays(
                 getNumberOfDaysBeforeNow()
         ).truncatedTo(ChronoUnit.SECONDS);
         List<ArtifactMetadata> artifacts;