Skip to content
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

Support layer exclusion #78

Open
fabrii opened this issue Jun 17, 2024 · 2 comments
Open

Support layer exclusion #78

fabrii opened this issue Jun 17, 2024 · 2 comments

Comments

@fabrii
Copy link

fabrii commented Jun 17, 2024

It would be nice to support layer exclusion on WildFly Glow CLI.

In certain cases, some layers are added because of classes that are present (but not used) in dependencies.

For example, primefaces library adds the "jpa" layer while infinispan-cdi-embedded-jakarta adds the "micrometer" layer.

More info: https://groups.google.com/g/wildfly/c/nhbrC82ZUlg

./wildfly-glow scan --provision=SERVER --add-ons=metrics examples/custom.war
Wildfly Glow is scanning...
context: bare-metal
enabled profile: none
config stability: community
galleon discovery
- feature-packs
   org.wildfly:wildfly-galleon-pack:32.0.1.Final
- layers
   ee-core-profile-server
   microprofile-health
   jaxrs
   microprofile-rest-client
   jsf
   jpa
   micrometer
   metrics
   microprofile-telemetry
 ./wildfly-glow scan --provision=SERVER --add-ons=metrics --exclude-archives-from-scan=primefaces-*.jar examples/custom.war
Wildfly Glow is scanning...
context: bare-metal
enabled profile: none
config stability: community
galleon discovery
- feature-packs
   org.wildfly:wildfly-galleon-pack:32.0.1.Final
- layers
   ee-core-profile-server
   microprofile-health
   jaxrs
   microprofile-rest-client
   jsf
   datasources --> Notice that JPA is gone but now datasources is detected. I am 100% sure the 'datasource layer' is not used by my application, but I dont know which dependency is adding it
   micrometer
   metrics
   microprofile-telemetry
./wildfly-glow scan --provision=SERVER --add-ons=metrics --exclude-archives-from-scan=primefaces-*.jar,infinispan-*.jar examples/custom.war
Wildfly Glow is scanning...
context: bare-metal
enabled profile: none
config stability: community
galleon discovery
- feature-packs
   org.wildfly:wildfly-galleon-pack:32.0.1.Final
- layers
   ee-core-profile-server
   microprofile-health
   jaxrs
   microprofile-rest-client
   jsf
   datasources
   metrics
   microprofile-telemetry

Now micrometer is out.

@jfdenise
Copy link
Contributor

@fabrii , thank-you.
Perhaps something to look at in your datasources case is the WildFly Glow documentation, in particular this piece:
https://docs.wildfly.org/wildfly-galleon-feature-packs/#_galleon_layers_and_associated_discovery_rules
you can find what we are looking for for datasources.

@jfdenise
Copy link
Contributor

jfdenise commented Jun 18, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants