-
Notifications
You must be signed in to change notification settings - Fork 301
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PAYARA-3924: Payara BOM #4320
PAYARA-3924: Payara BOM #4320
Conversation
Previously mvn validate would fail, because it depended on install phase to be executed.
Before moving the parent relationships had to be cleared. API modules now depend on aggregator as parent. Aggregator contains all the version properties shared by BOM and any downstream modules.
Add explicit jakarta dependency to openprofile, so that javax.interceptor package is always reachable
Flatten plugin removes parent, and merges all parent properties into this POM. Moved default configuration to root pom, as well as patched externals repo. Payara version is interpolated and also distributed as fixed string. Removed developers from api module, as top level ones should be used.
Aggregate APIs are marked as provided to prevent their deployment in user app. Individual APIs are left for user to handle on his/hers own. Also removed duplicate dependency declaration for jakarta.el
I'll build up examples inhttps://github.com/payara/payara-examples, already the first steps look promising: With minimal pom like:
We can already see the the value:
Note, that the versions of imported microprofile API do not match those of microprofile 3.0, but those of Payara Server (rest-client 1.3.4, jwt-auth 1.1.payara-p1. |
Adding arquillian container we see jersey version is overriden to match server (Hooray!):
|
Moved parts of build configuration into top-level pom so that API don't need to depend on nucleus-parent.
Jenkins test please |
HK2 BOM includes asm with uninterpolated version, so it's better to explicitly redefine it here.
Jenkins test please |
d03ebbb
to
09d36ac
Compare
Jenkins test please |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems to now work against my test (MicroProfileOnMicro - see Payara Examples PRs)
I've also checked that the javadoc and source still generate correctly after the pom shuffles
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:
payara-aggregator
) defines the versions as propertiespayara-bom
inherits those viaapi-parent
⇾payara-aggregator
dependencyManagement
sectionpayara-nucleus-parent
to make these entries available for the rest of the buildAn artifact is put in BOM when:
A BOM is to be used:
Scopes are defined as
provided
for major aggregation apis -javaee-api
,jakarta.jakartaee-api
,microprofile
. Arquillian containers are defined astest
. Anything else is left atcompile
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) payara/Payara-Examples#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.