From: olivier lamy Date: Fri, 23 Jun 2017 22:42:26 +0000 (+1000) Subject: indexer is not using plexus bridge anymore X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=f0ba11a2f8f3505dc5550d213c63270b25e29d94;p=archiva.git indexer is not using plexus bridge anymore Signed-off-by: olivier lamy --- diff --git a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/pom.xml b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/pom.xml index 06fe2e4db..4b164e7c6 100644 --- a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/pom.xml +++ b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/pom.xml @@ -37,6 +37,24 @@ org.apache.archiva archiva-security-common + + org.apache.maven.indexer + indexer-core + + + org.sonatype.sisu + sisu-guava + + + org.sonatype.sisu + sisu-guice + + + + + org.apache.maven.archetype + archetype-common + org.apache.archiva archiva-scheduler-repository-api @@ -109,7 +127,6 @@ org.springframework spring-context-support - ${spring.version} commons-logging @@ -120,7 +137,6 @@ org.springframework spring-context - ${spring.version} commons-logging diff --git a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/managed/DefaultManagedRepositoryAdmin.java b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/managed/DefaultManagedRepositoryAdmin.java index f398bca26..7d235758d 100644 --- a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/managed/DefaultManagedRepositoryAdmin.java +++ b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/managed/DefaultManagedRepositoryAdmin.java @@ -109,23 +109,25 @@ public class DefaultManagedRepositoryAdmin private Cache> namespacesCache; // fields - List indexCreators; + @Inject + private List 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() ) { diff --git a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/resources/META-INF/spring-context.xml b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/resources/META-INF/spring-context.xml index aa4743ccc..04e14fb3b 100644 --- a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/resources/META-INF/spring-context.xml +++ b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/resources/META-INF/spring-context.xml @@ -29,7 +29,7 @@ + base-package="org.apache.archiva.admin.repository,org.apache.maven.index"/> diff --git a/pom.xml b/pom.xml index f335da7f4..bbaf7f839 100644 --- a/pom.xml +++ b/pom.xml @@ -320,6 +320,11 @@ + + org.apache.maven.archetype + archetype-common + 3.0.1 + org.apache.archiva