Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/java24-upgrade.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
## Summary
- Spec issue: #87
- ADR/design review discussion: https://github.com/ganesh47/java-99-problems/discussions/86
- Wiki page for spec/ADR: https://github.com/ganesh47/java-99-problems/wiki/Spec-Upgrade-Java-Baseline-to-24

## Required checks
- [ ] spec-kit templates refreshed (`specs scan --refresh-spec-kit` or `specs templates`)
- [ ] Spec-kit availability check passed (`npm run spec-kit:check`)
- [ ] Specs coverage run
- [ ] Example conformance run (if applicable)
- [ ] Security scans (Semgrep/OSV-Scanner/Gitleaks/Checkov) green
- [ ] ADR/design review approved before merge
- [ ] Issue and project status updated (Todo → In Progress → Done)
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ jobs:
- name: Configure Java-specific args
run: |
if [ "${{ matrix.java }}" = "24" ]; then
echo "SpotBugs is skipped on Java 24 to keep CI green."
echo "EXTRA_ARGS=-Dspotbugs.skip=true" >> "$GITHUB_ENV"
fi

Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## v0.2.0 - Java 24 baseline
- Set Java 24 as the default toolchain in Maven and align plugin configs.
- Document Java 24 usage in README and keep CI green on Java 24.

## v0.1.0 - Specs bootstrap
- Add specs scaffolding, Codex wrappers, and guard/coverage/security/release workflows.
- Add spec-kit template availability check and ADR/wiki automation for specs sync.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,10 @@ bash ./mvnw test

1. Clone the repository
2. Import as a Maven project
3. Browse the problems in order, starting from P01
4. Run tests to verify your understanding
5. Check the test cases for usage examples
3. Use Java 24 (Temurin 24 recommended)
4. Browse the problems in order, starting from P01
5. Run tests to verify your understanding
6. Check the test cases for usage examples

Each problem's implementation and its corresponding test class can be studied independently, making it easy to focus on specific concepts or challenges.

Expand Down
8 changes: 5 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
<version>1.0-SNAPSHOT</version>

<properties>
<java.version>24</java.version>
<!-- PMD 3.26.0 does not support targetJdk 24 yet. -->
<pmd.targetJdk>23</pmd.targetJdk>
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
<maven.compiler.release>${java.version}</maven.compiler.release>
Expand Down Expand Up @@ -63,7 +66,7 @@
<artifactId>maven-pmd-plugin</artifactId>
<version>3.26.0</version>
<configuration>
<targetJdk>22</targetJdk>
<targetJdk>${pmd.targetJdk}</targetJdk>
</configuration>
<executions>
<execution>
Expand Down Expand Up @@ -93,8 +96,7 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>3.13.0</version>
<configuration>
<source>22</source>
<target>22</target>
<release>${java.version}</release>
</configuration>
</plugin>

Expand Down
38 changes: 38 additions & 0 deletions specs/java-99-java24-upgrade.feature.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
spec_id: java24.upgrade
title: Upgrade Java Baseline to 24
features:
- id: toolchain.java24
accept:
- "pom.xml defines java.version=24 and compiler config consumes the property"
- "PMD targetJdk is pinned to the highest supported level with rationale noted"
- "mvnw verify defaults to Java 24 when no -Djava.version override is supplied"
- id: ci.java24
accept:
- "CI builds include Java 24 and pass with -Djava.version=24"
- "Java 24-specific skips (if any) are documented and keep checks green"
- id: examples.java24
accept:
- "Problem implementations and tests compile/run under Java 24 in CI"
- id: docs.release
accept:
- "CHANGELOG.md contains a v0.2.0 entry for the Java 24 upgrade"
- "Release workflow publishes v0.2.0 with coverage artifact and ADR/wiki links"
- id: spec.workflow
accept:
- "Spec issue/ADR/wiki links created via specs sync and ADR approved before implementation"
- "PR uses the spec template with issue/ADR/wiki links and required checks green"
---

