lhotari opened a new pull request #9882:
URL: https://github.com/apache/pulsar/pull/9882


   ### Motivation
   
   Currently the Maven build lacks some dependency order information and it 
requires special handling to build specific modules. The build should support 
specifying the module with the `-pl` attribute and by passing `-am`, maven 
should be able to determine what has to be built.
   
   For example, it is useful to be able to build the distribution in one go:
   ```
   mvn -pl distribution/server -am install -DskipTests
   ```
   This currently completes, but it won't bundle Pulsar SQL into the 
distribution, which is expected.
   This PR fixes this issue and some other Maven module build order issues or 
inconsistencies.
   
   The above is only one example of the motivation. The actual motivation is 
the [PIP draft "Changes to GitHub Actions based Pulsar 
CI"](https://docs.google.com/document/d/1FNEWD3COdnNGMiryO9qBUW_83qtzAhqjDI5wwmPD-YE/edit).
 The current prototype of the refactored build depends on the changes in this 
PR. 
   
   ### Modifications
   
   - add dependencies in distribution builds so that the modules get built
     in the correct order
     - build the server distribution by default with pulsar-presto-distribution 
since that is the expected result.
     - allow building the distribution without pulsar-presto-distribution when 
core-modules is active
   
   - modify `src/check-binary-license` script to allow skipping Pulsar SQL 
checks
     - this is preparation for a build without Presto / Pulsar SQL
   
   - consistently exclude transitive dependencies from the provided 
dependencies that
     have been added to impact build order.
     - this has mainly an impact with `maven-assembly-plugin` which will include
       the transitive dependencies of a `tar.gz` or a library dependency unless 
the transitive dependencies are excluded explicitly. Excluding the library 
alone in the assembly descriptor doesn't seem to exclude the transitive 
dependencies.
   
   - add `skipDocker` and `skipIntegrationTests` profiles which enable
     processing all other modules except docker or integration test modules
     - this is preparation for CI build to ensure that we don't miss running 
some
       unit tests in some module.
   
   - fix running the backwards compatibility tests that are part of 
`tests/bc_*` modules
     - it's unclear how these are run currently. Perhaps they run in all 
integration test
       runs. This removes the possible duplication.
   
   - Improve the docker profile so that it's possible to build 
`tests/docker-images/*` modules
     without activating integration tests


----------------------------------------------------------------
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:
[email protected]


Reply via email to