aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/pom.xml24
-rw-r--r--archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml23
-rw-r--r--archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resources/archetype-resources/src/main/java/SimpleArtifactConsumer.java50
-rw-r--r--archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resources/archetype-resources/src/test/java/SimpleArtifactConsumerTest.java58
-rw-r--r--archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resources/archetype-resources/src/test/resources/log4j2-test.xml4
-rw-r--r--archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resources/archetype-resources/src/test/resources/spring-context.xml30
-rw-r--r--archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resourcesstatic/archetype-resources/pom.xml100
-rw-r--r--archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/test/resources/projects/compile/archetype.properties9
-rw-r--r--pom.xml12
9 files changed, 151 insertions, 159 deletions
diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/pom.xml b/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/pom.xml
index 630fb1b67..8456350af 100644
--- a/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/pom.xml
+++ b/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/pom.xml
@@ -48,17 +48,33 @@
</dependency>
<dependency>
<groupId>org.apache.archiva</groupId>
- <artifactId>archiva-repository-admin-default</artifactId>
+ <artifactId>archiva-repository-admin-api</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.archiva</groupId>
- <artifactId>metadata-store-jcr</artifactId>
+ <artifactId>archiva-model</artifactId>
<scope>test</scope>
</dependency>
<dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>jcl-over-slf4j</artifactId>
+ <groupId>org.apache.archiva</groupId>
+ <artifactId>archiva-repository-layer</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.archiva</groupId>
+ <artifactId>metadata-repository-api</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.archiva</groupId>
+ <artifactId>maven2-repository</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.kubek2k</groupId>
+ <artifactId>springockito</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml b/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml
index 10c82acb7..fdcb1f874 100644
--- a/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml
+++ b/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml
@@ -49,32 +49,17 @@
<requiredProperty key="springVersion">
<defaultValue>${spring.version}</defaultValue>
</requiredProperty>
- <requiredProperty key="jackrabbitVersion">
- <defaultValue>${jackrabbit.version}</defaultValue>
- </requiredProperty>
<requiredProperty key="guavaVersion">
<defaultValue>${guava.version}</defaultValue>
</requiredProperty>
- <requiredProperty key="maven3xVersion">
- <defaultValue>${maven3x.version}</defaultValue>
- </requiredProperty>
<requiredProperty key="redbackRegistryVersion">
<defaultValue>${redback.registry.version}</defaultValue>
</requiredProperty>
- <requiredProperty key="redbackQuartzVersion">
- <defaultValue>${redback.quartz.version}</defaultValue>
- </requiredProperty>
- <requiredProperty key="commonsDbcpVersion">
- <defaultValue>${commons-dbcp.version}</defaultValue>
- </requiredProperty>
- <requiredProperty key="commonsPoolVersion">
- <defaultValue>${commons-pool.version}</defaultValue>
- </requiredProperty>
- <requiredProperty key="luceneVersion">
- <defaultValue>${lucene.version}</defaultValue>
+ <requiredProperty key="springockitoVersion">
+ <defaultValue>${springockito.version}</defaultValue>
</requiredProperty>
- <requiredProperty key="derbyVersion">
- <defaultValue>${derbyVersion}</defaultValue>
+ <requiredProperty key="mockitoVersion">
+ <defaultValue>${mockito.version}</defaultValue>
</requiredProperty>
</requiredProperties>
</archetype-descriptor>
diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resources/archetype-resources/src/main/java/SimpleArtifactConsumer.java b/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resources/archetype-resources/src/main/java/SimpleArtifactConsumer.java
index d5cd396e0..940a4e0c9 100644
--- a/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resources/archetype-resources/src/main/java/SimpleArtifactConsumer.java
+++ b/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resources/archetype-resources/src/main/java/SimpleArtifactConsumer.java
@@ -28,13 +28,23 @@ import org.apache.archiva.configuration.FileTypes;
import org.apache.archiva.consumers.AbstractMonitoredConsumer;
import org.apache.archiva.consumers.ConsumerException;
import org.apache.archiva.consumers.KnownRepositoryContentConsumer;
+import org.apache.archiva.metadata.repository.MetadataResolutionException;
+import org.apache.archiva.metadata.repository.RepositorySession;
+import org.apache.archiva.metadata.repository.RepositorySessionFactory;
+import org.apache.archiva.model.ArtifactReference;
import org.apache.archiva.redback.components.registry.Registry;
import org.apache.archiva.redback.components.registry.RegistryListener;
+import org.apache.archiva.repository.ManagedRepositoryContent;
+import org.apache.archiva.repository.RepositoryContentFactory;
+import org.apache.archiva.repository.RepositoryException;
+import org.apache.archiva.repository.layout.LayoutException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.annotation.PostConstruct;
import javax.inject.Inject;
+import javax.inject.Named;
+
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Service;
import org.apache.archiva.admin.model.beans.ManagedRepository;
@@ -81,18 +91,19 @@ public class SimpleArtifactConsumer
/** current repository being scanned */
private ManagedRepository repository;
- public void beginScan( ManagedRepository repository )
- throws ConsumerException
- {
- this.repository = repository;
- log.info( "Beginning scan of repository [" + this.repository.getId() + "]" );
- }
+ @Inject
+ @Named( value = "repositoryContentFactory#default" )
+ private RepositoryContentFactory repositoryContentFactory;
+
+ @Inject
+ private RepositorySessionFactory repositorySessionFactory;
+
+ private RepositorySession repositorySession;
public void beginScan( ManagedRepository repository, Date whenGathered )
throws ConsumerException
{
- this.repository = repository;
- log.info( "Beginning scan of repository [" + this.repository.getId() + "]" );
+ beginScan( repository, whenGathered, true );
}
public void beginScan( ManagedRepository repository, Date whenGathered, boolean executeOnEntireRepo )
@@ -100,28 +111,45 @@ public class SimpleArtifactConsumer
{
this.repository = repository;
log.info( "Beginning scan of repository [" + this.repository.getId() + "]" );
+
+ repositorySession = repositorySessionFactory.createSession();
}
public void processFile( String path )
throws ConsumerException
{
- log.info( "Processing entry [" + path + "] from repository [" + this.repository.getId() + "]" );
+ processFile( path, true );
}
public void processFile( String path, boolean executeOnEntireRepo )
throws ConsumerException
{
log.info( "Processing entry [" + path + "] from repository [" + this.repository.getId() + "]" );
+
+ try
+ {
+ ManagedRepositoryContent repositoryContent = repositoryContentFactory.getManagedRepositoryContent( repository.getId() );
+ ArtifactReference artifact = repositoryContent.toArtifactReference( path );
+
+ repositorySession.getRepository().getArtifacts( repository.getId(), artifact.getGroupId(),
+ artifact.getArtifactId(), artifact.getVersion() );
+ }
+ catch ( RepositoryException | LayoutException | MetadataResolutionException e )
+ {
+ throw new ConsumerException( e.getLocalizedMessage(), e );
+ }
}
public void completeScan()
{
- log.info( "Finished scan of repository [" + this.repository.getId() + "]" );
+ completeScan( true );
}
public void completeScan( boolean executeOnEntireRepo )
{
log.info( "Finished scan of repository [" + this.repository.getId() + "]" );
+
+ repositorySession.close();
}
@@ -153,7 +181,7 @@ public class SimpleArtifactConsumer
private void initIncludes()
{
includes.clear();
- includes.addAll( filetypes.getFileTypePatterns( FileTypes.INDEXABLE_CONTENT ) );
+ includes.addAll( filetypes.getFileTypePatterns( FileTypes.ARTIFACTS ) );
}
@PostConstruct
diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resources/archetype-resources/src/test/java/SimpleArtifactConsumerTest.java b/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resources/archetype-resources/src/test/java/SimpleArtifactConsumerTest.java
index 413fed7ed..095873c62 100644
--- a/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resources/archetype-resources/src/test/java/SimpleArtifactConsumerTest.java
+++ b/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resources/archetype-resources/src/test/java/SimpleArtifactConsumerTest.java
@@ -19,53 +19,65 @@ package $package;
* under the License.
*/
-import java.io.File;
-
+import org.apache.archiva.admin.model.RepositoryAdminException;
import org.apache.archiva.admin.model.beans.ManagedRepository;
-import org.apache.archiva.consumers.KnownRepositoryContentConsumer;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import javax.inject.Inject;
+import org.apache.archiva.admin.model.managed.ManagedRepositoryAdmin;
+import org.apache.archiva.metadata.repository.MetadataRepository;
+import org.apache.archiva.metadata.repository.RepositorySession;
+import org.apache.archiva.metadata.repository.RepositorySessionFactory;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
-import junit.framework.TestCase;
+
+import javax.inject.Inject;
+import java.io.File;
+import java.util.Date;
+
+import static org.mockito.Mockito.*;
/**
* <code>SimpleArtifactConsumerTest</code>
*/
-@RunWith( SpringJUnit4ClassRunner.class )
-@ContextConfiguration( locations = {"classpath*:/META-INF/spring-context.xml","classpath:/spring-context.xml"} )
+@RunWith(SpringJUnit4ClassRunner.class)
+@ContextConfiguration(locations = { "classpath*:/META-INF/spring-context.xml", "classpath:/spring-context.xml" })
public class SimpleArtifactConsumerTest
- extends TestCase
{
@Inject
private SimpleArtifactConsumer consumer;
- private File repoDir;
+ @Inject
+ private ManagedRepositoryAdmin managedRepositoryAdmin;
+
+ @Inject
+ private RepositorySessionFactory repositorySessionFactory;
private ManagedRepository testRepository;
private Logger log = LoggerFactory.getLogger( SimpleArtifactConsumer.class );
+ private MetadataRepository metadataRepository;
+
@Before
public void setUp()
throws Exception
{
- super.setUp();
- String consumerRole = KnownRepositoryContentConsumer.class.getName();
-
setUpMockRepository();
- }
-
+ RepositorySession repositorySession = mock( RepositorySession.class );
+ when( repositorySessionFactory.createSession() ).thenReturn( repositorySession );
+ metadataRepository = mock( MetadataRepository.class );
+ when( repositorySession.getRepository() ).thenReturn( metadataRepository );
+ }
private void setUpMockRepository()
+ throws RepositoryAdminException
{
- repoDir = new java.io.File( "target/test-consumer-repo" );
+ File repoDir = new File( "target/test-consumer-repo" );
repoDir.mkdirs();
repoDir.deleteOnExit();
@@ -73,6 +85,8 @@ public class SimpleArtifactConsumerTest
testRepository.setName( "Test-Consumer-Repository" );
testRepository.setId( "test-consumer-repository" );
testRepository.setLocation( repoDir.getAbsolutePath() );
+
+ when( managedRepositoryAdmin.getManagedRepository( testRepository.getId() ) ).thenReturn( testRepository );
}
@Test
@@ -81,17 +95,21 @@ public class SimpleArtifactConsumerTest
{
log.info( "Beginning scan of repository [test-consumer-repository]" );
- consumer.beginScan( testRepository );
-
+ consumer.beginScan( testRepository, new Date() );
}
@Test
public void testProcessFile()
throws Exception
{
- consumer.beginScan( testRepository );
+ consumer.beginScan( testRepository, new Date() );
consumer.processFile( "org/simple/test/testartifact/testartifact/1.0/testartifact-1.0.pom" );
consumer.processFile( "org/simple/test/testartifact/testartifact/1.1/testartifact-1.1.pom" );
+
+ verify( metadataRepository ).getArtifacts( testRepository.getId(), "org.simple.test.testartifact",
+ "testartifact", "1.0" );
+ verify( metadataRepository ).getArtifacts( testRepository.getId(), "org.simple.test.testartifact",
+ "testartifact", "1.1" );
}
}
diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resources/archetype-resources/src/test/resources/log4j2-test.xml b/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resources/archetype-resources/src/test/resources/log4j2-test.xml
index 814779b2d..1b662d7f2 100644
--- a/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resources/archetype-resources/src/test/resources/log4j2-test.xml
+++ b/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resources/archetype-resources/src/test/resources/log4j2-test.xml
@@ -19,7 +19,7 @@
-->
-<configuration status="debug">
+<configuration>
<appenders>
<Console name="console" target="SYSTEM_OUT">
<PatternLayout pattern="%d [%t] %-5p %c %x - %m%n"/>
@@ -27,7 +27,7 @@
</appenders>
<loggers>
- <logger name="org.springframework" level="info"/>
+ <logger name="org.springframework" level="error"/>
<root level="info">
<appender-ref ref="console"/>
diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resources/archetype-resources/src/test/resources/spring-context.xml b/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resources/archetype-resources/src/test/resources/spring-context.xml
index 3b08f16d9..f17d5b4d6 100644
--- a/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resources/archetype-resources/src/test/resources/spring-context.xml
+++ b/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resources/archetype-resources/src/test/resources/spring-context.xml
@@ -20,29 +20,15 @@
-->
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:mockito="http://www.mockito.org/spring/mockito"
xsi:schemaLocation="http://www.springframework.org/schema/beans
- http://www.springframework.org/schema/beans/spring-beans-3.0.xsd"
+ http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
+ http://www.mockito.org/spring/mockito http://www.mockito.org/spring/mockito.xsd"
default-lazy-init="true">
- <bean id="jcr-config" class="org.apache.archiva.metadata.repository.jcr.ArchivaJcrRepositoryConfig" factory-method="create">
- <constructor-arg value="${appserver.base}/conf/foo.xml"/>
- <constructor-arg value="${appserver.base}/data/jcr"/>
- </bean>
- <bean id="jcr-repository" class="org.apache.jackrabbit.core.RepositoryImpl" destroy-method="shutdown" lazy-init="true">
- <constructor-arg ref="jcr-config"/>
- </bean>
+ <mockito:mock id="mockManagedRepositoryAdmin" class="org.apache.archiva.admin.model.managed.ManagedRepositoryAdmin" />
+ <mockito:mock id="mockRemoteRepositoryAdmin" class="org.apache.archiva.admin.model.remote.RemoteRepositoryAdmin" />
+ <mockito:mock id="mockRepositorySessionFactory" class="org.apache.archiva.metadata.repository.RepositorySessionFactory" />
- <bean name="scheduler" class="org.apache.archiva.redback.components.scheduler.DefaultScheduler">
- <property name="properties">
- <props>
- <prop key="org.quartz.scheduler.instanceName">scheduler1</prop>
- <prop key="org.quartz.threadPool.class">org.quartz.simpl.SimpleThreadPool</prop>
- <prop key="org.quartz.threadPool.threadCount">2</prop>
- <prop key="org.quartz.threadPool.threadPriority">4</prop>
- <prop key="org.quartz.jobStore.class">org.quartz.simpl.RAMJobStore</prop>
- </props>
- </property>
- </bean>
-
- <alias name="userConfiguration#redback" alias="userConfiguration#default"/>
-</beans>
+ <alias alias="repositorySessionFactory#jcr" name="mockRepositorySessionFactory" />
+</beans> \ No newline at end of file
diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resourcesstatic/archetype-resources/pom.xml b/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resourcesstatic/archetype-resources/pom.xml
index fc7edf915..a12b75d2d 100644
--- a/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resourcesstatic/archetype-resources/pom.xml
+++ b/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resourcesstatic/archetype-resources/pom.xml
@@ -33,16 +33,11 @@
<archiva.version>${archivaVersion}</archiva.version>
<slf4j.version>${slf4jVersion}</slf4j.version>
<log4j.version>${log4jVersion}</log4j.version>
- <jackrabbit.version>${jackrabbitVersion}</jackrabbit.version>
<spring.version>${springVersion}</spring.version>
- <guava.version>${guavaVersion}</guava.version>
- <maven3x.version>${maven3xVersion}</maven3x.version>
<redback.registry.version>${redbackRegistryVersion}</redback.registry.version>
- <redback.quartz.version>${redbackQuartzVersion}</redback.quartz.version>
- <commons.dbcp.version>${commonsDbcpVersion}</commons.dbcp.version>
- <commons.pool.version>${commonsPoolVersion}</commons.pool.version>
- <lucene.version>${luceneVersion}</lucene.version>
- <derby.version>${derbyVersion}</derby.version>
+ <guava.version>${guavaVersion}</guava.version>
+ <springockito.version>${springockitoVersion}</springockito.version>
+ <mockito.version>${mockitoVersion}</mockito.version>
</properties>
<dependencies>
<dependency>
@@ -61,6 +56,21 @@
<version>${archiva.version}</version>
</dependency>
<dependency>
+ <groupId>org.apache.archiva</groupId>
+ <artifactId>archiva-model</artifactId>
+ <version>${archiva.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.archiva</groupId>
+ <artifactId>archiva-repository-layer</artifactId>
+ <version>${archiva.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.archiva</groupId>
+ <artifactId>metadata-repository-api</artifactId>
+ <version>${archiva.version}</version>
+ </dependency>
+ <dependency>
<groupId>org.apache.archiva.redback.components.registry</groupId>
<artifactId>spring-registry-api</artifactId>
<version>${redback.registry.version}</version>
@@ -117,32 +127,14 @@
</dependency>
<dependency>
<groupId>org.apache.archiva</groupId>
- <artifactId>metadata-store-jcr</artifactId>
+ <artifactId>maven2-repository</artifactId>
<version>${archiva.version}</version>
<scope>test</scope>
</dependency>
<dependency>
- <groupId>org.apache.jackrabbit</groupId>
- <artifactId>jackrabbit-core</artifactId>
- <version>${jackrabbit.version}</version>
- <scope>test</scope>
- <exclusions>
- <exclusion>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.apache.archiva.redback.components</groupId>
- <artifactId>spring-quartz</artifactId>
- <version>${redback.quartz.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>jcl-over-slf4j</artifactId>
- <version>${slf4j.version}</version>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-core</artifactId>
+ <version>${log4j.version}</version>
<scope>test</scope>
</dependency>
<dependency>
@@ -152,9 +144,9 @@
<scope>test</scope>
</dependency>
<dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-core</artifactId>
- <version>${log4j.version}</version>
+ <groupId>org.kubek2k</groupId>
+ <artifactId>springockito</artifactId>
+ <version>${springockito.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
@@ -168,31 +160,9 @@
<version>${guava.version}</version>
</dependency>
<dependency>
- <groupId>org.apache.maven</groupId>
- <artifactId>maven-model</artifactId>
- <version>${maven3x.version}</version>
- </dependency>
- <dependency>
- <groupId>commons-dbcp</groupId>
- <artifactId>commons-dbcp</artifactId>
- <version>${commons.dbcp.version}</version>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>commons-pool</groupId>
- <artifactId>commons-pool</artifactId>
- <version>${commons.pool.version}</version>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.lucene</groupId>
- <artifactId>lucene-core</artifactId>
- <version>${lucene.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.derby</groupId>
- <artifactId>derby</artifactId>
- <version>${derby.version}</version>
+ <groupId>org.mockito</groupId>
+ <artifactId>mockito-all</artifactId>
+ <version>${mockito.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
@@ -236,20 +206,6 @@
<target>1.7</target>
</configuration>
</plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <systemPropertyVariables>
- <appserver.base>${project.build.directory}/appserver-base</appserver.base>
- <archiva.user.configFileName>${project.build.directory}/archiva.xml</archiva.user.configFileName>
- <test.resources.path>${project.build.testOutputDirectory}</test.resources.path>
- <redback.jdbc.url>jdbc:derby:memory:users-test;create=true</redback.jdbc.url>
- <redback.jdbc.driver.name>org.apache.derby.jdbc.EmbeddedDriver</redback.jdbc.driver.name>
- <java.io.tmpdir>${project.build.directory}/temp</java.io.tmpdir>
- </systemPropertyVariables>
- </configuration>
- </plugin>
</plugins>
</build>
<!--repositories>
diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/test/resources/projects/compile/archetype.properties b/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/test/resources/projects/compile/archetype.properties
index 7b7766421..68595074a 100644
--- a/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/test/resources/projects/compile/archetype.properties
+++ b/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/test/resources/projects/compile/archetype.properties
@@ -24,13 +24,8 @@ package=org.apache.archiva.consumer.its
archivaVersion=${archivaVersion}
log4jVersion=${log4j.version}
slf4jVersion=${slf4j.version}
-jackrabbitVersion=${jackrabbit.version}
springVersion=${spring.version}
guavaVersion=${guava.version}
-maven3xVersion=${maven3x.version}
redbackRegistryVersion=${redback.registry.version}
-redbackQuartzVersion=${redback.quartz.version}
-commonsDbcpVersion=${commons-dbcp.version}
-commonsPoolVersion=${commons-pool.version}
-luceneVersion=${lucene.version}
-derbyVersion=${derbyVersion}
+springockitoVersion=${springockito.version}
+mockitoVersion=${mockito.version} \ No newline at end of file
diff --git a/pom.xml b/pom.xml
index a8b86041d..2b64c1253 100644
--- a/pom.xml
+++ b/pom.xml
@@ -105,6 +105,8 @@
<tomcat7Version>7.0.54</tomcat7Version>
<release.preparationGoals>clean install</release.preparationGoals>
+ <springockito.version>1.0.9</springockito.version>
+ <mockito.version>1.9.0</mockito.version>
</properties>
<dependencyManagement>
@@ -1515,13 +1517,19 @@
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
- <version>1.8.5</version>
+ <version>${mockito.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
- <version>1.8.5</version>
+ <version>${mockito.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.kubek2k</groupId>
+ <artifactId>springockito</artifactId>
+ <version>${springockito.version}</version>
<scope>test</scope>
</dependency>
<dependency>