This project is a minimal sample reproducing the following issue :
ServletContainerInitializer ignored by Tomcat if in a jar prefixed by "spring" or "google" (or other names from default exclusion list)
when a jar in the classpath contains a web-fragment.xml with ordering set to "before others".
- In the parent project jar-scanning-issue :
mvn clean install -P!ko
- In the webapp project :
mvn tomee:run
In the output you should see these 3 lines outputed by the 3 jars :
################### always-working-name jar Initializer
################### Google Named Jar Initializer
################### Spring Named Jar Initializer
- In the parent project jar-scanning-issue :
mvn clean install
- In the webapp project :
mvn tomee:run
In the console outputs you should only see these 2 lines:
################### always-working-name jar Initializer
################### jar-web-fragment (ordering before others) Initializer
The google and spring nameds jars ServletContainerInitializer
are not called.