Modernization of Maven Archetypes
Discussion: https://github.com/support-and-care/maven-support-and-care/discussions/191
Problem Statement
Creating projects with existing Maven Archetypes yields outdated project structures and obsolete practices. The current archetypes at maven.apache.org rely on old conventions, and the generation process requires verbose commands with extensive parameters.
Current State / Starting Point
- Official Maven archetypes produce outdated project structures
- Generation requires verbose commands, e.g.:
mvn archetype:generate -DarchetypeGroupId=org.apache.maven.archetypes -DarchetypeArtifactId=maven-archetype-quickstart -DarchetypeVersion=1.5 - Some archetypes may be redundant or no longer relevant
- New users get a poor first impression of Maven due to outdated generated projects
Expected Outcomes / Benefits
- Modern Templates: Updated archetypes that produce contemporary project structures following current best practices
- Archetype Audit: Evaluation of existing archetypes - identify which are still necessary, remove redundant or outdated ones
- Streamlined CLI: Simplified execution methods, potentially including new goals for rapid project initialization
- Better Onboarding: Improved first-time user experience with Maven
Discussion Summary
A key pain point raised is that generated projects are "detached" from their archetype — when a new archetype version is released with updated plugins or dependencies, existing projects cannot be updated. This relates to the idea of tracking the source archetype and enabling updates via tools like OpenRewrite. The domtrip library was mentioned as a foundation for lossless programmatic editing of Maven-related files, which could support archetype-based project upgrades.
Final Discussion (2026-02-17)
- Perhaps refactor / re-use Maven ToolBox library
- Decision: Request Funding