aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-modules
diff options
context:
space:
mode:
authorMartin Stockhammer <martin_s@apache.org>2017-06-14 00:04:07 +0200
committerMartin Stockhammer <martin_s@apache.org>2017-06-14 00:04:07 +0200
commitdc259c035bf3c7408367c1cc7fc27aadfca8fefb (patch)
tree894c1b863a8d0e7e64c304608994a4c3b007591f /archiva-modules
parent3a18da17dffe58f6a05e4466171aadeacb239165 (diff)
downloadarchiva-dc259c035bf3c7408367c1cc7fc27aadfca8fefb.tar.gz
archiva-dc259c035bf3c7408367c1cc7fc27aadfca8fefb.zip
[MRM-1954] Adding validatehierarchy property for JCR
Diffstat (limited to 'archiva-modules')
-rw-r--r--archiva-modules/archiva-web/archiva-rest/archiva-rest-services/pom.xml1
-rw-r--r--archiva-modules/archiva-web/archiva-webapp-test/pom.xml4
-rw-r--r--archiva-modules/archiva-web/archiva-webdav/pom.xml1
-rw-r--r--archiva-modules/plugins/metadata-store-jcr/src/main/java/org/apache/archiva/metadata/repository/jcr/ArchivaJcrRepositoryConfig.java9
4 files changed, 15 insertions, 0 deletions
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
{