aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTamas Cservenak2013-02-06 10:57:22 (EST)
committerJan Sievers2013-02-07 04:18:10 (EST)
commitd1232cca1888485900741e672997a4fbefa9ac9e (patch)
treedc7d4ca174c73cea4d9af03c0c23786e7fea11a3
parentcbaa96aa1d1c630fea80da16a13db4e5673ad589 (diff)
downloadorg.eclipse.tycho.nexus-d1232cca1888485900741e672997a4fbefa9ac9e.zip
org.eclipse.tycho.nexus-d1232cca1888485900741e672997a4fbefa9ac9e.tar.gz
org.eclipse.tycho.nexus-d1232cca1888485900741e672997a4fbefa9ac9e.tar.bz2
Aligned it with latest Nexus 2.3 and later versions. Biggest change is use of Guava EventBus for eventing, and Logger change (was plexus, now is SLF4J) Bug: 398731 Change-Id: Ibcb430a24acd880c44dafe67b42e29da3cb14ff1
-rw-r--r--pom.xml15
-rw-r--r--src/main/java/org/eclipse/tycho/nexus/internal/plugin/DefaultUnzipRepository.java37
-rw-r--r--src/main/java/org/eclipse/tycho/nexus/internal/plugin/UnzipRepository.java2
-rw-r--r--src/main/java/org/eclipse/tycho/nexus/internal/plugin/UnzipRepositoryTemplateProvider.java13
-rw-r--r--src/main/java/org/eclipse/tycho/nexus/internal/plugin/cache/UnzipCache.java2
-rw-r--r--src/main/java/org/eclipse/tycho/nexus/internal/plugin/storage/ZipAwareStorageCollectionItem.java2
-rw-r--r--src/main/java/org/eclipse/tycho/nexus/internal/plugin/storage/ZippedItem.java2
-rw-r--r--src/test/java/org/eclipse/tycho/nexus/internal/plugin/storage/ZipAwareStorageCollectionItemTest.java15
-rw-r--r--src/test/java/org/eclipse/tycho/nexus/internal/plugin/storage/ZippedItemTest.java9
-rw-r--r--src/test/java/org/eclipse/tycho/nexus/internal/plugin/storage/ZippedStorageCollectionItemTest.java16
-rw-r--r--src/test/java/org/eclipse/tycho/nexus/internal/plugin/test/FSLocalRepositoryStorageMock.java4
11 files changed, 51 insertions, 66 deletions
diff --git a/pom.xml b/pom.xml
index f8aba1a..11ea237 100644
--- a/pom.xml
+++ b/pom.xml
@@ -49,7 +49,7 @@
</description>
<properties>
- <nexus-version>2.0.3</nexus-version>
+ <nexus-version>2.3.0</nexus-version>
</properties>
<repositories>
@@ -93,9 +93,10 @@
</dependency>
<!-- This dependency is only needed if you want to include REST Resources -->
<dependency>
- <groupId>org.sonatype.nexus</groupId>
- <artifactId>nexus-rest-api</artifactId>
+ <groupId>org.sonatype.nexus.plugins</groupId>
+ <artifactId>nexus-restlet1x-plugin</artifactId>
<version>${nexus-version}</version>
+ <type>nexus-plugin</type>
<scope>provided</scope>
</dependency>
@@ -126,19 +127,19 @@
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>app-lifecycle-maven-plugin</artifactId>
- <version>1.4</version>
+ <version>1.7</version>
<extensions>true</extensions>
<dependencies>
<dependency>
<groupId>org.sonatype.plugins</groupId>
<artifactId>app-lifecycle-nexus</artifactId>
- <version>1.4</version>
+ <version>1.7</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
- <version>2.0.1</version>
+ <version>2.5.1</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
@@ -147,7 +148,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
- <version>2.1</version>
+ <version>2.2.1</version>
<executions>
<execution>
<id>attach-sources</id>
diff --git a/src/main/java/org/eclipse/tycho/nexus/internal/plugin/DefaultUnzipRepository.java b/src/main/java/org/eclipse/tycho/nexus/internal/plugin/DefaultUnzipRepository.java
index 5f4ed9b..fd5feb7 100644
--- a/src/main/java/org/eclipse/tycho/nexus/internal/plugin/DefaultUnzipRepository.java
+++ b/src/main/java/org/eclipse/tycho/nexus/internal/plugin/DefaultUnzipRepository.java
@@ -25,7 +25,6 @@ import org.eclipse.tycho.nexus.internal.plugin.storage.ZippedItem;
import org.sonatype.nexus.configuration.Configurator;
import org.sonatype.nexus.configuration.model.CRepository;
import org.sonatype.nexus.configuration.model.CRepositoryExternalConfigurationHolderFactory;
-import org.sonatype.nexus.plugins.RepositoryType;
import org.sonatype.nexus.proxy.IllegalOperationException;
import org.sonatype.nexus.proxy.ItemNotFoundException;
import org.sonatype.nexus.proxy.LocalStorageException;
@@ -47,7 +46,8 @@ import org.sonatype.nexus.proxy.repository.ShadowRepository;
import org.sonatype.nexus.proxy.storage.UnsupportedStorageOperationException;
import org.sonatype.nexus.proxy.storage.local.LocalRepositoryStorage;
import org.sonatype.nexus.proxy.storage.local.fs.DefaultFSLocalRepositoryStorage;
-import org.sonatype.plexus.appevents.Event;
+
+import com.google.common.eventbus.Subscribe;
/**
* Shadow repository that allows to directly browse and access the content of archive files (e.g.
@@ -70,7 +70,6 @@ import org.sonatype.plexus.appevents.Event;
* Nexus 1.6 an exception will be logged during startup, but the plugin still works functional
* correct.
*/
-@RepositoryType(pathPrefix = "unzip")
@Component(role = UnzipRepository.class, hint = DefaultUnzipRepository.REPOSITORY_HINT, instantiationStrategy = "per-lookup", description = "Unzip Repository")
public class DefaultUnzipRepository extends AbstractShadowRepository implements UnzipRepository {
static final String REPOSITORY_HINT = "org.eclipse.tycho.nexus.plugin.DefaultUnzipRepository";
@@ -185,25 +184,23 @@ public class DefaultUnzipRepository extends AbstractShadowRepository implements
}
}
- // see comment at setMasterRepositoryId(String id)
- @SuppressWarnings("deprecation")
- @Override
- public void onEvent(final Event<?> evt) {
- if (evt instanceof RepositoryRegistryEventAdd) {
- final RepositoryRegistryEventAdd repoAddEvent = (RepositoryRegistryEventAdd) evt;
- if (repoAddEvent.getRepository().getId().equals(getMasterRepositoryId())) {
- try {
- setMasterRepositoryId(repoAddEvent.getRepository().getId());
- } catch (final NoSuchRepositoryException e) {
- getLogger().warn("Master Repository not available", e);
- } catch (final IncompatibleMasterRepositoryException e) {
- getLogger().warn("Master Repository incompatible", e);
- }
+ @Subscribe
+ public void onNexusStartedEvent(NexusStartedEvent evt) {
+ isNexusStarted = true;
+ }
+
+ @Subscribe
+ public void onRepositoryRegistryEventAdd(RepositoryRegistryEventAdd evt) {
+ final RepositoryRegistryEventAdd repoAddEvent = (RepositoryRegistryEventAdd) evt;
+ if (repoAddEvent.getRepository().getId().equals(getMasterRepositoryId())) {
+ try {
+ setMasterRepositoryId(repoAddEvent.getRepository().getId());
+ } catch (final NoSuchRepositoryException e) {
+ getLogger().warn("Master Repository not available", e);
+ } catch (final IncompatibleMasterRepositoryException e) {
+ getLogger().warn("Master Repository incompatible", e);
}
- } else if (evt instanceof NexusStartedEvent) {
- isNexusStarted = true;
}
- super.onEvent(evt);
}
/**
diff --git a/src/main/java/org/eclipse/tycho/nexus/internal/plugin/UnzipRepository.java b/src/main/java/org/eclipse/tycho/nexus/internal/plugin/UnzipRepository.java
index 19313f9..c03b630 100644
--- a/src/main/java/org/eclipse/tycho/nexus/internal/plugin/UnzipRepository.java
+++ b/src/main/java/org/eclipse/tycho/nexus/internal/plugin/UnzipRepository.java
@@ -10,8 +10,10 @@
*******************************************************************************/
package org.eclipse.tycho.nexus.internal.plugin;
+import org.sonatype.nexus.plugins.RepositoryType;
import org.sonatype.nexus.proxy.repository.ShadowRepository;
+@RepositoryType(pathPrefix = "unzip")
public interface UnzipRepository extends ShadowRepository {
boolean isUseVirtualVersion();
diff --git a/src/main/java/org/eclipse/tycho/nexus/internal/plugin/UnzipRepositoryTemplateProvider.java b/src/main/java/org/eclipse/tycho/nexus/internal/plugin/UnzipRepositoryTemplateProvider.java
index 568569c..9d233f7 100644
--- a/src/main/java/org/eclipse/tycho/nexus/internal/plugin/UnzipRepositoryTemplateProvider.java
+++ b/src/main/java/org/eclipse/tycho/nexus/internal/plugin/UnzipRepositoryTemplateProvider.java
@@ -12,10 +12,6 @@ package org.eclipse.tycho.nexus.internal.plugin;
import org.codehaus.plexus.component.annotations.Component;
import org.codehaus.plexus.component.annotations.Requirement;
-import org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable;
-import org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException;
-import org.sonatype.nexus.plugins.RepositoryType;
-import org.sonatype.nexus.proxy.registry.RepositoryTypeDescriptor;
import org.sonatype.nexus.proxy.registry.RepositoryTypeRegistry;
import org.sonatype.nexus.templates.TemplateProvider;
import org.sonatype.nexus.templates.TemplateSet;
@@ -23,7 +19,7 @@ import org.sonatype.nexus.templates.repository.AbstractRepositoryTemplateProvide
// Alike org.sonatype.nexus.templates.repository.DefaultRepositoryTemplateProvider
@Component(role = TemplateProvider.class, hint = "unzipRepo-templates")
-public class UnzipRepositoryTemplateProvider extends AbstractRepositoryTemplateProvider implements Initializable {
+public class UnzipRepositoryTemplateProvider extends AbstractRepositoryTemplateProvider {
private static final String UNZIP_REPOSITORY_PREFIX = "unzip";
@@ -40,11 +36,4 @@ public class UnzipRepositoryTemplateProvider extends AbstractRepositoryTemplateP
return templates;
}
-
- @Override
- public void initialize() throws InitializationException {
- final RepositoryTypeDescriptor descriptor = new RepositoryTypeDescriptor(UnzipRepository.class,
- DefaultUnzipRepository.REPOSITORY_HINT, UNZIP_REPOSITORY_PREFIX, RepositoryType.UNLIMITED_INSTANCES);
- repositoryTypeRegistry.registerRepositoryTypeDescriptors(descriptor);
- }
}
diff --git a/src/main/java/org/eclipse/tycho/nexus/internal/plugin/cache/UnzipCache.java b/src/main/java/org/eclipse/tycho/nexus/internal/plugin/cache/UnzipCache.java
index 56eb067..e47011c 100644
--- a/src/main/java/org/eclipse/tycho/nexus/internal/plugin/cache/UnzipCache.java
+++ b/src/main/java/org/eclipse/tycho/nexus/internal/plugin/cache/UnzipCache.java
@@ -14,9 +14,9 @@ import java.io.File;
import java.util.LinkedList;
import java.util.List;
-import org.codehaus.plexus.logging.Logger;
import org.eclipse.tycho.nexus.internal.plugin.DefaultUnzipRepository;
import org.eclipse.tycho.nexus.internal.plugin.cache.PathLock.PathLockMonitor;
+import org.slf4j.Logger;
import org.sonatype.nexus.proxy.AccessDeniedException;
import org.sonatype.nexus.proxy.IllegalOperationException;
import org.sonatype.nexus.proxy.ItemNotFoundException;
diff --git a/src/main/java/org/eclipse/tycho/nexus/internal/plugin/storage/ZipAwareStorageCollectionItem.java b/src/main/java/org/eclipse/tycho/nexus/internal/plugin/storage/ZipAwareStorageCollectionItem.java
index 3cc7ec5..898f894 100644
--- a/src/main/java/org/eclipse/tycho/nexus/internal/plugin/storage/ZipAwareStorageCollectionItem.java
+++ b/src/main/java/org/eclipse/tycho/nexus/internal/plugin/storage/ZipAwareStorageCollectionItem.java
@@ -13,10 +13,10 @@ package org.eclipse.tycho.nexus.internal.plugin.storage;
import java.util.Collection;
import java.util.LinkedList;
-import org.codehaus.plexus.logging.Logger;
import org.eclipse.tycho.nexus.internal.plugin.DefaultUnzipRepository;
import org.eclipse.tycho.nexus.internal.plugin.cache.ConversionResult;
import org.eclipse.tycho.nexus.internal.plugin.cache.RequestPathConverter;
+import org.slf4j.Logger;
import org.sonatype.nexus.proxy.AccessDeniedException;
import org.sonatype.nexus.proxy.IllegalOperationException;
import org.sonatype.nexus.proxy.ItemNotFoundException;
diff --git a/src/main/java/org/eclipse/tycho/nexus/internal/plugin/storage/ZippedItem.java b/src/main/java/org/eclipse/tycho/nexus/internal/plugin/storage/ZippedItem.java
index 1a58741..cbe2db7 100644
--- a/src/main/java/org/eclipse/tycho/nexus/internal/plugin/storage/ZippedItem.java
+++ b/src/main/java/org/eclipse/tycho/nexus/internal/plugin/storage/ZippedItem.java
@@ -20,8 +20,8 @@ import java.util.List;
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;
-import org.codehaus.plexus.logging.Logger;
import org.eclipse.tycho.nexus.internal.plugin.DefaultUnzipRepository;
+import org.slf4j.Logger;
import org.sonatype.nexus.proxy.ItemNotFoundException;
import org.sonatype.nexus.proxy.LocalStorageException;
import org.sonatype.nexus.proxy.ResourceStoreRequest;
diff --git a/src/test/java/org/eclipse/tycho/nexus/internal/plugin/storage/ZipAwareStorageCollectionItemTest.java b/src/test/java/org/eclipse/tycho/nexus/internal/plugin/storage/ZipAwareStorageCollectionItemTest.java
index ab4c629..fdf5720 100644
--- a/src/test/java/org/eclipse/tycho/nexus/internal/plugin/storage/ZipAwareStorageCollectionItemTest.java
+++ b/src/test/java/org/eclipse/tycho/nexus/internal/plugin/storage/ZipAwareStorageCollectionItemTest.java
@@ -14,16 +14,15 @@ import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
-import org.codehaus.plexus.logging.console.ConsoleLogger;
import org.eclipse.tycho.nexus.internal.plugin.DefaultUnzipRepository;
-import org.eclipse.tycho.nexus.internal.plugin.storage.Util;
-import org.eclipse.tycho.nexus.internal.plugin.storage.ZipAwareStorageCollectionItem;
import org.eclipse.tycho.nexus.internal.plugin.test.RepositoryMock;
import org.eclipse.tycho.nexus.internal.plugin.test.TestUtil;
import org.eclipse.tycho.nexus.internal.plugin.test.UnzipRepositoryMock;
import org.junit.AfterClass;
import org.junit.Assert;
import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.sonatype.nexus.proxy.AccessDeniedException;
import org.sonatype.nexus.proxy.IllegalOperationException;
import org.sonatype.nexus.proxy.ItemNotFoundException;
@@ -34,6 +33,8 @@ import org.sonatype.nexus.proxy.item.StorageItem;
@SuppressWarnings("nls")
public class ZipAwareStorageCollectionItemTest {
+ protected Logger testLogger = LoggerFactory.getLogger(getClass());
+
@Test
public void testListWithArchiveMember() throws ItemNotFoundException, IOException, AccessDeniedException,
NoSuchResourceStoreException, IllegalOperationException {
@@ -42,7 +43,7 @@ public class ZipAwareStorageCollectionItemTest {
final StorageCollectionItem collectionStorageItem = (StorageCollectionItem) masterRepository
.createStorageItem("/dir/subdir");
final ZipAwareStorageCollectionItem zipAwareStorageCollectionItem = new ZipAwareStorageCollectionItem(
- unzipRepositoryMock, collectionStorageItem, new ConsoleLogger());
+ unzipRepositoryMock, collectionStorageItem, testLogger);
TestUtil.assertMembers( //
new String[] { "/dir/subdir/archive.zip" + Util.UNZIP_TYPE_EXTENSION, //
"/dir/subdir/archive2.zip" + Util.UNZIP_TYPE_EXTENSION },//
@@ -57,7 +58,7 @@ public class ZipAwareStorageCollectionItemTest {
final StorageCollectionItem collectionStorageItem = (StorageCollectionItem) masterRepository
.createStorageItem("/ga/1.0.0-SNAPSHOT");
final ZipAwareStorageCollectionItem zipAwareStorageCollectionItem = new ZipAwareStorageCollectionItem(
- unzipRepositoryMock, collectionStorageItem, new ConsoleLogger());
+ unzipRepositoryMock, collectionStorageItem, testLogger);
TestUtil.assertMembers(new String[] {
"/ga/1.0.0-SNAPSHOT/archive-1.0.0-SNAPSHOT-juhu.zip" + Util.UNZIP_TYPE_EXTENSION,
"/ga/1.0.0-SNAPSHOT/archive-1.0.0-SNAPSHOT.zip" + Util.UNZIP_TYPE_EXTENSION }, new String[0],
@@ -73,7 +74,7 @@ public class ZipAwareStorageCollectionItemTest {
final StorageCollectionItem collectionStorageItem = (StorageCollectionItem) masterRepository
.createStorageItem("/dir/subdir");
final ZipAwareStorageCollectionItem zipAwareStorageCollectionItem = new ZipAwareStorageCollectionItem(
- unzipRepositoryMock, collectionStorageItem, new ConsoleLogger());
+ unzipRepositoryMock, collectionStorageItem, testLogger);
final ArrayList<StorageItem> items = new ArrayList<StorageItem>(zipAwareStorageCollectionItem.list());
System.out.println(items.get(0).getPath());
System.out.println(items.get(0).getModified());
@@ -92,7 +93,7 @@ public class ZipAwareStorageCollectionItemTest {
final StorageCollectionItem collectionStorageItem = (StorageCollectionItem) masterRepository
.createStorageItem("/dir");
final ZipAwareStorageCollectionItem zipAwareStorageCollectionItem = new ZipAwareStorageCollectionItem(
- unzipRepositoryMock, collectionStorageItem, new ConsoleLogger());
+ unzipRepositoryMock, collectionStorageItem, testLogger);
TestUtil.assertMembers(new String[] { "/dir/subdir" }, new String[0], zipAwareStorageCollectionItem.list());
}
diff --git a/src/test/java/org/eclipse/tycho/nexus/internal/plugin/storage/ZippedItemTest.java b/src/test/java/org/eclipse/tycho/nexus/internal/plugin/storage/ZippedItemTest.java
index 8ac78ac..17ff5ac 100644
--- a/src/test/java/org/eclipse/tycho/nexus/internal/plugin/storage/ZippedItemTest.java
+++ b/src/test/java/org/eclipse/tycho/nexus/internal/plugin/storage/ZippedItemTest.java
@@ -12,16 +12,14 @@ package org.eclipse.tycho.nexus.internal.plugin.storage;
import java.io.IOException;
-import org.codehaus.plexus.logging.console.ConsoleLogger;
import org.eclipse.tycho.nexus.internal.plugin.DefaultUnzipRepository;
-import org.eclipse.tycho.nexus.internal.plugin.storage.Util;
-import org.eclipse.tycho.nexus.internal.plugin.storage.ZippedItem;
import org.eclipse.tycho.nexus.internal.plugin.test.RepositoryMock;
import org.eclipse.tycho.nexus.internal.plugin.test.TestUtil;
import org.eclipse.tycho.nexus.internal.plugin.test.UnzipRepositoryMock;
import org.junit.AfterClass;
import org.junit.Assert;
import org.junit.Test;
+import org.slf4j.LoggerFactory;
import org.sonatype.nexus.proxy.ItemNotFoundException;
import org.sonatype.nexus.proxy.LocalStorageException;
import org.sonatype.nexus.proxy.item.DefaultStorageCollectionItem;
@@ -141,7 +139,7 @@ public class ZippedItemTest {
@Test(expected = LocalStorageException.class)
public void testZipItemNotFound() throws Exception {
final String pathInZip = "test.txt";
- new ZippedItem(unzipReposMock, "/", pathInZip, 0L, new ConsoleLogger());
+ new ZippedItem(unzipReposMock, "/", pathInZip, 0L, LoggerFactory.getLogger(getClass()));
}
@Test
@@ -170,7 +168,8 @@ public class ZippedItemTest {
}
private ZippedItem createZippedItem(final String pathInZip) throws LocalStorageException, ItemNotFoundException {
- return new ZippedItem(unzipReposMock, pathToArchive, pathInZip, System.currentTimeMillis(), new ConsoleLogger());
+ return new ZippedItem(unzipReposMock, pathToArchive, pathInZip, System.currentTimeMillis(),
+ LoggerFactory.getLogger(getClass()));
}
@AfterClass
diff --git a/src/test/java/org/eclipse/tycho/nexus/internal/plugin/storage/ZippedStorageCollectionItemTest.java b/src/test/java/org/eclipse/tycho/nexus/internal/plugin/storage/ZippedStorageCollectionItemTest.java
index c20cc52..bd14435 100644
--- a/src/test/java/org/eclipse/tycho/nexus/internal/plugin/storage/ZippedStorageCollectionItemTest.java
+++ b/src/test/java/org/eclipse/tycho/nexus/internal/plugin/storage/ZippedStorageCollectionItemTest.java
@@ -16,17 +16,15 @@ import java.util.Collection;
import junit.framework.Assert;
-import org.codehaus.plexus.logging.console.ConsoleLogger;
import org.eclipse.tycho.nexus.internal.plugin.DefaultUnzipRepository;
-import org.eclipse.tycho.nexus.internal.plugin.storage.Util;
-import org.eclipse.tycho.nexus.internal.plugin.storage.ZippedItem;
-import org.eclipse.tycho.nexus.internal.plugin.storage.ZippedStorageCollectionItem;
import org.eclipse.tycho.nexus.internal.plugin.test.RepositoryMock;
import org.eclipse.tycho.nexus.internal.plugin.test.TestUtil;
import org.eclipse.tycho.nexus.internal.plugin.test.UnzipRepositoryMock;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.sonatype.nexus.proxy.AccessDeniedException;
import org.sonatype.nexus.proxy.IllegalOperationException;
import org.sonatype.nexus.proxy.ItemNotFoundException;
@@ -37,6 +35,8 @@ import org.sonatype.nexus.proxy.item.StorageItem;
public class ZippedStorageCollectionItemTest {
private DefaultUnzipRepository unzipRepositoryMock;
+ protected Logger testLogger = LoggerFactory.getLogger(getClass());
+
@Before
public void setupRepo() {
unzipRepositoryMock = UnzipRepositoryMock.createUnzipRepository(RepositoryMock.createMasterRepo());
@@ -46,7 +46,7 @@ public class ZippedStorageCollectionItemTest {
public void testList() throws ItemNotFoundException, IOException, AccessDeniedException,
NoSuchResourceStoreException, IllegalOperationException {
final ZippedItem zippedItem = new ZippedItem(unzipRepositoryMock, "/dir/subdir/archive.zip", "dir", 0L,
- new ConsoleLogger());
+ testLogger);
final ZippedStorageCollectionItem zippedStorageCollectionItem = new ZippedStorageCollectionItem(zippedItem);
TestUtil.assertMembers(new String[] { "/dir/subdir/archive.zip" + Util.UNZIP_TYPE_EXTENSION + "/dir/subdir" },
new String[] { "/dir/subdir/archive.zip" + Util.UNZIP_TYPE_EXTENSION + "/dir/test.txt" },
@@ -56,8 +56,7 @@ public class ZippedStorageCollectionItemTest {
@Test
public void testListInRoot() throws ItemNotFoundException, IOException, AccessDeniedException,
NoSuchResourceStoreException, IllegalOperationException {
- final ZippedItem zippedItem = new ZippedItem(unzipRepositoryMock, "/dir/subdir/archive.zip", "", 0L,
- new ConsoleLogger());
+ final ZippedItem zippedItem = new ZippedItem(unzipRepositoryMock, "/dir/subdir/archive.zip", "", 0L, testLogger);
final ZippedStorageCollectionItem zippedStorageCollectionItem = new ZippedStorageCollectionItem(zippedItem);
TestUtil.assertMembers(new String[] { "/dir/subdir/archive.zip" + Util.UNZIP_TYPE_EXTENSION + "/dir" },
new String[] { "/dir/subdir/archive.zip" + Util.UNZIP_TYPE_EXTENSION + "/test.txt" },
@@ -70,8 +69,7 @@ public class ZippedStorageCollectionItemTest {
final File file = new File("./src/test/resources/" + "masterRepo" + "/dir/subdir/archive.zip");
final long time = file.lastModified();
- final ZippedItem zipItem = new ZippedItem(unzipRepositoryMock, "/dir/subdir/archive.zip", "", time,
- new ConsoleLogger());
+ final ZippedItem zipItem = new ZippedItem(unzipRepositoryMock, "/dir/subdir/archive.zip", "", time, testLogger);
final ZippedStorageCollectionItem zipStorageCollectionItem = new ZippedStorageCollectionItem(zipItem);
Assert.assertEquals(time, zipStorageCollectionItem.getModified());
diff --git a/src/test/java/org/eclipse/tycho/nexus/internal/plugin/test/FSLocalRepositoryStorageMock.java b/src/test/java/org/eclipse/tycho/nexus/internal/plugin/test/FSLocalRepositoryStorageMock.java
index 22ce32d..e6ce511 100644
--- a/src/test/java/org/eclipse/tycho/nexus/internal/plugin/test/FSLocalRepositoryStorageMock.java
+++ b/src/test/java/org/eclipse/tycho/nexus/internal/plugin/test/FSLocalRepositoryStorageMock.java
@@ -12,7 +12,6 @@ package org.eclipse.tycho.nexus.internal.plugin.test;
import java.io.File;
import java.io.IOException;
-import java.util.HashMap;
import org.codehaus.plexus.util.FileUtils;
import org.sonatype.nexus.mime.DefaultMimeSupport;
@@ -28,8 +27,7 @@ public class FSLocalRepositoryStorageMock extends DefaultFSLocalRepositoryStorag
private final File baseDir = FileUtils.createTempFile("nexus-unzip" + File.separator, "test-storage", null);
public FSLocalRepositoryStorageMock() {
- super(new DefaultWastebasket(), new DefaultLinkPersister(), new DefaultMimeSupport(),
- new HashMap<String, Long>(), new DefaultFSPeer());
+ super(new DefaultWastebasket(), new DefaultLinkPersister(), new DefaultMimeSupport(), new DefaultFSPeer());
if (baseDir.exists()) {
try {