apache / apache/maven

[MNG-5697] remove LifecycleMapping and ArtifactHandler from maven-core: move to target packaging plugin

Open
#6,614 15 comments 0 reactions 0 assignees View on GitHub
enhancement priority:major
Dominant language
Java
Stars
5.3k
Forks
3.1k
Avg merge
20h 42m
Merged PRs (30d)
297

Description

**[Robert Scholte](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=rfscholte)** opened **[MNG-5697](https://issues.apache.org/jira/browse/MNG-5697?redirect=false)** and commented

Maven Core should only be aware of the pom packaging details, the rest of the `ArtifactHandlers` and `LifecycleMappings` should be moved to their own packaging plugin:
- jar packaging: maven-jar-plugin
- ejb and ejb3 packagings: maven-ejb-plugin
- maven-plugin packaging: maven-plugin-plugin
- war packaging: maven-war-plugin
- ear packaging: maven-ear-plugin
- rar packaging: maven-rar-plugin
- par packaging: ?

`LifecycleMappings` http://maven.apache.org/ref/3.2.5/maven-core/default-bindings.html
`ArtifactHandlers` http://maven.apache.org/ref/3.2.5/maven-core/artifact-handlers.html

**Maven core should then get the lifecycle mappings and artifact handlers configurations from the plugin at the beginning of the build, before begin able to calculate the build plan**

---

**Sub-tasks:**
- [MNG-7832](https://issues.apache.org/jira/browse/MNG-7832) revert artifact handlers move to plugins

**Issue Links:**
- [MACR-30](https://issues.apache.org/jira/browse/MACR-30) Add LifecycleMapping and ArtifactHandler from maven-core to target packaging plugin
(_**"is blocked by"**_)
- [MEAR-198](https://issues.apache.org/jira/browse/MEAR-198) Add LifecycleMapping and ArtifactHandler from maven-core to target packaging plugin
(_**"is blocked by"**_)
- [MEJB-72](https://issues.apache.org/jira/browse/MEJB-72) Add LifecycleMapping and ArtifactHandler from maven-core to target packaging plugin
(_**"is blocked by"**_)
- [MJAR-183](https://issues.apache.org/jira/browse/MJAR-183) Add LifecycleMapping and ArtifactHandler from maven-core to target packaging plugin
(_**"is blocked by"**_)
- [MPLUGIN-275](https://issues.apache.org/jira/browse/MPLUGIN-275) Move LifecycleMapping and ArtifactHandler from maven-core to target packaging plugin
(_**"is blocked by"**_)
- [MRAR-55](https://issues.apache.org/jira/browse/MRAR-55) Add LifecycleMapping and ArtifactHandler from maven-core to target packaging plugin
(_**"is blocked by"**_)
- [MWAR-326](https://issues.apache.org/jira/browse/MWAR-326) Add LifecycleMapping and ArtifactHandler from maven-core to target packaging plugin
(_**"is blocked by"**_)
- [MPOM-337](https://issues.apache.org/jira/browse/MPOM-337) Load plugins containing lifecycle mapping/artifact handler with \true\
(_**"causes"**_)
- [MNG-8472](https://issues.apache.org/jira/browse/MNG-8472) Sort out the problem about packaging in Maven 4
(_**"causes"**_)
- [MPLUGIN-402](https://issues.apache.org/jira/browse/MPLUGIN-402) report: allow to generate usage section in plugin-info.html with \true\

- [MNG-7508](https://issues.apache.org/jira/browse/MNG-7508) Validate usage of \true\ on plugins

- [MNG-7572](https://issues.apache.org/jira/browse/MNG-7572) Plugin descriptor should indicate if plugin should be loaded as Maven build extension

- [MNG-7574](https://issues.apache.org/jira/browse/MNG-7574) Never expose Mojo classes via Core Classloader

- [MNG-7264](https://issues.apache.org/jira/browse/MNG-7264) Convert maven-core default-bindings.xml to Providers

- [MDEPLOY-71](https://issues.apache.org/jira/browse/MDEPLOY-71) DeployFile Mojo Does Not Handle Non-Core Artifact Types

0 votes, 7 watchers

Contributor guide

Open the contributing guide

Research direction

Start by reviewing Maven core's default-bindings and artifact-handlers configurations, then follow the linked packaging-plugin sub-tasks for jar, EJB, WAR, EAR, RAR, and Maven-plugin packaging. Done means packaging plugins provide their lifecycle mappings and artifact handlers, while Maven core loads them before calculating the build plan; the unresolved par packaging and MNG-7832 reversal also need resolution.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.