Skip to content

Conversation

@tcheeric
Copy link
Owner

@tcheeric tcheeric commented Oct 5, 2025

title: feat: migrate to nostr-java-bom for centralized version management

Summary

Related issue: #____
Migrate nostr-java to use nostr-java-bom for centralized dependency version management across the Nostr Java ecosystem. This eliminates duplicate version properties and ensures consistent dependency versions.

What changed?

  • Version bump: 0.4.00.5.0
  • BOM updated: nostr-java-bom 1.0.01.1.0 (now includes Spring Boot dependencies)
  • Remove Spring Boot parent POM dependency
  • Replace 30+ version properties with single nostr-java-bom.version property (F:pom.xml†L77)
  • Import nostr-java-bom:1.1.0 in dependencyManagement (F:pom.xml†L87-L93)
  • Remove version tags from all dependencies across modules:
    • nostr-java-crypto: removed bcprov-jdk18on version (F:nostr-java-crypto/pom.xml†L37)
    • nostr-java-util: removed commons-lang3 version (F:nostr-java-util/pom.xml†L28)
    • nostr-java-client: removed Spring Boot versions, added compile scope for awaitility (F:nostr-java-client/pom.xml†L56)
    • nostr-java-api: removed Spring Boot versions
  • Simplify plugin management - versions now inherited from BOM (F:pom.xml†L100-L168)
  • Update nostr-java-bom to import Spring Boot dependencies BOM

BOM Architecture Changes

nostr-java-bom 1.1.0 (updated)
  ├─ imports spring-boot-dependencies (NEW)
  ├─ defines nostr-java modules (updated to 0.5.0)
  └─ defines shared dependencies (BouncyCastle, Jackson, Lombok, test deps)

Benefits

  • Single source of truth: All Nostr Java dependency versions managed in one place
  • Consistency: Identical dependency versions across all Nostr projects
  • Simplified updates: Bump dependency versions once in BOM, all projects inherit it
  • Reduced duplication: From 30+ version properties to 1
  • Spring Boot integration: Now imports Spring Boot BOM for Spring dependencies

BREAKING

None. Internal build configuration change only; no API or runtime behavior changes.

Protocol Compliance

  • No change to NIP (Nostr Implementation Possibilities) compliance
  • Behavior remains compliant with Nostr protocol specifications

Testing

  • mvn clean install -DskipTests -U - BUILD SUCCESS
  • All modules compile successfully with BOM-managed versions
  • Plugin version warnings are non-blocking

Checklist

@github-actions
Copy link

github-actions bot commented Oct 5, 2025

Qodana Community for JVM

262 new problems were found

Inspection name Severity Problems
Unchecked warning 🔶 Warning 62
Field can be local variable 🔶 Warning 55
Field may be 'final' 🔶 Warning 32
Link specified as plain text 🔶 Warning 24
Redundant type cast 🔶 Warning 23
Declaration has problems in Javadoc references 🔶 Warning 22
Redundant local variable 🔶 Warning 12
Constant values 🔶 Warning 7
Dangling Javadoc comment 🔶 Warning 5
Mismatched query and update of collection 🔶 Warning 5
Non-serializable class with 'serialVersionUID' 🔶 Warning 3
Deprecated member is still used 🔶 Warning 1
Deprecated API usage 🔶 Warning 1
Javadoc declaration problems 🔶 Warning 1
Redundant character escape 🔶 Warning 1
Suspicious variable/parameter name combination 🔶 Warning 1
Type parameter hides visible type 🔶 Warning 1
Commented out code ◽️ Notice 4
Multiple occurrences of the same expression ◽️ Notice 2

☁️ View the detailed Qodana report

Contact Qodana team

Contact us at [email protected]

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting

Comment on lines 176 to 184
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven-surefire-plugin.version}</version>
</plugin>
<plugin>
<artifactId>maven-failsafe-plugin</artifactId>
<version>${maven-failsafe-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>

Choose a reason for hiding this comment

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

P0 Badge Preserve explicit plugin versions after dropping Spring Boot parent

The root POM now lists compiler, surefire, failsafe, jacoco, flatten and source/javadoc plugins without versions or configuration. Because spring-boot-starter-parent was removed, there is no longer a parent supplying pluginManagement, and importing the BOM via <dependencyManagement> does not apply to plugins. Maven will therefore fall back to its built‑in defaults (e.g. maven-compiler-plugin 3.1 and maven-surefire-plugin 2.12.4), which are too old for Java 21 and JUnit 5. Running mvn verify will either fail to compile or silently skip Jupiter tests. The plugin versions that were previously defined via properties need to be restored or managed elsewhere.

Useful? React with 👍 / 👎.

Copy link
Owner Author

Choose a reason for hiding this comment

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

@codex address this comment

Choose a reason for hiding this comment

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

Summary

  • Restored explicit plugin versions and execution configurations for publishing, compiler, test, and coverage plugins so Maven continues using Java 21-compatible tooling after removing the Spring Boot parent. pom.xmlL101-L238
  • Reapplied surefire and failsafe versions in the active build plugins to ensure module builds pick up the managed releases. pom.xmlL241-L258

Testing

  • mvn -T1 -q verify (fails: xyz.tcheeric:nostr-java-bom:1.1.0 is unavailable from Maven Central)

View task →

erict875 and others added 2 commits October 5, 2025 23:12
- Configure Qodana to run only on develop, main, and master branches
- Configure code formatting to run only on PRs to main or master branches

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
CI now triggers on PRs and pushes to develop, main, and master branches.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@codecov-commenter
Copy link

⚠️ JUnit XML file not found

The CLI was unable to find any JUnit XML files to upload.
For more help, visit our troubleshooting guide.

@tcheeric tcheeric merged commit 368eeec into develop Oct 5, 2025
1 of 2 checks passed
@tcheeric tcheeric deleted the feat/bom-migration branch October 5, 2025 23:25
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.

3 participants