use of com.revolsys.spring.resource.DefaultResourceLoader in project com.revolsys.open by revolsys.
the class MavenRepository method setRoot.
public void setRoot(final Resource root) {
if (root == null) {
this.root = new PathResource(System.getProperty("user.home") + "/.m2/repository/");
} else {
try {
String url = root.getURL().toExternalForm();
url = url.replaceAll("([^(:/{2,3)])//+", "$1/");
if (!url.endsWith("/")) {
url += '/';
}
this.root = new DefaultResourceLoader().getResource(url);
} catch (final Throwable e) {
this.root = root;
}
}
}
Aggregations