[MRM-1954] Adding validatehierarchy property for JCR

This commit is contained in:
Martin Stockhammer 2017-06-14 00:04:07 +02:00
parent 3a18da17df
commit dc259c035b
5 changed files with 16 additions and 0 deletions

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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
{