]> source.dussan.org Git - archiva.git/commitdiff
ensure archetype builds on a clean repository
authorBrett Porter <brett@apache.org>
Tue, 29 Jul 2014 08:16:23 +0000 (18:16 +1000)
committerBrett Porter <brett@apache.org>
Tue, 29 Jul 2014 08:16:23 +0000 (18:16 +1000)
Need to line up several dependencies that got managed differently, and trim
out things no longer needed. This could use a diet in general - there should
not be very much of Archiva's API or dependencies needed to build and test a
consumer.

archiva-modules/archiva-base/archiva-common/pom.xml
archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/pom.xml
archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml
archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resourcesstatic/archetype-resources/pom.xml
archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/test/resources/projects/compile/archetype.properties
archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/test/test-settings.xml
pom.xml

index 56e50cfd1c7bb75697fccb2388040d8977cc5142..39d4ec37dd2699ecce5915932d8081ca730d180b 100644 (file)
@@ -49,7 +49,6 @@
     <dependency>
       <groupId>org.eclipse.sisu</groupId>
       <artifactId>org.eclipse.sisu.plexus</artifactId>
-      <scope>compile</scope>
     </dependency>
     <dependency>
       <groupId>dom4j</groupId>
index e23ca95c9f77e503cb8078dbabda82fcf2fa7c15..630fb1b67bdd7865f0cdd2ecf3434d6e8d51e137 100644 (file)
     <archetypeVersion>2.2</archetypeVersion>
   </properties>
   <dependencies>
+    <!-- Used by the archetype, so needed to be built before integration
+         tests run and use them -->
     <dependency>
       <groupId>org.apache.archiva</groupId>
       <artifactId>archiva-consumer-api</artifactId>
+      <scope>test</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.archiva</groupId>
       <artifactId>archiva-configuration</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.archiva</groupId>
-      <artifactId>archiva-repository-layer</artifactId>
-      <exclusions>
-        <exclusion>
-          <groupId>log4j</groupId>
-          <artifactId>log4j</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>commons-logging</groupId>
-          <artifactId>commons-logging-api</artifactId>
-        </exclusion>
-      </exclusions>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.archiva</groupId>
-      <artifactId>archiva-indexer</artifactId>
+      <scope>test</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.archiva</groupId>
       <artifactId>archiva-repository-admin-default</artifactId>
-      <scope>provided</scope>
+      <scope>test</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.archiva</groupId>
       <artifactId>metadata-store-jcr</artifactId>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.maven.wagon</groupId>
-      <artifactId>wagon-http</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.httpcomponents</groupId>
-      <artifactId>httpcore</artifactId>
-      <exclusions>
-        <exclusion>
-          <groupId>commons-logging</groupId>
-          <artifactId>commons-logging</artifactId>
-        </exclusion>
-      </exclusions>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.maven.wagon</groupId>
-      <artifactId>wagon-http-lightweight</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>xerces</groupId>
-      <artifactId>xercesImpl</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.derby</groupId>
-      <artifactId>derby</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>commons-dbcp</groupId>
-      <artifactId>commons-dbcp</artifactId>
-      <version>1.4</version>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>commons-pool</groupId>
-      <artifactId>commons-pool</artifactId>
-      <scope>runtime</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.jsoup</groupId>
-      <artifactId>jsoup</artifactId>
       <scope>test</scope>
     </dependency>
     <dependency>
index fa67d3d4d4ad0c93f5b04804680eab9247bf0279..f31f8566388fcbcc2661a551f975a57147275c6c 100644 (file)
     <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>
+    <requiredProperty key="derbyVersion">
+      <defaultValue>${derbyVersion}</defaultValue>
+    </requiredProperty>
   </requiredProperties>
 </archetype-descriptor>
index 321ddda4132d0c94458c58d2d836908247ca29b3..dcb862b99705fcb42c2189b0dc5ff83a55b39ef8 100644 (file)
   </description>
   <properties>
     <archiva.version>${archivaVersion}</archiva.version>
-    <slf4jVersion>${slf4jVersion}</slf4jVersion>
-    <log4jVersion>${log4jVersion}</log4jVersion>
+    <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>
   </properties>
   <dependencies>
     <dependency>
     <dependency>
       <groupId>org.apache.archiva.redback.components.registry</groupId>
       <artifactId>spring-registry-api</artifactId>
-      <version>2.3</version>
+      <version>${redback.registry.version}</version>
+      <exclusions>
+        <exclusion>
+          <groupId>commons-logging</groupId>
+          <artifactId>commons-logging</artifactId>
+        </exclusion>
+      </exclusions>
     </dependency>
     <dependency>
       <groupId>org.slf4j</groupId>
       <artifactId>slf4j-api</artifactId>
-      <version>${slf4jVersion}</version>
+      <version>${slf4j.version}</version>
     </dependency>
     <dependency>
       <groupId>javax.inject</groupId>
       <groupId>org.springframework</groupId>
       <artifactId>spring-context</artifactId>
       <version>${spring.version}</version>
+      <exclusions>
+        <exclusion>
+          <groupId>commons-logging</groupId>
+          <artifactId>commons-logging</artifactId>
+        </exclusion>
+      </exclusions>
     </dependency>
 
     <dependency>
     <dependency>
       <groupId>org.apache.archiva.redback.components</groupId>
       <artifactId>spring-quartz</artifactId>
