From: Martin Stockhammer Date: Tue, 13 Jun 2017 22:04:07 +0000 (+0200) Subject: [MRM-1954] Adding validatehierarchy property for JCR X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=dc259c035bf3c7408367c1cc7fc27aadfca8fefb;p=archiva.git [MRM-1954] Adding validatehierarchy property for JCR --- diff --git a/archiva-jetty/pom.xml b/archiva-jetty/pom.xml index f5cbd3e8c..33b00489c 100644 --- a/archiva-jetty/pom.xml +++ b/archiva-jetty/pom.xml @@ -180,6 +180,7 @@ AsyncLoggerConfig.WaitStrategy=Block archiva.repositorySessionFactory.id=jcr archiva.cassandra.configuration.file=%ARCHIVA_BASE%/conf/archiva-cassandra.properties + org.apache.jackrabbit.core.state.validatehierarchy=true -XX:MaxPermSize=128m diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/pom.xml b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/pom.xml index 2c471a551..882cd6f25 100644 --- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/pom.xml +++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/pom.xml @@ -471,6 +471,7 @@ jcr ${openjpa.Log} + true diff --git a/archiva-modules/archiva-web/archiva-webapp-test/pom.xml b/archiva-modules/archiva-web/archiva-webapp-test/pom.xml index b68c2ad33..30fd890b0 100644 --- a/archiva-modules/archiva-web/archiva-webapp-test/pom.xml +++ b/archiva-modules/archiva-web/archiva-webapp-test/pom.xml @@ -600,6 +600,10 @@ openjpa.Log ${openjpa.Log} + + org.apache.jackrabbit.core.state.validatehierarchy + true + diff --git a/archiva-modules/archiva-web/archiva-webdav/pom.xml b/archiva-modules/archiva-web/archiva-webdav/pom.xml index 5d5966448..2b08b3f29 100644 --- a/archiva-modules/archiva-web/archiva-webdav/pom.xml +++ b/archiva-modules/archiva-web/archiva-webdav/pom.xml @@ -331,6 +331,7 @@ ${redbackTestJdbcDriver} mock ${openjpa.Log} + true ${webdav.forkMode} diff --git a/archiva-modules/plugins/metadata-store-jcr/src/main/java/org/apache/archiva/metadata/repository/jcr/ArchivaJcrRepositoryConfig.java b/archiva-modules/plugins/metadata-store-jcr/src/main/java/org/apache/archiva/metadata/repository/jcr/ArchivaJcrRepositoryConfig.java index 11d7cae5d..8271e2bec 100644 --- a/archiva-modules/plugins/metadata-store-jcr/src/main/java/org/apache/archiva/metadata/repository/jcr/ArchivaJcrRepositoryConfig.java +++ b/archiva-modules/plugins/metadata-store-jcr/src/main/java/org/apache/archiva/metadata/repository/jcr/ArchivaJcrRepositoryConfig.java @@ -30,6 +30,15 @@ import java.io.File; */ public class ArchivaJcrRepositoryConfig { + // Recommended to avoid inconsistencies caused by race conditions. + static + { + if ( !System.getProperties( ).containsKey( "org.apache.jackrabbit.core.state.validatehierarchy" ) ) + { + System.setProperty( "org.apache.jackrabbit.core.state.validatehierarchy", "true" ); + } + } + public static RepositoryConfig create( String file, String home ) throws ConfigurationException {