@Test public void uris() throws MalformedURLException { String uri1, uri2; MavenRepositoryURL mavenURI; uri1 = "http: uri2 = "http: mavenURI = new MavenRepositoryURL(uri1); assertThat(mavenURI.asRepositorySpec(), equalTo(uri2)); uri1 = "http: uri2 = "http: mavenURI = new MavenRepositoryURL(uri1); assertThat(mavenURI.asRepositorySpec(), equalTo(uri2)); uri1 = "http: uri2 = "http: mavenURI = new MavenRepositoryURL(uri1); assertThat(mavenURI.asRepositorySpec(), equalTo(uri2)); uri1 = "http: uri2 = "http: mavenURI = new MavenRepositoryURL(uri1); assertThat(mavenURI.asRepositorySpec(), equalTo(uri2)); uri1 = "http: uri2 = "http: mavenURI = new MavenRepositoryURL(uri1); assertThat(mavenURI.asRepositorySpec(), equalTo(uri2)); uri1 = "http: uri2 = "http: mavenURI = new MavenRepositoryURL(uri1); assertThat(mavenURI.asRepositorySpec(), equalTo(uri2)); }
public String asRepositorySpec() { StringBuilder sb = new StringBuilder(); sb.append(m_repositoryURL.toString()); if (m_id != null) { sb.append(ServiceConstants.SEPARATOR_OPTIONS).append(ServiceConstants.OPTION_ID).append("=").append(m_id); } if (!m_releasesEnabled) { sb.append(ServiceConstants.SEPARATOR_OPTIONS).append(ServiceConstants.OPTION_DISALLOW_RELEASES); } if (m_snapshotsEnabled) { sb.append(ServiceConstants.SEPARATOR_OPTIONS).append(ServiceConstants.OPTION_ALLOW_SNAPSHOTS); } if (m_releasesEnabled) { if (!m_snapshotsEnabled) { if (m_releasesUpdatePolicy != null) { sb.append(ServiceConstants.SEPARATOR_OPTIONS).append(ServiceConstants.OPTION_RELEASES_UPDATE).append("=").append(m_releasesUpdatePolicy); } if (m_releasesChecksumPolicy != null) { sb.append(ServiceConstants.SEPARATOR_OPTIONS).append(ServiceConstants.OPTION_RELEASES_CHECKSUM).append("=").append(m_releasesChecksumPolicy); } } } if (m_snapshotsEnabled) { if (!m_releasesEnabled) { if (m_snapshotsUpdatePolicy != null) { sb.append(ServiceConstants.SEPARATOR_OPTIONS).append(ServiceConstants.OPTION_SNAPSHOTS_UPDATE).append("=").append(m_snapshotsUpdatePolicy); } if (m_snapshotsChecksumPolicy != null) { sb.append(ServiceConstants.SEPARATOR_OPTIONS).append(ServiceConstants.OPTION_SNAPSHOTS_CHECKSUM).append("=").append(m_snapshotsChecksumPolicy); } } } if (m_snapshotsEnabled && m_releasesEnabled) { if (m_releasesUpdatePolicy != null && Objects.equals(m_releasesUpdatePolicy, m_snapshotsUpdatePolicy)) { sb.append(ServiceConstants.SEPARATOR_OPTIONS).append(ServiceConstants.OPTION_UPDATE).append("=").append(m_releasesUpdatePolicy); } if (m_releasesChecksumPolicy != null && Objects.equals(m_releasesChecksumPolicy, m_snapshotsChecksumPolicy)) { sb.append(ServiceConstants.SEPARATOR_OPTIONS).append(ServiceConstants.OPTION_CHECKSUM).append("=").append(m_releasesChecksumPolicy); } } return sb.toString(); }
MavenRepositoryURL { public String asRepositorySpec() { StringBuilder sb = new StringBuilder(); sb.append(m_repositoryURL.toString()); if (m_id != null) { sb.append(ServiceConstants.SEPARATOR_OPTIONS).append(ServiceConstants.OPTION_ID).append("=").append(m_id); } if (!m_releasesEnabled) { sb.append(ServiceConstants.SEPARATOR_OPTIONS).append(ServiceConstants.OPTION_DISALLOW_RELEASES); } if (m_snapshotsEnabled) { sb.append(ServiceConstants.SEPARATOR_OPTIONS).append(ServiceConstants.OPTION_ALLOW_SNAPSHOTS); } if (m_releasesEnabled) { if (!m_snapshotsEnabled) { if (m_releasesUpdatePolicy != null) { sb.append(ServiceConstants.SEPARATOR_OPTIONS).append(ServiceConstants.OPTION_RELEASES_UPDATE).append("=").append(m_releasesUpdatePolicy); } if (m_releasesChecksumPolicy != null) { sb.append(ServiceConstants.SEPARATOR_OPTIONS).append(ServiceConstants.OPTION_RELEASES_CHECKSUM).append("=").append(m_releasesChecksumPolicy); } } } if (m_snapshotsEnabled) { if (!m_releasesEnabled) { if (m_snapshotsUpdatePolicy != null) { sb.append(ServiceConstants.SEPARATOR_OPTIONS).append(ServiceConstants.OPTION_SNAPSHOTS_UPDATE).append("=").append(m_snapshotsUpdatePolicy); } if (m_snapshotsChecksumPolicy != null) { sb.append(ServiceConstants.SEPARATOR_OPTIONS).append(ServiceConstants.OPTION_SNAPSHOTS_CHECKSUM).append("=").append(m_snapshotsChecksumPolicy); } } } if (m_snapshotsEnabled && m_releasesEnabled) { if (m_releasesUpdatePolicy != null && Objects.equals(m_releasesUpdatePolicy, m_snapshotsUpdatePolicy)) { sb.append(ServiceConstants.SEPARATOR_OPTIONS).append(ServiceConstants.OPTION_UPDATE).append("=").append(m_releasesUpdatePolicy); } if (m_releasesChecksumPolicy != null && Objects.equals(m_releasesChecksumPolicy, m_snapshotsChecksumPolicy)) { sb.append(ServiceConstants.SEPARATOR_OPTIONS).append(ServiceConstants.OPTION_CHECKSUM).append("=").append(m_releasesChecksumPolicy); } } return sb.toString(); } }
MavenRepositoryURL { public String asRepositorySpec() { StringBuilder sb = new StringBuilder(); sb.append(m_repositoryURL.toString()); if (m_id != null) { sb.append(ServiceConstants.SEPARATOR_OPTIONS).append(ServiceConstants.OPTION_ID).append("=").append(m_id); } if (!m_releasesEnabled) { sb.append(ServiceConstants.SEPARATOR_OPTIONS).append(ServiceConstants.OPTION_DISALLOW_RELEASES); } if (m_snapshotsEnabled) { sb.append(ServiceConstants.SEPARATOR_OPTIONS).append(ServiceConstants.OPTION_ALLOW_SNAPSHOTS); } if (m_releasesEnabled) { if (!m_snapshotsEnabled) { if (m_releasesUpdatePolicy != null) { sb.append(ServiceConstants.SEPARATOR_OPTIONS).append(ServiceConstants.OPTION_RELEASES_UPDATE).append("=").append(m_releasesUpdatePolicy); } if (m_releasesChecksumPolicy != null) { sb.append(ServiceConstants.SEPARATOR_OPTIONS).append(ServiceConstants.OPTION_RELEASES_CHECKSUM).append("=").append(m_releasesChecksumPolicy); } } } if (m_snapshotsEnabled) { if (!m_releasesEnabled) { if (m_snapshotsUpdatePolicy != null) { sb.append(ServiceConstants.SEPARATOR_OPTIONS).append(ServiceConstants.OPTION_SNAPSHOTS_UPDATE).append("=").append(m_snapshotsUpdatePolicy); } if (m_snapshotsChecksumPolicy != null) { sb.append(ServiceConstants.SEPARATOR_OPTIONS).append(ServiceConstants.OPTION_SNAPSHOTS_CHECKSUM).append("=").append(m_snapshotsChecksumPolicy); } } } if (m_snapshotsEnabled && m_releasesEnabled) { if (m_releasesUpdatePolicy != null && Objects.equals(m_releasesUpdatePolicy, m_snapshotsUpdatePolicy)) { sb.append(ServiceConstants.SEPARATOR_OPTIONS).append(ServiceConstants.OPTION_UPDATE).append("=").append(m_releasesUpdatePolicy); } if (m_releasesChecksumPolicy != null && Objects.equals(m_releasesChecksumPolicy, m_snapshotsChecksumPolicy)) { sb.append(ServiceConstants.SEPARATOR_OPTIONS).append(ServiceConstants.OPTION_CHECKSUM).append("=").append(m_releasesChecksumPolicy); } } return sb.toString(); } MavenRepositoryURL( final String repositorySpec ); }
MavenRepositoryURL { public String asRepositorySpec() { StringBuilder sb = new StringBuilder(); sb.append(m_repositoryURL.toString()); if (m_id != null) { sb.append(ServiceConstants.SEPARATOR_OPTIONS).append(ServiceConstants.OPTION_ID).append("=").append(m_id); } if (!m_releasesEnabled) { sb.append(ServiceConstants.SEPARATOR_OPTIONS).append(ServiceConstants.OPTION_DISALLOW_RELEASES); } if (m_snapshotsEnabled) { sb.append(ServiceConstants.SEPARATOR_OPTIONS).append(ServiceConstants.OPTION_ALLOW_SNAPSHOTS); } if (m_releasesEnabled) { if (!m_snapshotsEnabled) { if (m_releasesUpdatePolicy != null) { sb.append(ServiceConstants.SEPARATOR_OPTIONS).append(ServiceConstants.OPTION_RELEASES_UPDATE).append("=").append(m_releasesUpdatePolicy); } if (m_releasesChecksumPolicy != null) { sb.append(ServiceConstants.SEPARATOR_OPTIONS).append(ServiceConstants.OPTION_RELEASES_CHECKSUM).append("=").append(m_releasesChecksumPolicy); } } } if (m_snapshotsEnabled) { if (!m_releasesEnabled) { if (m_snapshotsUpdatePolicy != null) { sb.append(ServiceConstants.SEPARATOR_OPTIONS).append(ServiceConstants.OPTION_SNAPSHOTS_UPDATE).append("=").append(m_snapshotsUpdatePolicy); } if (m_snapshotsChecksumPolicy != null) { sb.append(ServiceConstants.SEPARATOR_OPTIONS).append(ServiceConstants.OPTION_SNAPSHOTS_CHECKSUM).append("=").append(m_snapshotsChecksumPolicy); } } } if (m_snapshotsEnabled && m_releasesEnabled) { if (m_releasesUpdatePolicy != null && Objects.equals(m_releasesUpdatePolicy, m_snapshotsUpdatePolicy)) { sb.append(ServiceConstants.SEPARATOR_OPTIONS).append(ServiceConstants.OPTION_UPDATE).append("=").append(m_releasesUpdatePolicy); } if (m_releasesChecksumPolicy != null && Objects.equals(m_releasesChecksumPolicy, m_snapshotsChecksumPolicy)) { sb.append(ServiceConstants.SEPARATOR_OPTIONS).append(ServiceConstants.OPTION_CHECKSUM).append("=").append(m_releasesChecksumPolicy); } } return sb.toString(); } MavenRepositoryURL( final String repositorySpec ); String getId(); URL getURL(); void setURL(URL url); File getFile(); boolean isReleasesEnabled(); void setReleasesEnabled(boolean enabled); boolean isSnapshotsEnabled(); void setSnapshotsEnabled(boolean enabled); String getReleasesUpdatePolicy(); String getSnapshotsUpdatePolicy(); String getReleasesChecksumPolicy(); String getSnapshotsChecksumPolicy(); void setReleasesUpdatePolicy(String policy); void setSnapshotsUpdatePolicy(String policy); void setReleasesChecksumPolicy(String policy); void setSnapshotsChecksumPolicy(String policy); FROM getFrom(); boolean isMulti(); boolean isFileRepository(); @Override String toString(); String asRepositorySpec(); }
MavenRepositoryURL { public String asRepositorySpec() { StringBuilder sb = new StringBuilder(); sb.append(m_repositoryURL.toString()); if (m_id != null) { sb.append(ServiceConstants.SEPARATOR_OPTIONS).append(ServiceConstants.OPTION_ID).append("=").append(m_id); } if (!m_releasesEnabled) { sb.append(ServiceConstants.SEPARATOR_OPTIONS).append(ServiceConstants.OPTION_DISALLOW_RELEASES); } if (m_snapshotsEnabled) { sb.append(ServiceConstants.SEPARATOR_OPTIONS).append(ServiceConstants.OPTION_ALLOW_SNAPSHOTS); } if (m_releasesEnabled) { if (!m_snapshotsEnabled) { if (m_releasesUpdatePolicy != null) { sb.append(ServiceConstants.SEPARATOR_OPTIONS).append(ServiceConstants.OPTION_RELEASES_UPDATE).append("=").append(m_releasesUpdatePolicy); } if (m_releasesChecksumPolicy != null) { sb.append(ServiceConstants.SEPARATOR_OPTIONS).append(ServiceConstants.OPTION_RELEASES_CHECKSUM).append("=").append(m_releasesChecksumPolicy); } } } if (m_snapshotsEnabled) { if (!m_releasesEnabled) { if (m_snapshotsUpdatePolicy != null) { sb.append(ServiceConstants.SEPARATOR_OPTIONS).append(ServiceConstants.OPTION_SNAPSHOTS_UPDATE).append("=").append(m_snapshotsUpdatePolicy); } if (m_snapshotsChecksumPolicy != null) { sb.append(ServiceConstants.SEPARATOR_OPTIONS).append(ServiceConstants.OPTION_SNAPSHOTS_CHECKSUM).append("=").append(m_snapshotsChecksumPolicy); } } } if (m_snapshotsEnabled && m_releasesEnabled) { if (m_releasesUpdatePolicy != null && Objects.equals(m_releasesUpdatePolicy, m_snapshotsUpdatePolicy)) { sb.append(ServiceConstants.SEPARATOR_OPTIONS).append(ServiceConstants.OPTION_UPDATE).append("=").append(m_releasesUpdatePolicy); } if (m_releasesChecksumPolicy != null && Objects.equals(m_releasesChecksumPolicy, m_snapshotsChecksumPolicy)) { sb.append(ServiceConstants.SEPARATOR_OPTIONS).append(ServiceConstants.OPTION_CHECKSUM).append("=").append(m_releasesChecksumPolicy); } } return sb.toString(); } MavenRepositoryURL( final String repositorySpec ); String getId(); URL getURL(); void setURL(URL url); File getFile(); boolean isReleasesEnabled(); void setReleasesEnabled(boolean enabled); boolean isSnapshotsEnabled(); void setSnapshotsEnabled(boolean enabled); String getReleasesUpdatePolicy(); String getSnapshotsUpdatePolicy(); String getReleasesChecksumPolicy(); String getSnapshotsChecksumPolicy(); void setReleasesUpdatePolicy(String policy); void setSnapshotsUpdatePolicy(String policy); void setReleasesChecksumPolicy(String policy); void setSnapshotsChecksumPolicy(String policy); FROM getFrom(); boolean isMulti(); boolean isFileRepository(); @Override String toString(); String asRepositorySpec();  }