}
} else {
try {
- homePath = Paths.get(new URI(homeUri)).toAbsolutePath();
+ URI uri = new URI(homeUri);
+ String host = uri.getHost();
+ if (host == null || host.trim().equals("")) {
+ homePath = Paths.get(uri).toAbsolutePath();
+ } else {
+ // TODO remote at this stage?
+ throw new IllegalArgumentException("Cannot manage repository path for host " + host);
+ }
} catch (URISyntaxException e) {
throw new CmsException("Invalid repository home URI", e);
}
RepositoryContext repositoryContext = RepositoryContext.create(repositoryConfig);
double duration = ((double) (System.currentTimeMillis() - begin)) / 1000;
- if (log.isTraceEnabled())
- log.trace(
+ if (log.isDebugEnabled())
+ log.debug(
"Created Jackrabbit repository in " + duration + " s, home: " + repositoryConfig.getHomeDir());
return repositoryContext;