diff options
author | Olivier Lamy <olamy@apache.org> | 2011-05-26 20:53:32 +0000 |
---|---|---|
committer | Olivier Lamy <olamy@apache.org> | 2011-05-26 20:53:32 +0000 |
commit | 22961f8dc45109662e5d10bb35df60ee79683eda (patch) | |
tree | 7b601e279610d840d04a99ee903e43c68e198768 /archiva-modules/archiva-base/archiva-converter/src | |
parent | 2fdf7359b309daee887a89f26bd3f31970d9c504 (diff) | |
download | archiva-22961f8dc45109662e5d10bb35df60ee79683eda.tar.gz archiva-22961f8dc45109662e5d10bb35df60ee79683eda.zip |
[MRM-1473] remove use of plexus-spring
ok for archiva-artifact-converter
introduce a new bridge tru sisu-guice to be able to use maven apis components
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1128078 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules/archiva-base/archiva-converter/src')
3 files changed, 41 insertions, 2 deletions
diff --git a/archiva-modules/archiva-base/archiva-converter/src/main/java/org/apache/maven/archiva/converter/legacy/DefaultLegacyRepositoryConverter.java b/archiva-modules/archiva-base/archiva-converter/src/main/java/org/apache/maven/archiva/converter/legacy/DefaultLegacyRepositoryConverter.java index b37e0c893..ddeafce7a 100644 --- a/archiva-modules/archiva-base/archiva-converter/src/main/java/org/apache/maven/archiva/converter/legacy/DefaultLegacyRepositoryConverter.java +++ b/archiva-modules/archiva-base/archiva-converter/src/main/java/org/apache/maven/archiva/converter/legacy/DefaultLegacyRepositoryConverter.java @@ -35,13 +35,15 @@ import org.apache.maven.archiva.converter.RepositoryConversionException; import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.artifact.repository.ArtifactRepositoryFactory; import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout; +import org.springframework.stereotype.Service; /** * DefaultLegacyRepositoryConverter * * @version $Id$ - * @plexus.component + * plexus.component */ +@Service("legacyRepositoryConverter#default") public class DefaultLegacyRepositoryConverter implements LegacyRepositoryConverter { diff --git a/archiva-modules/archiva-base/archiva-converter/src/main/java/org/apache/maven/archiva/converter/legacy/LegacyConverterArtifactConsumer.java b/archiva-modules/archiva-base/archiva-converter/src/main/java/org/apache/maven/archiva/converter/legacy/LegacyConverterArtifactConsumer.java index dd03c4a34..a7f73843d 100644 --- a/archiva-modules/archiva-base/archiva-converter/src/main/java/org/apache/maven/archiva/converter/legacy/LegacyConverterArtifactConsumer.java +++ b/archiva-modules/archiva-base/archiva-converter/src/main/java/org/apache/maven/archiva/converter/legacy/LegacyConverterArtifactConsumer.java @@ -38,6 +38,8 @@ import org.apache.maven.artifact.factory.ArtifactFactory; import org.apache.maven.artifact.repository.ArtifactRepository; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.context.annotation.Scope; +import org.springframework.stereotype.Service; /** * LegacyConverterArtifactConsumer - convert artifacts as they are found @@ -45,10 +47,12 @@ import org.slf4j.LoggerFactory; * * @version $Id$ * - * @plexus.component role="org.apache.maven.archiva.consumers.KnownRepositoryContentConsumer" + * plexus.component role="org.apache.maven.archiva.consumers.KnownRepositoryContentConsumer" * role-hint="artifact-legacy-to-default-converter" * instantiation-strategy="per-lookup" */ +@Service("knownRepositoryContentConsumer#artifact-legacy-to-default-converter") +@Scope("prototype") public class LegacyConverterArtifactConsumer extends AbstractMonitoredConsumer implements KnownRepositoryContentConsumer diff --git a/archiva-modules/archiva-base/archiva-converter/src/main/resources/META-INF/spring-context.xml b/archiva-modules/archiva-base/archiva-converter/src/main/resources/META-INF/spring-context.xml new file mode 100644 index 000000000..12df06f0f --- /dev/null +++ b/archiva-modules/archiva-base/archiva-converter/src/main/resources/META-INF/spring-context.xml @@ -0,0 +1,33 @@ +<?xml version="1.0"?> + +<!-- + ~ Licensed to the Apache Software Foundation (ASF) under one + ~ or more contributor license agreements. See the NOTICE file + ~ distributed with this work for additional information + ~ regarding copyright ownership. The ASF licenses this file + ~ to you under the Apache License, Version 2.0 (the + ~ "License"); you may not use this file except in compliance + ~ with the License. You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, + ~ software distributed under the License is distributed on an + ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + ~ KIND, either express or implied. See the License for the + ~ specific language governing permissions and limitations + ~ under the License. + --> +<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"> + + <context:annotation-config/> + <context:component-scan base-package="org.apache.maven.archiva.converter.legacy"/> + +</beans>
\ No newline at end of file |