Skip to content

Release 1.4.2#1604

Merged
hankem merged 4 commits intomainfrom
release-1.4.2-preparation
Apr 18, 2026
Merged

Release 1.4.2#1604
hankem merged 4 commits intomainfrom
release-1.4.2-preparation

Conversation

@hankem
Copy link
Copy Markdown
Member

@hankem hankem commented Apr 15, 2026

resolves #1599

doLast {
def tngRepoId = project.findProperty('tngRepoId') ?: rootProject.closeSonatypeStagingRepository.stagingRepositoryId.get()
def rootUrl = "https://oss.sonatype.org/service/local/repositories/${tngRepoId}/content/com/tngtech/archunit"
def rootUrl = "https://ossrh-staging-api.central.sonatype.com/service/local/repositories/${tngRepoId}/content/com/tngtech/archunit"
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't work yet.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are aware that you need different tokens for that?

https://central.sonatype.org/pages/ossrh-eol/

If you choose this route, you will need to generate a Portal user token to replace your OSSRH user token, point your plugin at the new service's URL, and potentially add calls to manual endpoints to your build if you are using a "Maven-like" API (e.g. Gradle's default maven-publish plugin). The documentation linked previously should provide more information, but please let us know if you encounter any issues.

All my projects do use Maven, it was quite easy following the docs. But the token bits are essential.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! 💚
Yes, we do use new tokens for the Publisher Portal, and the artifacts are in fact staged correctly.

But ArchUnit's checkUploadedArtifacts task (which wants to verify staged artifacts before finally releasing them) fails to download them from a Maven repository like structure, which probably simply does not exist anymore, as the Portal OSSRH Staging API

is [just] a partial reimplementation of the OSSRH / Nexus Repository Manager 2 Staging APIs. The intent of this service is to enable publishers who are using existing plugins to have a smooth migration to the Central Publisher Portal.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest to disable the checkUploadedArtifacts tasks for now.

Copy link
Copy Markdown
Member Author

@hankem hankem Apr 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I finally found the hint on URL and authorization to download the artifacts in the section Manually Testing a Deployment Bundle.

@hankem hankem force-pushed the release-1.4.2-preparation branch 2 times, most recently from fbfac4d to c356f01 Compare April 17, 2026 06:37
Comment on lines +12 to 19
url "https://central.sonatype.com/api/v1/publisher/deployments/download/"
credentials(HttpHeaderCredentials) {
name = "Authorization"
value = "Bearer " + (project.getProperty('sonatypeUsername') + ":" + project.getProperty('sonatypePassword')).bytes.encodeBase64()
}
authentication {
header(HttpHeaderAuthentication)
}
Copy link
Copy Markdown
Member Author

@hankem hankem Apr 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That (set up following Manually Testing a Deployment Bundle) didn't work yet:

> Task :testRelease

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':example-plain:compileTestJava'.
> Could not resolve all files for configuration ':example-plain:testCompileClasspath'.
   > Could not resolve com.tngtech.archunit:archunit:1.4.2.
     Required by:
         project :example-plain
      > Could not resolve com.tngtech.archunit:archunit:1.4.2.
         > Could not get resource 'https://central.sonatype.com/api/v1/publisher/deployments/download/com/tngtech/archunit/archunit/1.4.2/archunit-1.4.2.pom'.
            > Could not GET 'https://central.sonatype.com/api/v1/publisher/deployments/download/com/tngtech/archunit/archunit/1.4.2/archunit-1.4.2.pom'.
               > Read timed out

Copy link
Copy Markdown
Member Author

@hankem hankem Apr 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It did work after configuring a high systemProp.org.gradle.internal.http.socketTimeout.
(Downloading via curl was quite slow, too.)

@hankem hankem force-pushed the release-1.4.2-preparation branch 2 times, most recently from f7e4048 to 424c79a Compare April 18, 2026 15:51
hankem added 2 commits April 18, 2026 21:06
…using the Portal OSSRH Staging API

cf. https://central.sonatype.org/news/20250326_ossrh_sunset/,
    https://central.sonatype.org/publish/publish-portal-ossrh-staging-api/
and https://central.sonatype.org/publish/publish-portal-api/#manually-testing-a-deployment-bundle

As the snapshots repository is currently not used,
its configuration is just a best guess at this point.

Signed-off-by: Manfred Hanke <Manfred.Hanke@tngtech.com>
Signed-off-by: Manfred Hanke <Manfred.Hanke@tngtech.com>
@hankem hankem force-pushed the release-1.4.2-preparation branch from 424c79a to c07193c Compare April 18, 2026 19:25
Signed-off-by: hankem <action@github.com>
Signed-off-by: hankem <action@github.com>
@hankem hankem marked this pull request as ready for review April 18, 2026 19:49
@hankem hankem merged commit 3cd32a2 into main Apr 18, 2026
76 checks passed
@hankem hankem deleted the release-1.4.2-preparation branch April 18, 2026 20:14
@hankem
Copy link
Copy Markdown
Member Author

hankem commented Apr 19, 2026

For reference: Logs of the release build

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

not compatible with java 26

3 participants