import org.apache.jackrabbit.core.config.RepositoryConfig;
import org.apache.jackrabbit.core.config.RepositoryConfigurationParser;
import org.apache.jackrabbit.jcr2dav.Jcr2davRepositoryFactory;
import org.apache.jackrabbit.core.config.RepositoryConfig;
import org.apache.jackrabbit.core.config.RepositoryConfigurationParser;
import org.apache.jackrabbit.jcr2dav.Jcr2davRepositoryFactory;
import org.argeo.jcr.ArgeoJcrConstants;
import org.argeo.jcr.ArgeoJcrException;
import org.springframework.core.io.ClassPathResource;
import org.argeo.jcr.ArgeoJcrConstants;
import org.argeo.jcr.ArgeoJcrException;
import org.springframework.core.io.ClassPathResource;
params.put(JcrUtils.REPOSITORY_URI, uri);
Repository repository = new Jcr2davRepositoryFactory().getRepository(params);
if (repository == null)
params.put(JcrUtils.REPOSITORY_URI, uri);
Repository repository = new Jcr2davRepositoryFactory().getRepository(params);
if (repository == null)
String dirPath = uri.substring("file:".length());
File homeDir = new File(dirPath);
if (homeDir.exists() && !homeDir.isDirectory())
String dirPath = uri.substring("file:".length());
File homeDir = new File(dirPath);
if (homeDir.exists() && !homeDir.isDirectory())
alias = alias.substring(0, alias.length() - 1);
return alias;
} catch (URISyntaxException e) {
alias = alias.substring(0, alias.length() - 1);
return alias;
} catch (URISyntaxException e) {