Skip to content

Find the license repository of the plugin first on the class path - #829

Merged
slachiewicz merged 1 commit into
masterfrom
agent/license-store-own-repository
Nov 22, 2026
Merged

slachiewicz merged 1 commit into
masterfrom
agent/license-store-own-repository

Conversation

@slachiewicz

Copy link
Copy Markdown
Member

On Java 9 and later the surefire class path of the java11-mrjar profile puts the dependencies before target/classes, so byte-buddy's META-INF/licenses won and LicenseStoreTest.jarRepository had to be limited to Java 8. LicenseStore now prefers the repository next to its own class, which also lets unit tests run the goals that load the store.

Verified: mvn verify on JDK 17 → 234 tests, 0 failures; jarRepository fails on the previous LicenseStore when it runs on 17.

LicenseStore took the first META-INF/licenses on the class path, which on Java 9 and later is byte-buddy's in the tests, so the jar repository could not be loaded there. It now prefers the one next to its own class and falls back to the first as before, and jarRepository runs on every JDK.
@slachiewicz slachiewicz added the bug Something isn't working label Nov 22, 2026
@slachiewicz
slachiewicz marked this pull request as ready for review November 22, 2026 16:59
@slachiewicz
slachiewicz merged commit 7ec6d33 into master Nov 22, 2026
13 checks passed
@slachiewicz
slachiewicz deleted the agent/license-store-own-repository branch November 22, 2026 17:16
@github-actions github-actions Bot added this to the 2.9.1 milestone Nov 22, 2026
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.

1 participant