@Test(groups={"Integration","Broken"}) public void testRetrievalLocalIntegration() throws Exception { MavenArtifact m = MavenArtifact.fromCoordinate(MAVEN_JAR_PLUGIN_COORDINATE); String localPath = new MavenRetriever().getLocalPath(m); File f = new File(localPath); if (!f.exists()) Assert.fail("Could not load "+localPath+" when testing MavenRetriever: do a maven build with no integration tests first to ensure this is installed, then rerun"); checkValidMavenJarUrl(MavenRetriever.localUrl(m), "org/apache/maven/plugin/jar/JarMojo.class"); }
public static MavenArtifact fromCoordinate(String coordinate) { String[] parts = checkNotNull(coordinate, "coordinate").split(":"); if (parts.length==4) return new MavenArtifact(parts[0], parts[1], parts[2], parts[3]); if (parts.length==5) return new MavenArtifact(parts[0], parts[1], parts[2], parts[3], parts[4]); throw new IllegalArgumentException("Invalid maven coordinate '"+coordinate+"'"); }
MavenArtifact { public static MavenArtifact fromCoordinate(String coordinate) { String[] parts = checkNotNull(coordinate, "coordinate").split(":"); if (parts.length==4) return new MavenArtifact(parts[0], parts[1], parts[2], parts[3]); if (parts.length==5) return new MavenArtifact(parts[0], parts[1], parts[2], parts[3], parts[4]); throw new IllegalArgumentException("Invalid maven coordinate '"+coordinate+"'"); } }
MavenArtifact { public static MavenArtifact fromCoordinate(String coordinate) { String[] parts = checkNotNull(coordinate, "coordinate").split(":"); if (parts.length==4) return new MavenArtifact(parts[0], parts[1], parts[2], parts[3]); if (parts.length==5) return new MavenArtifact(parts[0], parts[1], parts[2], parts[3], parts[4]); throw new IllegalArgumentException("Invalid maven coordinate '"+coordinate+"'"); } MavenArtifact(String groupId, String artifactId, String packaging, String classifier, String version);  MavenArtifact(String groupId, String artifactId, String packaging, String version); }
MavenArtifact { public static MavenArtifact fromCoordinate(String coordinate) { String[] parts = checkNotNull(coordinate, "coordinate").split(":"); if (parts.length==4) return new MavenArtifact(parts[0], parts[1], parts[2], parts[3]); if (parts.length==5) return new MavenArtifact(parts[0], parts[1], parts[2], parts[3], parts[4]); throw new IllegalArgumentException("Invalid maven coordinate '"+coordinate+"'"); } MavenArtifact(String groupId, String artifactId, String packaging, String classifier, String version);  MavenArtifact(String groupId, String artifactId, String packaging, String version); static MavenArtifact fromCoordinate(String coordinate); String getGroupId(); String getArtifactId(); String getVersion(); @Nullable String getClassifier(); String getPackaging(); boolean isSnapshot(); String getCustomFileNameAfterArtifactMarker(); void setCustomFileNameAfterArtifactMarker(String customFileNameMarker); String getClassifierFileNameMarker(); void setClassifierFileNameMarker(String classifierFileNameMarker); String getCoordinate(); String getFilename(); @Nullable String getExtension(); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj); }
MavenArtifact { public static MavenArtifact fromCoordinate(String coordinate) { String[] parts = checkNotNull(coordinate, "coordinate").split(":"); if (parts.length==4) return new MavenArtifact(parts[0], parts[1], parts[2], parts[3]); if (parts.length==5) return new MavenArtifact(parts[0], parts[1], parts[2], parts[3], parts[4]); throw new IllegalArgumentException("Invalid maven coordinate '"+coordinate+"'"); } MavenArtifact(String groupId, String artifactId, String packaging, String classifier, String version);  MavenArtifact(String groupId, String artifactId, String packaging, String version); static MavenArtifact fromCoordinate(String coordinate); String getGroupId(); String getArtifactId(); String getVersion(); @Nullable String getClassifier(); String getPackaging(); boolean isSnapshot(); String getCustomFileNameAfterArtifactMarker(); void setCustomFileNameAfterArtifactMarker(String customFileNameMarker); String getClassifierFileNameMarker(); void setClassifierFileNameMarker(String classifierFileNameMarker); String getCoordinate(); String getFilename(); @Nullable String getExtension(); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj);  }