2 Replies Latest reply on Apr 17, 2015 4:32 AM by Jozef Hartinger

    Bootstrap Weld SE for Nested JARs

    Thilo Tanner Newbie

      Hi all,


      I'm currently trying to build a Java EE prototype counterpart to Spring Boot. At the moment I'm struggling to properly bootstrap Weld SE. I played around with several ways to package the app, but so far without success. Creating a shaded JAR doesn't work, because Weld will scan all classes which leads to other issues. So I decided to give "Nested JARs" a try (same format and Maven plugin as Spring Boot is using). This works, except that Weld SE cannot load the nested JARs properly:

      WELD-ENV-000031: The bean archive reference /path/to/application.jar!/WEB-INF/lib/deltaspike-core-api-1.3.0.jar cannot be handled by any BeanArchiveHandler: [org.jboss.weld.environment.deployment.discovery.FileSystemBeanArchiveHandler@50b0636c] [main]

      Before I re-create the bootstrap process in my code (similar to the Weld() class) and try to make  FileSystemBeanArchiveHandler work with nested JARs, I thought I ask in the forum if there is a smarter way to load extensions from nested JAR files. Would it help, if I package my app as a WAR?

      Thanks and best,