Description
This is a feature.
Bill of material module lists all the APIs, third-party libraries and Arquillian containers fit for particular release. The goal is to enable downstream users (and e. g. our test projects) to always have proper dependencies for microprofile APIs, third-party libraries like Jackson and Jersey and up-to-date container implementations driven by single input - the version of target Payara server.
General structure is following:
- Top-level module (
payara-aggregator) defines the versions as properties payara-bominherits those viaapi-parent⇾payara-aggregator- BOM defines the dependencies in
dependencyManagementsection - It is imported in
payara-nucleus-parentto make these entries available for the rest of the build
An artifact is put in BOM when: * It is Jakarta EE, Microprofile, OSGi or Java EE API that is compatible with the release * It is public artifact of the release (distribution, arquillian container) * It is major implementation component with many optional artifacts users may use (HK2, Jersey, Jackson, Hazelcast), or is frequently used separately in application e.g. for tests. * When BOM is available for such third-party component, entire BOM is imported
A BOM is to be used: * By the build itself * By users to refer to APIs, and e.g. Jackon and Jersey components that are not part of server * In import scope * It can be useful to support BOM as a parent to * Bring patched-externals repository into the project * Allow user to use version properties to import related artifacts * Control the versions by redefining properties (if they're feeling lucky)
Scopes are defined as provided for major aggregation apis - javaee-api, jakarta.jakartaee-api, microprofile. Arquillian containers are defined as test. Anything else is left at compile to keep user surprises at minimum (and to prevent the need at redefining scopes within main codebase).
The POM file is flattened to contain all relevant information from parent poms and be standalone -- check version in target/flattened-pom.xml or the one that gets installed into your local repo.
Testing
Testing Performed
[x] Clean build with empty repository [x] compare dependency trees of the project before and after the change (see deptree-diff.patch.gz) [x] make test application that imports a BOM and utilizes Arquillian (all containers) https://github.com/payara/Payara-Examples/pull/115 [ ] make test application that uses BOM as parent to utilize properties (i. e. TCK runner)
Test suites executed
Testing Environment
Zulu JDK 1.8_222 on Windows 10 with Maven 3.6.2 and constantly cleaned fish.payara.server.internal group in local Maven repo.
Documentation
[ ] T. B. D.
该提问来源于开源项目:payara/Payara