Chore/frontend maven plugin#10
Merged
Merged
Conversation
Migrates the npm build of the sample frontend from exec-maven-plugin to com.github.eirslett:frontend-maven-plugin so node + npm are downloaded, pinned, and run by Maven itself. The plugin handles platform detection, so the dedicated <npm.executable> property and the 'platform-windows' profile in the parent sample pom drop out. Sample parent pom (examples/.../pom.xml): - Drop <npm.executable> property and the platform-windows profile. - Add <frontend-maven-plugin.version>, <node.version>, <npm.version>. Frontend pom (frontend/pom.xml): - Replace exec-maven-plugin/npm-build with four frontend-maven-plugin executions: install-node-and-npm (validate), npm install (initialize), npm run build (generate-resources), and npm-upgrade-deps with <phase>none</phase> — only invoked via explicit `mvn frontend:npm@npm-upgrade-deps` from scripts/update-dependencies.sh. - Cache node/npm under target/ so `mvn clean` keeps the workspace tidy. Frontend package.json: - Add npm-check-updates ^17 to devDependencies. - Add `upgrade-deps` script: `ncu -u --dep prod,dev,peer && npm install`. - package-lock.json is regenerated to match. scripts/update-dependencies.sh: - Replace the ad-hoc `cd ... && ncu -u && npm i && cd ...` block with a run_npm_upgrade_deps helper that invokes `mvn -f .../frontend/pom.xml com.github.eirslett:frontend-maven-plugin:npm@npm-upgrade-deps`. - Honour --dry-run for the frontend leg too (prints the manual command instead of mutating anything). - Drop the implicit `cd` chain in favour of REPO_ROOT-anchored paths. Verified end-to-end: `mvn -pl frontend initialize` downloads node 22.11.0 + npm 10.9.0 into target/, runs `npm install`, syncs the lockfile, and the upgrade-deps script is reachable via the documented goal coordinate. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Node 24.x is the current LTS line (codename Krypton); switching the sample frontend onto it brings npm 11.12.1 (bundled) and keeps contributors aligned with what nodejs.org marks as Active LTS rather than the previous Maintenance LTS series. Also restores line 29 of the parent sample pom, which had a stray 'yjlf' typed in front of <java.version>21</java.version> — the file would not parse as XML; this just removes the literal characters and leaves the property intact. Verified locally: `mvn -pl frontend validate` downloads node v24.15.0 into target/node and `mvn -pl frontend initialize` runs npm install cleanly (0 vulnerabilities, lockfile unchanged because the listed dependencies did not move). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
npm-check-updates released several major versions since the original pin. Move to ^22 (current major) to pick up the latest reporting and bug fixes; lockfile is regenerated against the new version. The dev-only dependency is invoked indirectly through `npm run upgrade-deps` (added in the previous commit) and via scripts/update-dependencies.sh -> mvn frontend:npm@npm-upgrade-deps, so consumers see no behavioural change beyond the upgraded tool. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
|
Coverage Impact This PR will not change total coverage. 🚦 See full report on Qlty Cloud »🛟 Help
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




No description provided.