<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>
<!--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>
<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>
<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>
*/
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
{