mirror of
https://github.com/rife2/bld
synced 2025-12-20 16:48:38 +01:00
Added new sonatype central publishing repositories that replace the OOSRH repositories, called CENTRAL_RELEASED and CENTRAL_SNAPSHOTS.
Some checks are pending
bld-ci / build-linux (17) (push) Waiting to run
bld-ci / build-linux (20) (push) Waiting to run
bld-ci / build-linux (21) (push) Waiting to run
bld-ci / build-linux (22) (push) Waiting to run
bld-ci / build-macos (17) (push) Waiting to run
bld-ci / build-macos (20) (push) Waiting to run
bld-ci / build-macos (21) (push) Waiting to run
bld-ci / build-macos (22) (push) Waiting to run
bld-ci / build-windows (17) (push) Waiting to run
bld-ci / build-windows (20) (push) Waiting to run
bld-ci / build-windows (21) (push) Waiting to run
bld-ci / build-windows (22) (push) Waiting to run
javadocs-pages / deploy (push) Waiting to run
Some checks are pending
bld-ci / build-linux (17) (push) Waiting to run
bld-ci / build-linux (20) (push) Waiting to run
bld-ci / build-linux (21) (push) Waiting to run
bld-ci / build-linux (22) (push) Waiting to run
bld-ci / build-macos (17) (push) Waiting to run
bld-ci / build-macos (20) (push) Waiting to run
bld-ci / build-macos (21) (push) Waiting to run
bld-ci / build-macos (22) (push) Waiting to run
bld-ci / build-windows (17) (push) Waiting to run
bld-ci / build-windows (20) (push) Waiting to run
bld-ci / build-windows (21) (push) Waiting to run
bld-ci / build-windows (22) (push) Waiting to run
javadocs-pages / deploy (push) Waiting to run
Updated bld to use the new snapshot repository instead. Worked around new sonatype publishing repositories not allowing signed Maven metadata files.
This commit is contained in:
parent
5af8ca7b2e
commit
91a621dfea
|
|
@ -2,12 +2,12 @@
|
|||
<library name="bld">
|
||||
<CLASSES>
|
||||
<root url="file://$PROJECT_DIR$/lib/bld" />
|
||||
<root url="jar://$USER_HOME$/.bld/dist/bld-2.2.1.jar!/" />
|
||||
<root url="jar://$USER_HOME$/.bld/dist/bld-2.2.2-SNAPSHOT.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="file://$PROJECT_DIR$/lib/bld" />
|
||||
<root url="jar://$USER_HOME$/.bld/dist/bld-2.2.1-sources.jar!/" />
|
||||
<root url="jar://$USER_HOME$/.bld/dist/bld-2.2.2-SNAPSHOT-sources.jar!/" />
|
||||
</SOURCES>
|
||||
<excluded>
|
||||
<root url="jar://$PROJECT_DIR$/lib/bld/bld-wrapper.jar!/" />
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
[](https://rife2.com/bld)
|
||||
[](https://github.com/rife2/bld/releases/latest)
|
||||
[](https://maven-badges.herokuapp.com/maven-central/com.uwyn.rife2/bld)
|
||||
[](https://s01.oss.sonatype.org/content/repositories/snapshots/com/uwyn/rife2/bld/)
|
||||
[](https://central.sonatype.com/repository/maven-snapshots/com/uwyn/rife2/bld/)
|
||||
[](https://github.com/rife2/bld/actions/workflows/bld.yml)
|
||||
[](https://github.com/rife2/rife2/actions/workflows/bld.yml)
|
||||
|
||||
|
|
|
|||
2
core
2
core
|
|
@ -1 +1 @@
|
|||
Subproject commit f8bde83ca806403dd8f37294239ac77dba8ad010
|
||||
Subproject commit ac900b7496ced0a2a38b3ceeba6ad57155e4c508
|
||||
Binary file not shown.
|
|
@ -8,4 +8,4 @@ bld.javaOptions=
|
|||
bld.javacOptions=
|
||||
bld.repositories=MAVEN_CENTRAL,RIFE2_RELEASES
|
||||
bld.sourceDirectories=core/src/bld/java
|
||||
bld.version=2.2.1
|
||||
bld.version=2.2.2-SNAPSHOT
|
||||
|
|
@ -86,7 +86,7 @@ public class BldBuild extends AbstractRife2Build {
|
|||
|
||||
publishOperation()
|
||||
.repository(version.isSnapshot() ? repository("rife2-snapshots") : repository("rife2-releases"))
|
||||
.repository(version.isSnapshot() ? repository("sonatype-snapshots") : repository("sonatype-releases"))
|
||||
.repository(version.isSnapshot() ? repository("central-snapshots") : repository("central-releases"))
|
||||
.repository(repository("github"))
|
||||
.info(new PublishInfo()
|
||||
.groupId("com.uwyn.rife2")
|
||||
|
|
|
|||
|
|
@ -32,6 +32,8 @@ public record Repository(String location, String username, String password) {
|
|||
public static final Repository SONATYPE_RELEASES_LEGACY = new Repository("https://oss.sonatype.org/service/local/staging/deploy/maven2/");
|
||||
public static final Repository SONATYPE_SNAPSHOTS = new Repository("https://s01.oss.sonatype.org/content/repositories/snapshots/");
|
||||
public static final Repository SONATYPE_SNAPSHOTS_LEGACY = new Repository("https://oss.sonatype.org/content/repositories/snapshots/");
|
||||
public static final Repository CENTRAL_RELEASES = new Repository("https://ossrh-staging-api.central.sonatype.com/service/local/staging/deploy/maven2/");
|
||||
public static final Repository CENTRAL_SNAPSHOTS = new Repository("https://central.sonatype.com/repository/maven-snapshots/");
|
||||
public static final Repository RIFE2_RELEASES = new Repository("https://repo.rife2.com/releases/");
|
||||
public static final Repository RIFE2_SNAPSHOTS = new Repository("https://repo.rife2.com/snapshots/");
|
||||
|
||||
|
|
@ -98,6 +100,8 @@ public record Repository(String location, String username, String password) {
|
|||
case "SONATYPE_RELEASES_LEGACY" -> Repository.SONATYPE_RELEASES_LEGACY;
|
||||
case "SONATYPE_SNAPSHOTS" -> Repository.SONATYPE_SNAPSHOTS;
|
||||
case "SONATYPE_SNAPSHOTS_LEGACY" -> Repository.SONATYPE_SNAPSHOTS_LEGACY;
|
||||
case "CENTRAL_RELEASES" -> Repository.CENTRAL_RELEASES;
|
||||
case "CENTRAL_SNAPSHOTS" -> Repository.CENTRAL_SNAPSHOTS;
|
||||
default -> new Repository(locationOrName);
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -133,7 +133,11 @@ public class PublishOperation extends AbstractOperation<PublishOperation> {
|
|||
var resolution = new VersionResolution(properties());
|
||||
var resolver = new DependencyResolver(resolution, artifactRetriever(), List.of(repository), new Dependency(info().groupId(), info().artifactId(), info().version()));
|
||||
var snapshot_meta = resolver.getSnapshotMavenMetadata();
|
||||
snapshot_build_number = snapshot_meta.getSnapshotBuildNumber() + 1;
|
||||
var build_number_meta = snapshot_meta.getSnapshotBuildNumber();
|
||||
if (build_number_meta == null) {
|
||||
throw new DependencyException("Snapshot metadata build number doesn't exist.");
|
||||
}
|
||||
snapshot_build_number = build_number_meta + 1;
|
||||
} catch (DependencyException e) {
|
||||
// start the build number from the beginning
|
||||
System.out.println("Unable to retrieve previous snapshot metadata, using first build number.");
|
||||
|
|
@ -161,7 +165,7 @@ public class PublishOperation extends AbstractOperation<PublishOperation> {
|
|||
.info(info())
|
||||
.updated(moment)
|
||||
.build(),
|
||||
info().version() + "/" + repository.getMetadataName(), true);
|
||||
info().version() + "/" + repository.getMetadataName(), false);
|
||||
return actual_version;
|
||||
}
|
||||
|
||||
|
|
@ -493,9 +497,7 @@ public class PublishOperation extends AbstractOperation<PublishOperation> {
|
|||
response.statusCode() < 300) {
|
||||
System.out.print("done");
|
||||
} else {
|
||||
System.out.println("failed");
|
||||
System.out.println(response.body());
|
||||
System.out.print(response.headers().toString());
|
||||
System.out.print("failed");
|
||||
throw new UploadException(url, response.statusCode());
|
||||
}
|
||||
} finally {
|
||||
|
|
|
|||
|
|
@ -45,9 +45,9 @@ public class Wrapper {
|
|||
public static final String WRAPPER_PROPERTIES = WRAPPER_PREFIX + ".properties";
|
||||
|
||||
static final String MAVEN_CENTRAL = "https://repo1.maven.org/maven2/";
|
||||
static final String SONATYPE_SNAPSHOTS = "https://s01.oss.sonatype.org/content/repositories/snapshots/";
|
||||
static final String CENTRAL_SNAPSHOTS = "https://central.sonatype.com/repository/maven-snapshots/";
|
||||
static final String DOWNLOAD_LOCATION = MAVEN_CENTRAL + "com/uwyn/rife2/bld/${version}/";
|
||||
static final String DOWNLOAD_LOCATION_SNAPSHOT = SONATYPE_SNAPSHOTS + "com/uwyn/rife2/bld/${version}/";
|
||||
static final String DOWNLOAD_LOCATION_SNAPSHOT = CENTRAL_SNAPSHOTS + "com/uwyn/rife2/bld/${version}/";
|
||||
static final String BLD_CACHE = "bld.cache";
|
||||
static final String BLD_FILENAME = "bld-${version}.jar";
|
||||
static final String BLD_SOURCES_FILENAME = "bld-${version}-sources.jar";
|
||||
|
|
|
|||
Loading…
Reference in a new issue