Maven: check the Java target in pom.xml

Open
#59 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@evalogical-lab is already working on this.

Since Nov 13, 2026.

  • #64 by @evalogical-lab — open

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
22/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Stale
Tech stack
java, python
Domain
cli, tooling

Research direction

Start in checks/runtimes.py beside the existing project.java.pin row, then look at explain.py and docs/checks.md, which need matching rows. Tests should cover the pom.xml cases, including a hostile file and an undefined ${property}. Open pull request #64 already targets this issue, so check with the maintainers before starting. Done means the Java 11 vs 17 case reports one fail, and pytest, ruff check and ruff format --check pass.

Written by the indexing model from the issue text.

Description

enhancement

Problem: DevReady reads the Java version from .java-version and .tool-versions, but a Maven project declares its Java target in pom.xml. On a machine with Java 11, a project that requires 17 builds fail with a compiler error and DevReady reports nothing useful.

Do:

  • Add a literal pin extractor for pom.xml in checks/runtimes.py, next to the existing project.java.pin row, so the Java check only runs when the file declares a target.
  • Recognize, in this order:
    • <maven.compiler.release>17</maven.compiler.release>
    • <release>17</release> inside maven-compiler-plugin
    • <maven.compiler.source> / <maven.compiler.target> (take 1.8 as 1.8)
  • Resolve a ${property} reference only when the same file defines that property; otherwise report skip rather than guess.
  • Parse line-based literals only (no XML entity handling, no file content echoed), and reuse the existing version matcher.
  • New id project.java.maven; title like Java (Maven); a mismatch is a fail (a build requirement).
  • Add explain.py and docs/checks.md rows, a CHANGELOG line, and unit tests including a hostile pom.xml.

Done when:

  • A pom.xml with maven.compiler.release 17 on a Java 11 machine reports one fail naming 17 and the installed version.
  • A pom.xml with no compiler target adds no result.
  • ${java.version} resolves when defined in the same file; an undefined property reports skip and never echoes the file.
  • pytest, ruff check and ruff format --check pass.

Notes:

  • Maven's real resolution (parent POMs, profiles, ~/.m2/settings.xml) is out of scope; that is why unknown specs stay skip.
  • Read-only like every other check: no mvn invocation.
Dominant language
Python
Stars
2
Forks
3
Avg merge
10h 51m
Merged PRs (30d)
40

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Evalogical-Inc/devReady

All issues in Evalogical-Inc/devReady

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.