Maven: check the Java target in pom.xml
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 22/100
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
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.xmlinchecks/runtimes.py, next to the existingproject.java.pinrow, 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>insidemaven-compiler-plugin<maven.compiler.source>/<maven.compiler.target>(take1.8as1.8)
- Resolve a
${property}reference only when the same file defines that property; otherwise reportskiprather 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 likeJava (Maven); a mismatch is afail(a build requirement). - Add
explain.pyanddocs/checks.mdrows, a CHANGELOG line, and unit tests including a hostilepom.xml.
Done when:
- A
pom.xmlwithmaven.compiler.release17 on a Java 11 machine reports onefailnaming17and the installed version. - A
pom.xmlwith no compiler target adds no result. ${java.version}resolves when defined in the same file; an undefined property reportsskipand never echoes the file.pytest,ruff checkandruff format --checkpass.
Notes:
- Maven's real resolution (parent POMs, profiles,
~/.m2/settings.xml) is out of scope; that is why unknown specs stayskip. - Read-only like every other check: no
mvninvocation.
- Dominant language
- Python
- Stars
- 2
- Forks
- 3
- Avg merge
- 10h 51m
- Merged PRs (30d)
- 40
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Evalogical-Inc/devReady
-
good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Evalogical-Inc/devReady#71 ·
Maintainers usually reply within 1 day
-
enhancement good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Evalogical-Inc/devReady#66 ·
Maintainers usually reply within 1 day
-
enhancement good first issue
Difficulty 2/5 3-5 days Newbie friendliness 72/100
Evalogical-Inc/devReady#61 ·
Maintainers usually reply within 1 day
-
good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
Evalogical-Inc/devReady#72 ·
Maintainers usually reply within 1 day
-
Read the Java pin from .sdkmanrcPossibly taken @Utkarsh3725 claimed this today. Openenhancement good first issue help wanted
Difficulty 3/5 Half a day Newbie friendliness 74/100
Evalogical-Inc/devReady#70 ·
Maintainers usually reply within 1 day
All issues in Evalogical-Inc/devReady
Similar issues
-
Email validation accepts a trailing newlinePossibly taken @marcello-pichini claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
dbt-labs/spark-utils#51 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
bug frontend
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
vendrabuck/HERD#1419 ·
Maintainers usually reply within 1 day