jjkester opened a new pull request #603:
URL: https://github.com/apache/maven/pull/603


   The goal of [MPH-183](https://issues.apache.org/jira/browse/MPH-183) is to 
print via which BOM(s) a dependency got in the effective POM.
   
   This information was previously not available to the help plugin. This MR:
   
   - introduces a change to the `InputSource` model to keep a hierarchy of 
sources (which are POM files) by tracking the POM that imported it
   - tracks dependencies through different dependency management imports, 
setting the hierarchy of sources on the `InputSource` objects
   
   For now, this code has been written under the assumption that a BOM 
hierarchy (at least at the point the dependency management blocks are imported) 
is tree-shaped, without diamonds. That is, given a project `P` with dependency 
`D`, importing BOMs `A` and `B`, BOM `C` with dependency `D`, only `A` or `B` 
(not both) can import `C`.
   
   - [ ] Check assumption
   
   If such a structure would be possible, the end result may be incorrectly 
represented as `C via B via A`, which is not correct, because there is no 
direct relationship between `A` and `B`.
   
   Furthermore, at the moment the original `InputSource` of the file is 
mutated. This makes the hierarchy valid for all imported dependencies, and 
potentially other parts of the effective POM. This may not be desirable. A 
relatively minor change, replacing `InputSource` objects that are about to be 
mutated, would solve this issue. In case updating the original `InputSource` is 
desirable, there _may_ be a better place to set it.
   
   - [ ] Check solution strategy
   
   Any input on the above points is highly appreciated.
   
   A pull request for the changes in maven-help-plugin will follow.
   
   ---
   
   Following this checklist to help us incorporate your 
   contribution quickly and easily:
   
    - [ ] Make sure there is a [JIRA 
issue](https://issues.apache.org/jira/browse/MNG) filed 
          for the change (usually before you start working on it).  Trivial 
changes like typos do not 
          require a JIRA issue.  Your pull request should address just this 
issue, without 
          pulling in other changes.
    - [ ] Each commit in the pull request should have a meaningful subject line 
and body.
    - [ ] Format the pull request title like `[MNG-XXX] - Fixes bug in 
ApproximateQuantiles`,
          where you replace `MNG-XXX` with the appropriate JIRA issue. Best 
practice
          is to use the JIRA issue title in the pull request title and in the 
first line of the 
          commit message.
    - [ ] Write a pull request description that is detailed enough to 
understand what the pull request does, how, and why.
    - [ ] Run `mvn clean verify` to make sure basic checks pass. A more 
thorough check will 
          be performed on your pull request automatically.
    - [ ] You have run the [Core IT][core-its] successfully.
   
   If your pull request is about ~20 lines of code you don't need to sign an
   [Individual Contributor License 
Agreement](https://www.apache.org/licenses/icla.pdf) if you are unsure
   please ask on the developers list.
   
   To make clear that you license your contribution under 
   the [Apache License Version 2.0, January 
2004](http://www.apache.org/licenses/LICENSE-2.0)
   you have to acknowledge this by using the following check-box.
   
    - [ ] I hereby declare this contribution to be licenced under the [Apache 
License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0)
   
    - [ ] In any other case, please file an [Apache Individual Contributor 
License Agreement](https://www.apache.org/licenses/icla.pdf).
   
   [core-its]: https://maven.apache.org/core-its/core-it-suite/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to