## Summary
Move the java-99-problems baseline to Java 24 by updating the Maven toolchain defaults and CI expectations. This keeps local builds consistent with CI, and documents the change via changelog and release automation.

## Workflow
- Todo → In Progress: create spec, sync issue/ADR/wiki, and approve ADR.
- Implementation: update pom toolchain defaults to Java 24 and align plugin configs; keep CI green.
- Release: add changelog entry and run release workflow for v0.2.0.
- Done: sync and close the spec after release and green checks.

## Notes
- CI already runs Java 24; this spec makes Java 24 the default without overrides.
- If any plugin requires a temporary Java 24 skip, document it in the workflow.
39 changes: 39 additions & 0 deletions specs/java-99-java24-upgrade.plan.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Implementation Plan: java24.upgrade

**Branch**: `java24-upgrade` | **Date**: 2026-01-03 | **Spec**: specs/java-99-java24-upgrade.feature.md
**Input**: Spec doc + spec-kit templates (`specs templates` or `specs scan --refresh-spec-kit`)

## Summary
Set Java 24 as the default toolchain by updating Maven properties and plugin configs, keep CI green on Java 24, document the change in CHANGELOG.md, and ship a v0.2.0 release.

## Technical Context
**Language/Version**: Java (Maven), target baseline 24
**Primary Dependencies**: Maven compiler plugin, PMD, SpotBugs, GitHub Actions
**Testing**: Maven CI workflow (build.yml), specs guard/coverage/security
**Target Platform**: GitHub repo with Specs Board + release workflow

## Project Structure
```
specs/
├── java-99-java24-upgrade.feature.md
├── java-99-java24-upgrade.plan.md
└── java-99-java24-upgrade.tasks.md
pom.xml
.github/workflows/build.yml
CHANGELOG.md
```

## Implementation Strategy
1) Create spec + plan/tasks; run `specs sync` to open issue/ADR/wiki.
2) Approve ADR before implementation.
3) Update pom defaults: define java.version=24 and align compiler/PMD configs to use it.
4) Ensure CI expectations for Java 24 remain green; document any 24-specific skips.
5) Add v0.2.0 entry to CHANGELOG.md and run release workflow with issue/ADR/wiki links.
6) Run `specs sync` and `specs close` after release and green checks.

## Dependencies & Execution Order
- ADR approval before implementation.
- Release requires CHANGELOG.md entry for v0.2.0.

## Notes
- Use the spec-specific PR template with issue/ADR/wiki links.
24 changes: 24 additions & 0 deletions specs/java-99-java24-upgrade.tasks.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Tasks: java24.upgrade

**Input**: spec (`specs/java-99-java24-upgrade.feature.md`), plan (`specs/java-99-java24-upgrade.plan.md`), spec-kit templates
**Prerequisites**: ADR approved; templates refreshed

## Format: `[ID] [P?] [Story] Description`

## Phase 1: Spec setup
- [ ] T001 [P] [SPEC] Create spec, plan, and tasks files.
- [ ] T002 [P] [SPEC] Run `specs sync` to create issue/ADR/wiki links.
- [ ] T003 [P] [SPEC] Approve ADR and update with plan/tasks.

## Phase 2: Java 24 baseline
- [ ] T010 [P] [BUILD] Define java.version=24 and align compiler/PMD configs.
- [ ] T011 [P] [BUILD] Confirm CI Java 24 checks remain green; document any 24-specific skips.
- [ ] T012 [P] [BUILD] Add spec-specific PR template with issue/ADR/wiki links.

## Phase 3: Release + close
- [ ] T020 [P] [REL] Add v0.2.0 entry to CHANGELOG.md.
- [ ] T021 [P] [REL] Run release workflow for v0.2.0 (issue/ADR/wiki inputs).
- [ ] T022 [P] [REL] Run `specs close java24.upgrade --issue <#> --pr <#>` after release + green checks.

## Dependencies & Execution Order
- Phase 1 → Phase 2 → Phase 3.
Loading