Skip to content

Add missing Jspecify version defintion #3759

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

Siedlerchr
Copy link

@Siedlerchr Siedlerchr commented Jun 18, 2025

Add missing jspeficy version defintion

Fixes #3758

Important

Base your changes on 2.x branch if you are targeting Log4j 2; use main otherwise.

Checklist

Before we can review and merge your changes, please go through the checklist below. If you're still working on some items, feel free to submit your pull request as a draft—our CI will help guide you through the remaining steps.

✅ Required checks

  • License: I confirm that my changes are submitted under the Apache License, Version 2.0.

  • Commit signatures: All commits are signed and verifiable. (See GitHub Docs on Commit Signature Verification).

  • Code formatting: The code is formatted according to the project’s style guide.

    How to check and fix formatting
    • To check formatting: ./mvnw spotless:check
    • To fix formatting: ./mvnw spotless:apply

    See the build instructions for details.

  • Build & Test: I verified that the project builds and all unit tests pass.

    How to build the project

    Run: ./mvnw verify

    See the build instructions for details.

🧪 Tests (select one)

  • I have added or updated tests to cover my changes.
  • No additional tests are needed for this change.

📝 Changelog (select one)

  • I added a changelog entry in src/changelog/.2.x.x. (See Changelog Entry File Guide).
  • This is a trivial change and does not require a changelog entry.

@vy
Copy link
Member

vy commented Jun 18, 2025

The actual fix might be more convoluted. jspecify.version already exist in /pom.xml, though gets removed during BOM-ification right before deployment.

@Siedlerchr
Copy link
Author

Siedlerchr commented Jun 18, 2025

I don't know but it was clearly missing in the parent pom, so maybe that got resolved instead?

@Siedlerchr Siedlerchr changed the title Add missing jspecfiy version defintion Add missing Jspecify version defintion Jun 18, 2025
@ppkarwasz
Copy link
Contributor

I don't know but it was clearly missing in the parent pom, so maybe that got resolved instead?

To expand a bit on what @vy pointed out:

  • The jspecify.version property is currently defined in the top-level POM (/pom.xml), which corresponds to the log4j-bom module.
  • However, since we flatten log4j-bom before publishing it to Maven Central, any properties defined in that POM—including jspecify.version—don’t make it into the published artifact. This is the root cause of the issue.

So rather than just duplicating the property in /log4j-parent/pom.xml, I’d suggest we:

  • Remove the jspecify.version property from /pom.xml.
  • Move the configuration for the java8-tests profile (excluding the activator) from /pom.xml to /log4j-parent/pom.xml.

This way, the property is defined at the right level (in the parent, where it will be inherited properly), and we avoid any confusion or redundancy between flattened and non-flattened modules.

📝 Changelog (select one)

  • I added a changelog entry in src/changelog/.2.x.x. (See Changelog Entry File Guide).
  • This is a trivial change and does not require a changelog entry.

I’d actually argue this isn’t a trivial change—it addresses a significant issue that breaks dependency resolution and should have a changelog entry. We'll likely need to cut a 2.25.1 release to fix it, so thank you for identifying the root cause!

@Siedlerchr
Copy link
Author

@ppkarwasz Thanks for the detailed explanation. It's probably easier if you take over this PR/fix

@vy
Copy link
Member

vy commented Jun 20, 2025

@Siedlerchr, thanks so much for the report and the fix, much appreciated. 🙇

I've provided a successor in #3763.

@vy vy closed this Jun 20, 2025
@github-project-automation github-project-automation bot moved this from To triage to Done in Log4j bug tracker Jun 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Missing dependency jspecify version attribute in parent pom
3 participants