apache / apache/maven

[MNG-1388] Transitive Dependencies in a profile are not used

Open
#3,541 31 comments 1 reaction 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

**[Damian Bradicich](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=dbradicich)** opened **[MNG-1388](https://issues.apache.org/jira/browse/MNG-1388?redirect=false)** and commented

I have a jar project file that defines a dependency inside a certain profile. If I then include that project inside of another war project, the dependencies defined in the jar project's profile isn't getting transferred over to the war.

Ie we have this:
A depends on SQL or Oracle depending on profile
B depends on A.
If sql profile is active, I would expect that when I build B, it pulls
the transitive dependancy on sql from A.

---

**Affects:** 2.0

**Attachments:**
- [mng1388.pom](https://issues.apache.org/jira/secure/attachment/12961442/mng1388.pom) (_336 bytes_)

**Issue Links:**
- [MNG-4985](https://issues.apache.org/jira/browse/MNG-4985) Transitive dependencies with classifiers not resolved correctly
(_**"is duplicated by"**_)
- [MNG-4894](https://issues.apache.org/jira/browse/MNG-4894) Profile is ignored for dependencies
(_**"is duplicated by"**_)
- [MNG-5691](https://issues.apache.org/jira/browse/MNG-5691) Reopen MNG-1388
(_**"is duplicated by"**_)
- [MNG-4299](https://issues.apache.org/jira/browse/MNG-4299) dependency profile activation

- [MNG-4531](https://issues.apache.org/jira/browse/MNG-4531) Add option to use a profile of a dependency

- [MNG-3034](https://issues.apache.org/jira/browse/MNG-3034) Import a profile into a POM

- [MNG-4538](https://issues.apache.org/jira/browse/MNG-4538) dependencyManagament dependencies within profiles are not activated by settings.xml

26 votes, 30 watchers

Contributor guide

Open the contributing guide

Research direction

Start with the attached mng1388.pom and review the related issues MNG-4894, MNG-5691, and MNG-4299 to understand the prior conclusions. Verify the expected SQL/Oracle profile behavior when project A is consumed transitively by project B, then define a regression test and the resolved scope before making changes.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.