mthmulders opened a new pull request #351:
URL: https://github.com/apache/maven/pull/351


   While working on the _resume_ feature (#342) I noticed that the 
[`MavenCli#populateRequest` 
method](https://github.com/apache/maven/blob/c6c7311713b0d60e445b2ffe32c5588791edf7ac/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java#L1322)
 is very long and a bit unstructured. It follows all types of patterns for 
parsing and processing command line arguments and populating the 
`MavenExecutionRequest`.
   
   I've refactored this method step-by-step. Hence there are a lot of 
small(ish) commits but I hope this makes it easier to review the changes and 
verify they don't break anything. The method itself is not easily testable so I 
couldn't rely on that. Where possible I created a few unit tests.
   
   There are some bits & pieces left:
   
   * The `determineProjectActivation` and `determineProfileActivation` methods 
are very much alike. We could merge them but it would lose quite some 
semantics, so I initially decided not to do so.
   * The `determineLocalRepositoryPath` only uses information from the 
`MavenExecutionRequest` itself. I wonder if we could move it into the 
`DefaultMavenExecutionRequest`, but I'm unsure where / how exactly.
   
   ## Checklist
   
   - [ ] ~~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.~~
   - [X] 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.~~
   - [X] 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. **working on this**
   
   I have signed the Individual Contributor License Agreement, and my employer 
signed the Corporate Contributor License Agreement.
   
   [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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to