Removing plexus dependency

This commit is contained in:
Martin Stockhammer 2019-11-15 20:05:48 +01:00
parent e41fb343bc
commit 3a08931d19
2 changed files with 5 additions and 10 deletions

View File

@ -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() );

View File

@ -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 );