Giovds opened a new pull request #701: URL: https://github.com/apache/maven/pull/701
This PR introduces a new class `ProjectSelector` which contains logic around getting projects based on selectors. This logic was moved from the `DefaultGraphBuilder` in order to make it re-usable for `MavenDefault`. Since the `ProjectSelector` is not going to be used in many other cases, and it is relatively lightweight, it was left out of DI intentionally. The reason for moving this logic is to be able to make use of just the optional active and inactive selectors logic, without having to rebuild the graph again. It is quite a big PR for an extra info log statement however, in order to function the same as optional profiles it also has to change some of its behaviour around resolving optional projects. Which is described in [MNG-7444](https://issues.apache.org/jira/browse/MNG-7444). Which breaks on [this line](https://github.com/apache/maven/blob/e85ff889b333b82da20b988fbb42bdbfdb814545/maven-core/src/main/java/org/apache/maven/graph/DefaultGraphBuilder.java#L231). E.g. with this PR whenever the following command will work as expected `mvn compile -pl ?:non-existing,?:existing`. By reporting the `non-existing` could not be found and by only building the `existing` as it would normally. Also fixes [MNG-7444](https://issues.apache.org/jira/browse/MNG-7444) --- Following this checklist to help us incorporate your contribution quickly and easily: - [x] Make sure there is a [MNG-7443](https://issues.apache.org/jira/browse/MNG-7443) 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. - [x] Each commit in the pull request should have a meaningful subject line and body. - [x] Format the pull request title like `[MNG-XXX] SUMMARY`, where you replace `MNG-XXX` and `SUMMARY` 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. - [x] 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) - [x] 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: issues-unsubscr...@maven.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org