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

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:
Geert Bevin 2025-07-03 13:08:26 -04:00
parent 5af8ca7b2e
commit 91a621dfea
9 changed files with 19 additions and 13 deletions

View file

@ -2,12 +2,12 @@
<library name="bld"> <library name="bld">
<CLASSES> <CLASSES>
<root url="file://$PROJECT_DIR$/lib/bld" /> <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> </CLASSES>
<JAVADOC /> <JAVADOC />
<SOURCES> <SOURCES>
<root url="file://$PROJECT_DIR$/lib/bld" /> <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> </SOURCES>
<excluded> <excluded>
<root url="jar://$PROJECT_DIR$/lib/bld/bld-wrapper.jar!/" /> <root url="jar://$PROJECT_DIR$/lib/bld/bld-wrapper.jar!/" />

View file

@ -3,7 +3,7 @@
[![bld](https://img.shields.io/badge/2.2.1-FA9052?label=bld&labelColor=2392FF)](https://rife2.com/bld) [![bld](https://img.shields.io/badge/2.2.1-FA9052?label=bld&labelColor=2392FF)](https://rife2.com/bld)
[![Release](https://img.shields.io/github/release/rife2/bld.svg)](https://github.com/rife2/bld/releases/latest) [![Release](https://img.shields.io/github/release/rife2/bld.svg)](https://github.com/rife2/bld/releases/latest)
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.uwyn.rife2/bld/badge.svg?color=blue)](https://maven-badges.herokuapp.com/maven-central/com.uwyn.rife2/bld) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.uwyn.rife2/bld/badge.svg?color=blue)](https://maven-badges.herokuapp.com/maven-central/com.uwyn.rife2/bld)
[![Nexus Snapshot](https://img.shields.io/nexus/s/com.uwyn.rife2/bld?server=https%3A%2F%2Fs01.oss.sonatype.org%2F)](https://s01.oss.sonatype.org/content/repositories/snapshots/com/uwyn/rife2/bld/) [![Nexus Snapshot](https://img.shields.io/nexus/s/com.uwyn.rife2/bld?server=https%3A%2F%2Fcentral.sonatype.com%2F)](https://central.sonatype.com/repository/maven-snapshots/com/uwyn/rife2/bld/)
[![gradle-ci](https://github.com/rife2/bld/actions/workflows/bld.yml/badge.svg)](https://github.com/rife2/bld/actions/workflows/bld.yml) [![gradle-ci](https://github.com/rife2/bld/actions/workflows/bld.yml/badge.svg)](https://github.com/rife2/bld/actions/workflows/bld.yml)
[![Tests](https://rife2.com/tests-badge/badge/com.uwyn.rife2/bld)](https://github.com/rife2/rife2/actions/workflows/bld.yml) [![Tests](https://rife2.com/tests-badge/badge/com.uwyn.rife2/bld)](https://github.com/rife2/rife2/actions/workflows/bld.yml)

2
core

@ -1 +1 @@
Subproject commit f8bde83ca806403dd8f37294239ac77dba8ad010 Subproject commit ac900b7496ced0a2a38b3ceeba6ad57155e4c508

Binary file not shown.

View file

@ -8,4 +8,4 @@ bld.javaOptions=
bld.javacOptions= bld.javacOptions=
bld.repositories=MAVEN_CENTRAL,RIFE2_RELEASES bld.repositories=MAVEN_CENTRAL,RIFE2_RELEASES
bld.sourceDirectories=core/src/bld/java bld.sourceDirectories=core/src/bld/java
bld.version=2.2.1 bld.version=2.2.2-SNAPSHOT

View file

@ -86,7 +86,7 @@ public class BldBuild extends AbstractRife2Build {
publishOperation() publishOperation()
.repository(version.isSnapshot() ? repository("rife2-snapshots") : repository("rife2-releases")) .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")) .repository(repository("github"))
.info(new PublishInfo() .info(new PublishInfo()
.groupId("com.uwyn.rife2") .groupId("com.uwyn.rife2")

View file

@ -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_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 = 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 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_RELEASES = new Repository("https://repo.rife2.com/releases/");
public static final Repository RIFE2_SNAPSHOTS = new Repository("https://repo.rife2.com/snapshots/"); 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_RELEASES_LEGACY" -> Repository.SONATYPE_RELEASES_LEGACY;
case "SONATYPE_SNAPSHOTS" -> Repository.SONATYPE_SNAPSHOTS; case "SONATYPE_SNAPSHOTS" -> Repository.SONATYPE_SNAPSHOTS;
case "SONATYPE_SNAPSHOTS_LEGACY" -> Repository.SONATYPE_SNAPSHOTS_LEGACY; case "SONATYPE_SNAPSHOTS_LEGACY" -> Repository.SONATYPE_SNAPSHOTS_LEGACY;
case "CENTRAL_RELEASES" -> Repository.CENTRAL_RELEASES;
case "CENTRAL_SNAPSHOTS" -> Repository.CENTRAL_SNAPSHOTS;
default -> new Repository(locationOrName); default -> new Repository(locationOrName);
}; };
} }

View file

@ -133,7 +133,11 @@ public class PublishOperation extends AbstractOperation<PublishOperation> {
var resolution = new VersionResolution(properties()); var resolution = new VersionResolution(properties());
var resolver = new DependencyResolver(resolution, artifactRetriever(), List.of(repository), new Dependency(info().groupId(), info().artifactId(), info().version())); var resolver = new DependencyResolver(resolution, artifactRetriever(), List.of(repository), new Dependency(info().groupId(), info().artifactId(), info().version()));
var snapshot_meta = resolver.getSnapshotMavenMetadata(); 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) { } catch (DependencyException e) {
// start the build number from the beginning // start the build number from the beginning
System.out.println("Unable to retrieve previous snapshot metadata, using first build number."); 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()) .info(info())
.updated(moment) .updated(moment)
.build(), .build(),
info().version() + "/" + repository.getMetadataName(), true); info().version() + "/" + repository.getMetadataName(), false);
return actual_version; return actual_version;
} }
@ -493,9 +497,7 @@ public class PublishOperation extends AbstractOperation<PublishOperation> {
response.statusCode() < 300) { response.statusCode() < 300) {
System.out.print("done"); System.out.print("done");
} else { } else {
System.out.println("failed"); System.out.print("failed");
System.out.println(response.body());
System.out.print(response.headers().toString());
throw new UploadException(url, response.statusCode()); throw new UploadException(url, response.statusCode());
} }
} finally { } finally {

View file

@ -45,9 +45,9 @@ public class Wrapper {
public static final String WRAPPER_PROPERTIES = WRAPPER_PREFIX + ".properties"; public static final String WRAPPER_PROPERTIES = WRAPPER_PREFIX + ".properties";
static final String MAVEN_CENTRAL = "https://repo1.maven.org/maven2/"; 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 = 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_CACHE = "bld.cache";
static final String BLD_FILENAME = "bld-${version}.jar"; static final String BLD_FILENAME = "bld-${version}.jar";
static final String BLD_SOURCES_FILENAME = "bld-${version}-sources.jar"; static final String BLD_SOURCES_FILENAME = "bld-${version}-sources.jar";