matriv opened a new pull request, #19472:
URL: https://github.com/apache/flink/pull/19472

   `.scalafmt.conf` resides on the root directory, so for the other
   modules to find it we need to use the `rootDir` property which is
   set by the `directory-maven-plugin`.
   
   Previously, the `directory-maven-plugin` goal to set this property
   was bound to `initialize` phase, and the `spotless:check` to `validate`
   phase which comes before `initialize` and therefore the `rootDir`
   property was not available.
   
   Bind the `directory-maven-plugin` goal to `validate` which is the 1st
   phase in the maven lifycycle, and bind `spotless:check` to the
   `process-sources` phase which anyway makes more sense. This way users
   can run `mvn test, mvn clean install, mvn verify`, etc. from within any
   module and still be able to run also the bound `spotless:check` goal.
   
   This way, the only downside of introducing the `scalafmt` is that if a
   user wants to run `spotless:check/spotless:apply` autonomously inside
   any module, he/she just needs to prefix it with the `validate` goal
   which sets the `rootDir` property, i.e.:
   `flink/flink-table/flink-table-planner$ mvn validate spotless:apply`
   
   Follows: 3ea3fee5ac996f6ae8836c3cba252f974d20bd2e
   Follows: #19025
   


-- 
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