Have to admit i was not able to run it with your java command since a fatjar is not created - probably where the confusion came from. Looks like it is cause you defined twice jar plugin and copy dependencies to install instead of prepare-package (note that dependency plugin is also duplicated). Issue is fixed on master (1.2.10-SNAPSHOT). Comes from a wrong url matching (file:// vs jar:file://)
Romain Manni-Bucau @rmannibucau <https://twitter.com/rmannibucau> | Blog <https://rmannibucau.metawerx.net/> | Old Blog <http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> | LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book <https://www.packtpub.com/application-development/java-ee-8-high-performance> Le ven. 23 oct. 2020 à 02:41, Karl Kildén <[email protected]> a écrit : > As I wrote, no fat jar just a lib dir. Can put in beans.xml. But since the > rest service is scanned it seems weird. Usually no beans if beans.xml > > tors 22 okt. 2020 kl. 22:33 skrev Romain Manni-Bucau < > [email protected]>: > >> Fatjar has a lot of pitfalls and one being to break cdi. >> Ensure you have a beans.xml and that the filter is scanned maybe. >> >> Le jeu. 22 oct. 2020 à 22:18, Karl Kildén <[email protected]> a >> écrit : >> >>> Hello again, >>> >>> Using this example project -> I want to make an example with a >>> WebFilter. Calling it "MyFilter" and it resides in the same package as the >>> rest endpoint. >>> >>> Reproducer below: >>> https://github.com/karlkilden/openwebbeans-meecrowave-examples >>> mvn install >>> cd /rest-trivial/target >>> java -jar samples-rest-trivial-1.2.8-SNAPSHOT.jar -http=9090 >>> >>> During maven install, the test works and the print outs from the Filter >>> can be seen. When running from intellij or with maven exec it works too. >>> But when running as above the WebFilter is not picked up. The pom is >>> configured to create a lib dir under target and it uses Cli as main. Works >>> fine for e.g. the port config and for the rest-endpoint. So was really >>> expecting the filter to work >>> >>> I cannot figure out why >>> >>> Cheers >>> Karl >>> >>
