From: Olivier Lamy Date: Fri, 4 Nov 2011 21:28:51 +0000 (+0000) Subject: fix consumer archetype X-Git-Tag: archiva-1.4-M2~148 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=1c437a85fb0feb25a0f386a715c7675e047e23c2;p=archiva.git fix consumer archetype git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1197792 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resources/archetype-resources/pom.xml b/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resources/archetype-resources/pom.xml index 1c0588316..08c3752ed 100644 --- a/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resources/archetype-resources/pom.xml +++ b/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resources/archetype-resources/pom.xml @@ -7,7 +7,7 @@ ${version} jar Simple Archiva Consumer - http://maven.apache.org + http://archiva.apache.org This is a simple consumer component which demonstrates how a component can be plugged in Archiva. @@ -48,12 +48,72 @@ 4.9 test + + org.slf4j + slf4j-api + 1.6.4 + + + org.slf4j + slf4j-log4j12 + 1.6.4 + provided + + + org.apache.archiva + archiva-repository-admin-default + ${archiva.version} + provided + + + org.apache.archiva + metadata-store-jcr + ${archiva.version} + provided + + + org.apache.jackrabbit + jackrabbit-core + 2.3.0 + provided + + + commons-logging + commons-logging + + + + + org.codehaus.redback + redback-common-test-resources + test + 1.4-SNAPSHOT + + + org.codehaus.redback + redback-rbac-memory + test + 1.4-SNAPSHOT + + + org.codehaus.redback + redback-rbac-cached + test + 1.4-SNAPSHOT + + + org.codehaus.redback + redback-rbac-role-manager + test + 1.4-SNAPSHOT + org.apache.maven.plugins maven-antrun-plugin + 1.6 package @@ -61,7 +121,7 @@ - Remember to add the the following to the knownconsumers section in ~/.m2/archiva.xml + Remember to add the the following to the knownconsumers section in your archiva.xml file <knownContentConsumer>simple-artifact-consumer</knownContentConsumer> @@ -75,11 +135,26 @@ org.apache.maven.plugins maven-compiler-plugin + 2.3.2 1.5 1.5 + + org.apache.maven.plugins + maven-surefire-plugin + 2.10 + + + ${project.build.directory}/appserver-base + ${basedir}/target/archiva.xml + ${project.build.testOutputDirectory} + jdbc:derby:memory:users-test;create=true + org.apache.derby.jdbc.EmbeddedDriver + + + @@ -93,5 +168,16 @@ true + + redback.snapshots + Codehaus Redback Snapshots Repository + http://snapshots.repository.codehaus.org/ + + false + + + true + + diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resources/archetype-resources/src/main/resources/spring-context.xml b/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resources/archetype-resources/src/main/resources/spring-context.xml new file mode 100644 index 000000000..0a7c14036 --- /dev/null +++ b/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resources/archetype-resources/src/main/resources/spring-context.xml @@ -0,0 +1,32 @@ + + + + + + + + \ No newline at end of file diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resources/archetype-resources/src/test/resources/log4j.xml b/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resources/archetype-resources/src/test/resources/log4j.xml new file mode 100644 index 000000000..7780ac880 --- /dev/null +++ b/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resources/archetype-resources/src/test/resources/log4j.xml @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + 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 4a0911148..cca612d92 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 @@ -29,6 +29,25 @@ + + + + + + + + + + + + scheduler1 + org.quartz.simpl.SimpleThreadPool + 2 + 4 + org.quartz.simpl.RAMJobStore + + + \ No newline at end of file diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/test/resources/projects/compile/goal.txt b/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/test/resources/projects/compile/goal.txt index 4a1a71d33..d59d337a7 100644 --- a/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/test/resources/projects/compile/goal.txt +++ b/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/test/resources/projects/compile/goal.txt @@ -1 +1 @@ -verify \ No newline at end of file +clean verify \ No newline at end of file diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/src/test/java/org/apache/archiva/consumers/lucene/test/TestRBACManager.java b/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/src/test/java/org/apache/archiva/consumers/lucene/test/TestRBACManager.java index 3e367bdf6..5b0b88e5f 100644 --- a/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/src/test/java/org/apache/archiva/consumers/lucene/test/TestRBACManager.java +++ b/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/src/test/java/org/apache/archiva/consumers/lucene/test/TestRBACManager.java @@ -28,6 +28,7 @@ import org.codehaus.plexus.redback.rbac.RbacObjectNotFoundException; import org.codehaus.plexus.redback.rbac.Resource; import org.codehaus.plexus.redback.rbac.Role; import org.codehaus.plexus.redback.rbac.UserAssignment; +import org.codehaus.plexus.redback.rbac.memory.MemoryResource; import org.springframework.stereotype.Service; import java.util.Collection; @@ -197,43 +198,41 @@ public class TestRBACManager implements RBACManager public boolean operationExists( Operation operation ) { - return false; //To change body of implemented methods use File | Settings | File Templates. + return false; } public Operation saveOperation( Operation operation ) throws RbacObjectInvalidException, RbacManagerException { - return null; //To change body of implemented methods use File | Settings | File Templates. + return null; } public Operation getOperation( String operationName ) throws RbacObjectNotFoundException, RbacManagerException { - return null; //To change body of implemented methods use File | Settings | File Templates. + return null; } public List getAllOperations() throws RbacManagerException { - return null; //To change body of implemented methods use File | Settings | File Templates. + return null; } public void removeOperation( Operation operation ) throws RbacObjectNotFoundException, RbacObjectInvalidException, RbacManagerException { - //To change body of implemented methods use File | Settings | File Templates. } public void removeOperation( String operationName ) throws RbacObjectNotFoundException, RbacObjectInvalidException, RbacManagerException { - //To change body of implemented methods use File | Settings | File Templates. } public Resource createResource( String identifier ) throws RbacManagerException { - return null; //To change body of implemented methods use File | Settings | File Templates. + return new MemoryResource(); } public boolean resourceExists( String identifier ) diff --git a/archiva-modules/archiva-web/archiva-webapp/pom.xml b/archiva-modules/archiva-web/archiva-webapp/pom.xml index 103759bf2..b2e510e63 100644 --- a/archiva-modules/archiva-web/archiva-webapp/pom.xml +++ b/archiva-modules/archiva-web/archiva-webapp/pom.xml @@ -30,7 +30,6 @@ Archiva Web :: Application - 7.4.5.v20110725 diff --git a/archiva-modules/plugins/metadata-store-jcr/src/main/java/org/apache/archiva/metadata/repository/jcr/ArchivaJcrRepositoryConfig.java b/archiva-modules/plugins/metadata-store-jcr/src/main/java/org/apache/archiva/metadata/repository/jcr/ArchivaJcrRepositoryConfig.java index e6e5740c4..11d7cae5d 100644 --- a/archiva-modules/plugins/metadata-store-jcr/src/main/java/org/apache/archiva/metadata/repository/jcr/ArchivaJcrRepositoryConfig.java +++ b/archiva-modules/plugins/metadata-store-jcr/src/main/java/org/apache/archiva/metadata/repository/jcr/ArchivaJcrRepositoryConfig.java @@ -37,7 +37,6 @@ public class ArchivaJcrRepositoryConfig if ( !homeFile.exists( ) ) { homeFile.mkdirs( ); - } File configurationFile = new File( file );