]> source.dussan.org Git - archiva.git/commitdiff
fix merge of converters
authorBrett Porter <brett@apache.org>
Wed, 30 Jul 2014 04:34:42 +0000 (14:34 +1000)
committerBrett Porter <brett@apache.org>
Wed, 30 Jul 2014 04:34:42 +0000 (14:34 +1000)
The test files in artifact converter had been adjusted, and need to merge the
spring context. Also make the artifactConverter injection more specific to
avoid picking up those defined for tests

archiva-modules/archiva-base/archiva-converter/src/main/java/org/apache/archiva/converter/legacy/LegacyConverterArtifactConsumer.java
archiva-modules/archiva-base/archiva-converter/src/test/expected-files/converted-v3-snapshot.pom
archiva-modules/archiva-base/archiva-converter/src/test/expected-files/converted-v3-timestamped-snapshot.pom
archiva-modules/archiva-base/archiva-converter/src/test/expected-files/converted-v3-warnings.pom
archiva-modules/archiva-base/archiva-converter/src/test/expected-files/converted-v3.pom
archiva-modules/archiva-base/archiva-converter/src/test/expected-files/relocated-test/relocated-v3artifact/1.0.0/relocated-v3artifact-1.0.0.pom
archiva-modules/archiva-base/archiva-converter/src/test/expected-files/test/relocated-v3artifact/1.0.0/relocated-v3artifact-1.0.0.pom
archiva-modules/archiva-base/archiva-converter/src/test/resources/spring-context.xml

index ff15d3b1f8b34d45a5eb9f3809cafc8cc7281b3f..dc1b0812612ac738f300ac18c258a07132e2807b 100644 (file)
@@ -40,6 +40,7 @@ import org.springframework.context.annotation.Scope;
 import org.springframework.stereotype.Service;
 
 import javax.inject.Inject;
+import javax.inject.Named;
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
@@ -59,6 +60,7 @@ public class LegacyConverterArtifactConsumer
     private Logger log = LoggerFactory.getLogger( LegacyConverterArtifactConsumer.class );
 
     @Inject
+    @Named("artifactConverter#legacy-to-default")
     private ArtifactConverter artifactConverter;
 
     private ArtifactFactory artifactFactory;
index 1615b66636d56f08e4a5e2262f587e68116cd4b3..f03b5a53f86dde6a14b679034bbbfa5a21c75e7b 100644 (file)
@@ -1,4 +1,5 @@
-<project>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <modelVersion>4.0.0</modelVersion>
   <groupId>test</groupId>
   <artifactId>v3artifact</artifactId>
index 94307d8638abeca2eb99aad7c4a7c405216816c0..1c56340b04dbd9079754c6b3f6d2ba60405aa1db 100644 (file)
@@ -1,4 +1,5 @@
-<project>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <modelVersion>4.0.0</modelVersion>
   <groupId>test</groupId>
   <artifactId>v3artifact</artifactId>
index 25f4e76d0cc625625f0b10a9a92c92c4839b3788..bdd22765f703574b995d67d4bc465dc52362c421 100644 (file)
@@ -1,4 +1,5 @@
-<project>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <modelVersion>4.0.0</modelVersion>
   <groupId>test</groupId>
   <artifactId>v3-warnings-artifact</artifactId>
index 9f8b63e16c07686ceefb001e9601021d46f38a93..df4700c04f944e853ccad42a50797138007178bc 100644 (file)
@@ -1,4 +1,5 @@
-<project>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <modelVersion>4.0.0</modelVersion>
   <groupId>test</groupId>
   <artifactId>v3artifact</artifactId>
index 0180549f0f3ec81a3a6060f87323abdd4409cd36..3f5df2267e798e8ca792c4cd30d1d8d7df4e2ab6 100644 (file)
@@ -1,4 +1,5 @@
-<project>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <modelVersion>4.0.0</modelVersion>
   <groupId>relocated-test</groupId>
   <artifactId>relocated-v3artifact</artifactId>
index b20f62f9e9cae3f168abc5f708d0477017ec6675..4efefb7417d50ce5c09e822637e871f17c23f5c7 100644 (file)
@@ -1,4 +1,5 @@
-<project>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <groupId>test</groupId>
   <artifactId>relocated-v3artifact</artifactId>
   <version>1.0.0</version>
index b679284d8dc6360675e88d71474c73bbee2ef023..69187cb7cc0b61e3b8796a70d742c1ebea06fe7d 100644 (file)
   -->
 <beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xmlns:context="http://www.springframework.org/schema/context"
        xsi:schemaLocation="http://www.springframework.org/schema/beans
-           http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
-           http://www.springframework.org/schema/context 
-           http://www.springframework.org/schema/context/spring-context-3.0.xsd"
-       default-lazy-init="true">
+           http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
+
+  <bean name="artifactConverter#force-repository-converter" class="org.apache.archiva.converter.artifact.LegacyToDefaultConverter">
+    <property name="force" value="true"/>
+    <property name="dryrun" value="false"/>
+  </bean>
+
+  <bean name="artifactConverter#dryrun-repository-converter" class="org.apache.archiva.converter.artifact.LegacyToDefaultConverter">
+    <property name="force" value="false"/>
+    <property name="dryrun" value="true"/>
+  </bean>
 
   <bean name="mockArchivaAdministration" class="org.apache.archiva.converter.mock.MockArchivaAdministration"/>