fix merge of converters

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
This commit is contained in:
Brett Porter 2014-07-30 14:34:42 +10:00
parent c329113c52
commit 54f97d54cb
8 changed files with 25 additions and 11 deletions

View 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;

View 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>

View 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>

View 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>

View 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>

View 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>

View 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>

View File

@ -20,12 +20,18 @@
-->
<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"/>