apache / apache/maven

[MNG-2751] Resource inheritance isn't additive

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

Description

**[Jason Melnick](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=jmaelstrom)** opened **[MNG-2751](https://issues.apache.org/jira/browse/MNG-2751?redirect=false)** and commented

I have an inheritance model as such:

Parent_POM (General dependencyManagement, pluginManagement, etc)
|-->Base_POM (global dependency inclusion, default goal, default plugins, etc)
|-->Artifact_POM (declares specific artifact type functionality, resources, profiles, etc)
|-->Project_POM (project specific dependencies, resources, etc)

I am attempting to create an hierarchy that will enable a new project to get up and running with very little modification. The issue I am having is if build.resources are declared in the Project_POM they are wiping the Artifact_POM's declarations.

I think that resources should always be additive. If nothing else add an \ tag a la the plugin element's \ tag. In lieu of that perhaps a resourceManagement section that exposes resource id's that could be selectively added by the child...

---

**Affects:** 2.0.4

**Issue Links:**
- [MNG-5054](https://issues.apache.org/jira/browse/MNG-5054) parent pom and it's children
(_**"is duplicated by"**_)
- [MNG-2027](https://issues.apache.org/jira/browse/MNG-2027) Document POM inheritance
(_**"is superceded by"**_)

16 votes, 21 watchers

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.