-      <version>2.1</version>
+      <version>${redback.quartz.version}</version>
       <scope>test</scope>
     </dependency>
     <dependency>
       <groupId>org.slf4j</groupId>
       <artifactId>jcl-over-slf4j</artifactId>
-      <version>${slf4jVersion}</version>
+      <version>${slf4j.version}</version>
       <scope>test</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.logging.log4j</groupId>
       <artifactId>log4j-slf4j-impl</artifactId>
-      <version>${log4jVersion}</version>
+      <version>${log4j.version}</version>
       <scope>test</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.logging.log4j</groupId>
       <artifactId>log4j-core</artifactId>
-      <version>${log4jVersion}</version>
+      <version>${log4j.version}</version>
       <scope>test</scope>
     </dependency>
   </dependencies>
+
+  <!-- match up with those used by Archiva -->
+  <dependencyManagement>
+    <dependencies>
+      <dependency>
+        <groupId>com.google.guava</groupId>
+        <artifactId>guava</artifactId>
+        <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>
+      </dependency>
+    </dependencies>
+  </dependencyManagement>
+
   <build>
     <pluginManagement>
       <plugins>
index 8741937efc15fc68093a69cb7eeae4cefcbb101e..7b7766421ad6fe7dc008a427784d060786b4710f 100644 (file)
@@ -21,14 +21,16 @@ groupId=org.apache.archiva.consumer.its.compile
 artifactId=simple-consumer-compile
 version=1.0-SNAPSHOT
 package=org.apache.archiva.consumer.its
-wagonVersion=${wagon.version}
 archivaVersion=${archivaVersion}
 log4jVersion=${log4j.version}
 slf4jVersion=${slf4j.version}
 jackrabbitVersion=${jackrabbit.version}
 springVersion=${spring.version}
-redbackVersion=${redback.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}
-httpclientCoreVersion=${httpclient.core.version}
-commons-poolVersion=${commons-pool.version}
-
index a2330a905945b5ff77c7fd0f0d28ba002ed0992d..ed41e84d5dc4806fffd055a691aca069f0cd0659 100644 (file)
@@ -24,17 +24,11 @@ under the License.
   xmlns="http://maven.apache.org/SETTINGS/1.0.0">
   <mirrors>
     <mirror>
-      <mirrorOf>archiva.snapshots</mirrorOf>
+      <mirrorOf>external:*</mirrorOf>
       <id>local-mirror</id>
       <name>local-mirror</name>
       <url>@localRepositoryUrl@</url>
     </mirror>
-    <mirror>
-      <mirrorOf>central</mirrorOf>
-      <id>central-mirror</id>
-      <name>central-mirror</name>
-      <url>@localRepositoryUrl@</url>
-    </mirror>
   </mirrors>
   <profiles>
     <profile>
@@ -66,26 +60,6 @@ under the License.
             <enabled>true</enabled>
           </snapshots>
         </repository>
-        <repository>
-          <id>apache.snapshots</id>
-          <url>@localRepositoryUrl@</url>
-          <releases>
-            <enabled>true</enabled>
-          </releases>
-          <snapshots>
-            <enabled>true</enabled>
-          </snapshots>
-        </repository>
-        <repository>
-          <id>archiva.snapshots</id>
-          <url>@localRepositoryUrl@</url>
-          <releases>
-            <enabled>true</enabled>
-          </releases>
-          <snapshots>
-            <enabled>true</enabled>
-          </snapshots>
-        </repository>
       </repositories>
       <pluginRepositories>
         <pluginRepository>
diff --git a/pom.xml b/pom.xml
index 9a511d8f210116102eff1714d285cb8eca2ffc01..9c7a6e9b5f6732f7272952a8bf9a12f937d0ec03 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -57,6 +57,7 @@
     <commons-io.version>2.4</commons-io.version>
     <commons-lang.version>2.6</commons-lang.version>
     <commons-pool.version>1.6</commons-pool.version>
+    <commons-dbcp.version>1.4</commons-dbcp.version>
 
     <maven3x.version>3.0.5</maven3x.version>
     <maven.version>2.0.8</maven.version>
@@ -91,6 +92,7 @@
     <httpclient.core.version>4.3</httpclient.core.version>
     <javaxMailVersion>1.4</javaxMailVersion>
     <jettyVersion>8.1.14.v20131031</jettyVersion>
+    <guava.version>16.0.1</guava.version>
 
     <!-- restore when we will be able to use a derby in memory database -->
     <redbackTestJdbcUrl>jdbc:derby:memory:users-test;create=true</redbackTestJdbcUrl>
       <dependency>
         <groupId>com.google.guava</groupId>
         <artifactId>guava</artifactId>
-        <version>16.0.1</version>
+        <version>${guava.version}</version>
       </dependency>
       <dependency>
         <groupId>stax</groupId>
       <dependency>
         <groupId>commons-dbcp</groupId>
         <artifactId>commons-dbcp</artifactId>
-        <version>1.4</version>
+        <version>${commons-dbcp.version}</version>
         <scope>runtime</scope>
       </dependency>
       <dependency>
             <groupId>xom</groupId>
             <artifactId>xom</artifactId>
           </exclusion>
+          <exclusion>
+            <groupId>xerces</groupId>
+            <artifactId>xercesImpl</artifactId>
+          </exclusion>
         </exclusions>
       </dependency>
       <dependency>