From f0ba11a2f8f3505dc5550d213c63270b25e29d94 Mon Sep 17 00:00:00 2001 From: olivier lamy Date: Sat, 24 Jun 2017 08:42:26 +1000 Subject: [PATCH] indexer is not using plexus bridge anymore Signed-off-by: olivier lamy --- .../archiva-repository-admin-default/pom.xml | 20 ++++++++++++++-- .../DefaultManagedRepositoryAdmin.java | 24 ++++++++++--------- .../resources/META-INF/spring-context.xml | 2 +- pom.xml | 5 ++++ 4 files changed, 37 insertions(+), 14 deletions(-) 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 -- 2.39.5