RepositoryServiceImpl implements RepositoryService { protected static String convertMvnUrlToPath(String mvnUrl) { Map<String, String> coordinates = parseMvnUrl(mvnUrl); return convertMvnCoordinatesToPath(coordinates); }  @Activate void activate(ComponentContext componentContext); @Deactivate void deactivate(ComponentContext componentContext); @Override Repository create(String name); @Override Repository create(String name, String location); @Override Repository create(String name, String location, String proxy); @Override Repository create(String name, String location, String proxy, boolean mirror); @Override Repository create(String name, String location, String url, String proxy, boolean mirror, String realm, String downloadRole, String uploadRole, String scheduling, String schedulingAction, int poolSize); @Override void changeLocation(String name, String location); @Override void changeUrl(String name, String url); @Override void changeProxy(String name, String proxy, boolean mirror); @Override void changeSecurity(String name, String realm, String downloadRole, String uploadRole); @Override void changeScheduling(String name, String scheduling, String schedulingAction); @Override void copy(String sourceRepositoryName, String destinationRepositoryName); @Override void remove(String name); @Override void remove(String name, boolean storageCleanup); @Override void purge(String name); @Override synchronized Collection<Repository> repositories(); @Override synchronized Repository repository(String name); @Override void addArtifact(String artifactUrl, String name); @Override void addArtifact(String artifactUrl, String groupId, String artifactId, String version, String type, String classifier, String name); @Override void deleteArtifact(String artifactUrl, String name); @Override void deleteArtifact(String groupId, String artifactId, String version, String type, String classifier, String name); @Override void updateBundleRepositoryDescriptor(String name);  }
@Test public void testMvnUrl() throws Exception { Assert.assertEquals("group/foo/bar/1.0/bar-1.0.jar", convertMvnUrlToPath("mvn:group.foo/bar/1.0")); Assert.assertEquals("another/long/group/my.artifact/2.0/my.artifact-2.0.zip", convertMvnUrlToPath("mvn:another.long.group/my.artifact/2.0/zip")); Assert.assertEquals("my/group/my.artifact/3.0/my.artifact-3.0-myclassifier.xml", convertMvnUrlToPath("mvn:my.group/my.artifact/3.0/xml/myclassifier")); }