diff options
author | olivier lamy <olamy@apache.org> | 2017-07-24 10:12:23 +1000 |
---|---|---|
committer | olivier lamy <olamy@apache.org> | 2017-07-24 10:12:23 +1000 |
commit | 003d5794a823d57b58ec26663fe145f31649ce31 (patch) | |
tree | ae0e1e1b6b5a149764047d321f61cafae36167b9 /archiva-modules/plugins/metadata-store-jcr | |
parent | 7480b7ffe247268dc434a3eb079cb1e34c6bb73b (diff) | |
download | archiva-003d5794a823d57b58ec26663fe145f31649ce31.tar.gz archiva-003d5794a823d57b58ec26663fe145f31649ce31.zip |
more progress on new maven indexer version
Signed-off-by: olivier lamy <olamy@apache.org>
Diffstat (limited to 'archiva-modules/plugins/metadata-store-jcr')
3 files changed, 11 insertions, 8 deletions
diff --git a/archiva-modules/plugins/metadata-store-jcr/pom.xml b/archiva-modules/plugins/metadata-store-jcr/pom.xml index 94eba17a2..fc6976c08 100644 --- a/archiva-modules/plugins/metadata-store-jcr/pom.xml +++ b/archiva-modules/plugins/metadata-store-jcr/pom.xml @@ -28,9 +28,6 @@ <artifactId>metadata-store-jcr</artifactId> <packaging>bundle</packaging> <name>Archiva Core Plugins :: JCR Storage for Metadata</name> - <properties> - <jcr-oak.version>1.7.2</jcr-oak.version> - </properties> <dependencies> <dependency> <groupId>org.apache.archiva</groupId> @@ -65,12 +62,10 @@ <dependency> <groupId>org.apache.jackrabbit</groupId> <artifactId>oak-jcr</artifactId> - <version>${jcr-oak.version}</version> </dependency> <dependency> <groupId>org.apache.jackrabbit</groupId> <artifactId>oak-segment-tar</artifactId> - <version>${jcr-oak.version}</version> </dependency> <dependency> <groupId>org.apache.jackrabbit</groupId> @@ -124,6 +119,7 @@ <artifactId>xercesImpl</artifactId> <scope>test</scope> </dependency> + <dependency> <groupId>org.apache.lucene</groupId> <artifactId>lucene-core</artifactId> @@ -169,6 +165,7 @@ <artifactId>lucene-analyzers-common</artifactId> <version>${lucene.version}</version> </dependency> + </dependencies> <build> <testResources> diff --git a/archiva-modules/plugins/metadata-store-jcr/src/main/java/org/apache/archiva/metadata/repository/jcr/JcrRepositorySessionFactory.java b/archiva-modules/plugins/metadata-store-jcr/src/main/java/org/apache/archiva/metadata/repository/jcr/JcrRepositorySessionFactory.java index 1c51dfc73..ed864639d 100644 --- a/archiva-modules/plugins/metadata-store-jcr/src/main/java/org/apache/archiva/metadata/repository/jcr/JcrRepositorySessionFactory.java +++ b/archiva-modules/plugins/metadata-store-jcr/src/main/java/org/apache/archiva/metadata/repository/jcr/JcrRepositorySessionFactory.java @@ -36,6 +36,8 @@ import javax.annotation.PostConstruct; import javax.inject.Inject; import javax.jcr.Repository; import javax.jcr.RepositoryException; +import java.nio.file.Path; +import java.nio.file.Paths; import java.util.HashMap; import java.util.Map; @@ -54,7 +56,6 @@ public class JcrRepositorySessionFactory private Map<String, MetadataFacetFactory> metadataFacetFactories; - @Inject private Repository repository; // Lazy evaluation to avoid problems with circular dependencies during initialization @@ -123,6 +124,11 @@ public class JcrRepositorySessionFactory JcrMetadataRepository metadataRepository = null; try { + RepositoryFactory factory = new RepositoryFactory(); + // FIXME this need to be configurable + Path directoryPath = Paths.get(System.getProperty( "appserver.base" ), "data/jcr"); + factory.setRepositoryPath( directoryPath ); + repository = factory.createRepository(); metadataRepository = new JcrMetadataRepository( metadataFacetFactories, repository ); JcrMetadataRepository.initialize( metadataRepository.getJcrSession() ); } diff --git a/archiva-modules/plugins/metadata-store-jcr/src/test/filtered-resources/META-INF/spring-context.xml b/archiva-modules/plugins/metadata-store-jcr/src/test/filtered-resources/META-INF/spring-context.xml index e3fa80bf2..c07cc52d5 100644 --- a/archiva-modules/plugins/metadata-store-jcr/src/test/filtered-resources/META-INF/spring-context.xml +++ b/archiva-modules/plugins/metadata-store-jcr/src/test/filtered-resources/META-INF/spring-context.xml @@ -19,8 +19,8 @@ --> <beans xmlns="http://www.springframework.org/schema/beans" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:util="http://www.springframework.org/schema/util" - xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd"> + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"> </beans>
\ No newline at end of file |