Skip to content

Build: Dependency version mismatches between pom.xml and build.gradle #40

@sfloess

Description

@sfloess

Description

jnexus-core has both Maven (pom.xml) and Gradle (build.gradle) builds, but they declare different versions for the same dependencies. This can cause confusion and potential runtime issues.

Version Mismatches

Project version:

  • pom.xml: 1.2
  • build.gradle: 1.1

Jackson version:

  • pom.xml: 2.18.3
  • build.gradle: 2.21.3

JUnit version:

  • pom.xml: 5.12.0
  • build.gradle: 6.1.0

Impact

  • Build inconsistency: Maven and Gradle builds produce artifacts with different dependencies
  • Testing: Tests run with different JUnit versions depending on build tool
  • Confusion: Developers don't know which is the "source of truth"
  • Potential runtime issues: Jackson API differences between 2.18 and 2.21

Root Cause

The module supports both build systems for flexibility (Maven for desktop, Gradle for Android integration), but versions aren't kept in sync.

Recommended Fix

Option 1: Choose one build system as primary

  • Use Gradle as primary (Android needs it anyway)
  • Remove or mark pom.xml as deprecated
  • Update documentation

Option 2: Keep both but enforce sync

  • Add a check/script to verify versions match
  • Use version properties/variables in both files pointing to single source
  • Document which file is authoritative (suggest: build.gradle)

Immediate fix - sync to latest versions:

version = '1.2'  // Match pom.xml
jackson-databind:2.21.3  // Use latest
junit-jupiter:6.1.0  // Use latest

And update pom.xml:

<version>1.2</version>
<jackson.version>2.21.3</jackson.version>
<junit.version>6.1.0</junit.version>

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions