@Test public void testBuildWithoutClassifier() { final IArtifactUrlBuilder artifactUrlBuilder = new NexusArtifactUrlBuilder(); final String artifactBaseUrl = "http: final LSArtifact artifact = new LSArtifact("group.id", "artifactId", "version", ""); final String type = "html"; final String result = artifactUrlBuilder.buildArtifactUrl(artifactBaseUrl, artifact, type); Assert.assertEquals("url", "http: }
@Override public String buildArtifactUrl(final String artifactBaseUrl, final LSArtifact artifact, final String type) { final StringBuilder url = new StringBuilder(artifactBaseUrl); String groupId = artifact.getGroupId(); String artifactId = artifact.getArtifactId(); url.append(groupId.replace('.', '/')); url.append('/'); url.append(artifactId); url.append('/'); url.append(artifact.getVersion()); url.append('/'); url.append(artifactId); url.append('-'); url.append(artifact.getVersion()); if (!StringUtils.isEmpty(artifact.getClassifier())) { url.append('-'); url.append(artifact.getClassifier()); } url.append('.'); url.append(type); return url.toString(); }
NexusArtifactUrlBuilder implements IArtifactUrlBuilder { @Override public String buildArtifactUrl(final String artifactBaseUrl, final LSArtifact artifact, final String type) { final StringBuilder url = new StringBuilder(artifactBaseUrl); String groupId = artifact.getGroupId(); String artifactId = artifact.getArtifactId(); url.append(groupId.replace('.', '/')); url.append('/'); url.append(artifactId); url.append('/'); url.append(artifact.getVersion()); url.append('/'); url.append(artifactId); url.append('-'); url.append(artifact.getVersion()); if (!StringUtils.isEmpty(artifact.getClassifier())) { url.append('-'); url.append(artifact.getClassifier()); } url.append('.'); url.append(type); return url.toString(); } }
NexusArtifactUrlBuilder implements IArtifactUrlBuilder { @Override public String buildArtifactUrl(final String artifactBaseUrl, final LSArtifact artifact, final String type) { final StringBuilder url = new StringBuilder(artifactBaseUrl); String groupId = artifact.getGroupId(); String artifactId = artifact.getArtifactId(); url.append(groupId.replace('.', '/')); url.append('/'); url.append(artifactId); url.append('/'); url.append(artifact.getVersion()); url.append('/'); url.append(artifactId); url.append('-'); url.append(artifact.getVersion()); if (!StringUtils.isEmpty(artifact.getClassifier())) { url.append('-'); url.append(artifact.getClassifier()); } url.append('.'); url.append(type); return url.toString(); }  }
NexusArtifactUrlBuilder implements IArtifactUrlBuilder { @Override public String buildArtifactUrl(final String artifactBaseUrl, final LSArtifact artifact, final String type) { final StringBuilder url = new StringBuilder(artifactBaseUrl); String groupId = artifact.getGroupId(); String artifactId = artifact.getArtifactId(); url.append(groupId.replace('.', '/')); url.append('/'); url.append(artifactId); url.append('/'); url.append(artifact.getVersion()); url.append('/'); url.append(artifactId); url.append('-'); url.append(artifact.getVersion()); if (!StringUtils.isEmpty(artifact.getClassifier())) { url.append('-'); url.append(artifact.getClassifier()); } url.append('.'); url.append(type); return url.toString(); }  @Override String buildArtifactUrl(final String artifactBaseUrl, final LSArtifact artifact, final String type); }
NexusArtifactUrlBuilder implements IArtifactUrlBuilder { @Override public String buildArtifactUrl(final String artifactBaseUrl, final LSArtifact artifact, final String type) { final StringBuilder url = new StringBuilder(artifactBaseUrl); String groupId = artifact.getGroupId(); String artifactId = artifact.getArtifactId(); url.append(groupId.replace('.', '/')); url.append('/'); url.append(artifactId); url.append('/'); url.append(artifact.getVersion()); url.append('/'); url.append(artifactId); url.append('-'); url.append(artifact.getVersion()); if (!StringUtils.isEmpty(artifact.getClassifier())) { url.append('-'); url.append(artifact.getClassifier()); } url.append('.'); url.append(type); return url.toString(); }  @Override String buildArtifactUrl(final String artifactBaseUrl, final LSArtifact artifact, final String type);  }