2
0
Fork 0
mirror of https://github.com/ethauvin/rife2.git synced 2025-04-30 18:48:13 -07:00

Don't make the repository aliases resolve ignoring case

This commit is contained in:
Geert Bevin 2023-04-04 16:54:54 -04:00
parent 422cf1eaf6
commit f47069bd03

View file

@ -77,21 +77,15 @@ public record Repository(String location, String username, String password) {
return new Repository(location, username, password); return new Repository(location, username, password);
} }
if (locationOrName.equalsIgnoreCase("MAVEN_LOCAL")) { return switch (locationOrName) {
return Repository.MAVEN_LOCAL; case "MAVEN_LOCAL" -> Repository.MAVEN_LOCAL;
} else if (locationOrName.equalsIgnoreCase("MAVEN_CENTRAL")) { case "MAVEN_CENTRAL" -> Repository.MAVEN_CENTRAL;
return Repository.MAVEN_CENTRAL; case "SONATYPE_RELEASES" -> Repository.SONATYPE_RELEASES;
} else if (locationOrName.equalsIgnoreCase("SONATYPE_RELEASES")) { case "SONATYPE_SNAPSHOTS" -> Repository.SONATYPE_SNAPSHOTS;
return Repository.SONATYPE_RELEASES; case "APACHE" -> Repository.APACHE;
} else if (locationOrName.equalsIgnoreCase("SONATYPE_SNAPSHOTS")) { case "RIFE2" -> Repository.RIFE2;
return Repository.SONATYPE_SNAPSHOTS; default -> new Repository(locationOrName);
} else if (locationOrName.equalsIgnoreCase("APACHE")) { };
return Repository.APACHE;
} else if (locationOrName.equalsIgnoreCase("RIFE2")) {
return Repository.RIFE2;
}
return new Repository(locationOrName);
} }
/** /**