diff options
author | Martin Stockhammer <martin_s@apache.org> | 2017-06-14 00:04:07 +0200 |
---|---|---|
committer | Martin Stockhammer <martin_s@apache.org> | 2017-06-14 00:04:07 +0200 |
commit | dc259c035bf3c7408367c1cc7fc27aadfca8fefb (patch) | |
tree | 894c1b863a8d0e7e64c304608994a4c3b007591f | |
parent | 3a18da17dffe58f6a05e4466171aadeacb239165 (diff) | |
download | archiva-dc259c035bf3c7408367c1cc7fc27aadfca8fefb.tar.gz archiva-dc259c035bf3c7408367c1cc7fc27aadfca8fefb.zip |
[MRM-1954] Adding validatehierarchy property for JCR
5 files changed, 16 insertions, 0 deletions
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 @@ <systemProperty>AsyncLoggerConfig.WaitStrategy=Block</systemProperty> <systemProperty>archiva.repositorySessionFactory.id=jcr</systemProperty> <systemProperty>archiva.cassandra.configuration.file=%ARCHIVA_BASE%/conf/archiva-cassandra.properties</systemProperty> + <systemProperty>org.apache.jackrabbit.core.state.validatehierarchy=true</systemProperty> </systemProperties> <extraArguments> <extraArgument>-XX:MaxPermSize=128m</extraArgument> 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 @@ <!--org.apache.jackrabbit.minMemoryPerCache>1</org.apache.jackrabbit.minMemoryPerCache--> <archiva.repositorySessionFactory.id>jcr</archiva.repositorySessionFactory.id> <openjpa.Log>${openjpa.Log}</openjpa.Log> + <org.apache.jackrabbit.core.state.validatehierarchy>true</org.apache.jackrabbit.core.state.validatehierarchy> </systemPropertyVariables> </configuration> </plugin> 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 @@ <name>openjpa.Log</name> <value>${openjpa.Log}</value> </systemProperty> + <systemProperty> + <name>org.apache.jackrabbit.core.state.validatehierarchy</name> + <value>true</value> + </systemProperty> </systemProperties> </configuration> </execution> 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 @@ <redback.jdbc.driver.name>${redbackTestJdbcDriver}</redback.jdbc.driver.name> <archiva.repositorySessionFactory.id>mock</archiva.repositorySessionFactory.id> <openjpa.Log>${openjpa.Log}</openjpa.Log> + <org.apache.jackrabbit.core.state.validatehierarchy>true</org.apache.jackrabbit.core.state.validatehierarchy> </systemPropertyVariables> <forkMode>${webdav.forkMode}</forkMode> </configuration> 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 { |