LocalRepository { public static String relativePath(Artifact artifact) { return artifact.groupId.replace('.', '/') + "/" + artifact.artifactId + "/" + artifact.version + "/" + artifact.artifactId + "-" + artifact.version + "." + artifact.packaging; } LocalRepository();  LocalRepository(File repo); static String relativePath(Artifact artifact); File resolve(Artifact artifact);  }
@Test public void testPathToJar() throws Exception { String path = LocalRepository.relativePath(new Artifact("junit", "junit", "4.10")); assertEquals("junit/junit/4.10/junit-4.10.jar", path); }
@Test public void testPathToPom() throws Exception { String path = LocalRepository.relativePath(new Artifact("junit", "junit", "4.10", "pom")); assertEquals("junit/junit/4.10/junit-4.10.pom", path); }