Skip to content

Deploy the root java-agent POM to Maven Central - #827

Merged
wu-sheng merged 1 commit into
mainfrom
fix/deploy-root-parent-pom
Sep 10, 2026
Merged

Deploy the root java-agent POM to Maven Central#827
wu-sheng merged 1 commit into
mainfrom
fix/deploy-root-parent-pom

Conversation

@wu-sheng

@wu-sheng wu-sheng commented Sep 9, 2026

Copy link
Copy Markdown
Member

Fix bug

Resolves apache/skywalking#13988

The bug

org.apache.skywalking:java-agent:9.7.0 is missing from Maven Central, so every toolkit artifact of 9.7.0 is unresolvable:

[ERROR] Non-resolvable parent POM for org.apache.skywalking:apm-application-toolkit:9.7.0:
        Could not find artifact org.apache.skywalking:java-agent:pom:9.7.0 in central

Reproduce with a clean local repository:

mvn -U -Dmaven.repo.local=$(mktemp -d) \
    dependency:get -Dartifact=org.apache.skywalking:apm-toolkit-logback-1.x:9.7.0

Status on repo.maven.apache.org for 9.7.0: all ten apm-toolkit-* modules and apm-application-toolkit are present (200); java-agent is 404. The listing under /org/apache/skywalking/java-agent/ stops at 9.6.0/.

Cause

#805 ("Only publish toolkit to Maven Central") set <maven.deploy.skip>true</maven.deploy.skip> in the root POM and re-enabled deployment in apm-application-toolkit. The root POM is itself the parent of apm-application-toolkit, so skipping it breaks the parent chain of everything published:

apm-toolkit-logback-1.x:9.7.0
  └─ parent apm-application-toolkit:9.7.0   published
       └─ parent java-agent:9.7.0           skipped -> 404

9.7.0 (tagged 2026-08-12) is the first release containing #805 (2026-04-11), which matches 9.6.0 resolving and 9.7.0 not.

The fix

Declare maven-deploy-plugin at the root with inherited=false and skip=false. Plugin configuration takes precedence over the maven.deploy.skip property, and inherited=false confines the exception to the root POM.

Verified against the effective POMs:

module maven.deploy.skip deploy plugin <skip> deployed
java-agent (root) true false yes
apm-commons, apm-protocol, apm-sniffer true none no
apm-application-toolkit + toolkit modules false none yes

and by running ./mvnw -N deploy -DaltDeploymentRepository=local::default::file://..., which now uploads java-agent-9.8.0-SNAPSHOT.pom.

The release vote checklist gains the corresponding item, since this failure is invisible during the release — the staged artifacts all look fine, and only a user resolving from a clean repository hits it.

Note on 9.7.0

This fix only covers 9.8.0 onward. 9.7.0 stays broken until java-agent:9.7.0:pom, built from the v9.7.0 tag, is staged and released separately. That coordinate was never published, so it is an addition rather than a modification of a released artifact.

  • Update CHANGES.md.

@wu-sheng wu-sheng added this to the 9.8.0 milestone Sep 9, 2026
@wu-sheng wu-sheng added the bug Something isn't working label Sep 9, 2026
@wu-sheng

wu-sheng commented Sep 9, 2026

Copy link
Copy Markdown
Member Author

Pushed 93f4ff7, unrelated to the POM fix but needed to get CI green: the Dead Link Checker fails on this PR (and every PR) with the repository's only dead link,

[✖] https://github.com/apache/skywalking-swck/blob/master/docs/java-agent-injector.md → Status: 404
ERROR: 1 dead links found!

apache/skywalking-swck moved that doc to docs/en/setup/java-agent-injector.md and now renders it on the website, so docs/en/setup/service-agent/java-agent/containerization.md now points at https://skywalking.apache.org/docs/skywalking-swck/latest/en/setup/java-agent-injector/ — the rendered page rather than a path inside the swck source tree, so it survives the next reshuffle.

Happy to split it into its own PR if you would rather keep this one to the POM change.

#805 set maven.deploy.skip=true in the root POM so that only the toolkit
modules reach Maven Central, and re-enabled deployment in
apm-application-toolkit. The root POM is itself the parent of
apm-application-toolkit, so skipping it broke the parent chain of every
published toolkit artifact. 9.7.0, the first release with #805 in it, has all
ten apm-toolkit-* artifacts and apm-application-toolkit on Central but no
java-agent-9.7.0.pom, and resolving any of them fails:

  Non-resolvable parent POM for org.apache.skywalking:apm-application-toolkit:9.7.0:
  Could not find artifact org.apache.skywalking:java-agent:pom:9.7.0 in central

Declare maven-deploy-plugin at the root with inherited=false and skip=false.
Plugin configuration wins over the maven.deploy.skip property, and
inherited=false confines the exception to this POM: apm-commons, apm-protocol
and apm-sniffer still skip deployment, while apm-application-toolkit and its
children keep opting back in through the property.

Also add the missing root POM to the release vote checklist, since the failure
is invisible until a user resolves the toolkit from a clean repository.

Two unrelated fixes ride along:

- apache/skywalking-swck moved docs/java-agent-injector.md to
  docs/en/setup/java-agent-injector.md and now renders it on the website, so
  the old GitHub URL 404s. It is the repository's only dead link and it fails
  the Dead Link Checker on every PR. Point containerization.md at the rendered
  page, which survives the next reshuffle of the swck source tree.

- Spell out in CLAUDE.md that an AI assistant is never credited as an author,
  and that this overrides any co-author trailer the tool is configured to add.

Resolves apache/skywalking#13988
@wu-sheng
wu-sheng merged commit 867872e into main Sep 10, 2026
250 of 253 checks passed
@wu-sheng
wu-sheng deleted the fix/deploy-root-parent-pom branch September 10, 2026 00:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Could not resolve org.apache.skywalking:java-agent:9.7.0.

2 participants