]> source.dussan.org Git - archiva.git/commitdiff
indexer is not using plexus bridge anymore
authorolivier lamy <olamy@apache.org>
Fri, 23 Jun 2017 22:42:26 +0000 (08:42 +1000)
committerolivier lamy <olamy@apache.org>
Fri, 23 Jun 2017 23:05:49 +0000 (09:05 +1000)
Signed-off-by: olivier lamy <olamy@apache.org>
archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/pom.xml
archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/managed/DefaultManagedRepositoryAdmin.java
archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/resources/META-INF/spring-context.xml
pom.xml

index 06fe2e4dbe298e90556a61553e104e6b8550ec85..4b164e7c6ba4edcdb99f9f99e222379f28881211 100644 (file)
       <groupId>org.apache.archiva</groupId>
       <artifactId>archiva-security-common</artifactId>
     </dependency>
+    <dependency>
+      <groupId>org.apache.maven.indexer</groupId>
+      <artifactId>indexer-core</artifactId>
+      <exclusions>
+        <exclusion>
+          <groupId>org.sonatype.sisu</groupId>
+          <artifactId>sisu-guava</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.sonatype.sisu</groupId>
+          <artifactId>sisu-guice</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven.archetype</groupId>
+      <artifactId>archetype-common</artifactId>
+    </dependency>
     <dependency>
       <groupId>org.apache.archiva</groupId>
       <artifactId>archiva-scheduler-repository-api</artifactId>
     <dependency>
       <groupId>org.springframework</groupId>
       <artifactId>spring-context-support</artifactId>
-      <version>${spring.version}</version>
       <exclusions>
         <exclusion>
           <groupId>commons-logging</groupId>
     <dependency>
       <groupId>org.springframework</groupId>
       <artifactId>spring-context</artifactId>
-      <version>${spring.version}</version>
       <exclusions>
         <exclusion>
           <groupId>commons-logging</groupId>
index f398bca26b8a24c514336b66bc94634606a9a33d..7d235758dff42e2e53b3627f273f72ca1c0a36e2 100644 (file)
@@ -109,23 +109,25 @@ public class DefaultManagedRepositoryAdmin
     private Cache<String, Collection<String>> namespacesCache;
 
     // fields
-    List<? extends IndexCreator> indexCreators;
+    @Inject
+    private List<? extends IndexCreator> indexCreators;
 
-    NexusIndexer indexer;
+    @Inject
+    private NexusIndexer indexer;
 
     @PostConstruct
     public void initialize()
         throws RepositoryAdminException, RoleManagerException
     {
-        try
-        {
-            indexCreators = mavenIndexerUtils.getAllIndexCreators();
-            indexer = plexusSisuBridge.lookup( NexusIndexer.class );
-        }
-        catch ( PlexusSisuBridgeException e )
-        {
-            throw new RepositoryAdminException( e.getMessage(), e );
-        }
+//        try
+//        {
+//            indexCreators = mavenIndexerUtils.getAllIndexCreators();
+//            indexer = plexusSisuBridge.lookup( NexusIndexer.class );
+//        }
+//        catch ( PlexusSisuBridgeException e )
+//        {
+//            throw new RepositoryAdminException( e.getMessage(), e );
+//        }
         // initialize index context on start and check roles here
         for ( ManagedRepository managedRepository : getManagedRepositories() )
         {
index aa4743ccc76a7b48d5a2d0903d659eab8fc5606e..04e14fb3b4ea9236907fa729ea6260bde9a74bad 100644 (file)
@@ -29,7 +29,7 @@
 
   <context:annotation-config />
   <context:component-scan
-    base-package="org.apache.archiva.admin.repository"/>
+    base-package="org.apache.archiva.admin.repository,org.apache.maven.index"/>
 
   <alias name="redbackRuntimeConfigurationAdmin#default" alias="userConfiguration#archiva"/>
 
diff --git a/pom.xml b/pom.xml
index f335da7f408c3f4310a0370baea731210330221e..bbaf7f8395a5b3fd21decd041d20bb236fe5d7e3 100644 (file)
--- a/pom.xml
+++ b/pom.xml
           </exclusion>
         </exclusions>
       </dependency>
+      <dependency>
+        <groupId>org.apache.maven.archetype</groupId>
+        <artifactId>archetype-common</artifactId>
+        <version>3.0.1</version>
+      </dependency>
 
       <dependency>
         <groupId>org.apache.archiva</groupId>