Injecting a bean from a different Jar in Weld

前端 未结 3 727
轮回少年
轮回少年 2021-01-04 00:43

I have two Jars A and B where A depends on B.

Jar B has a single class:

@ApplicationScoped
public class MyMa         


        
3条回答
  •  既然无缘
    2021-01-04 01:01

    I was having this exact same problem and I was able to get it figured out but I use an ear to combine the jars.

    Ear Layout

    project.ear
    |-- META-INF 
    |      |-- MANIFEST.MF
    |      |-- application.xml*
    |-- one.jar (bean archive)
    |      |-- META-INF
    |      |      |-- beans.xml
    |      |-- 
    |-- two.jar (ejb)
    
    • application.xml

    
      test-application
      
        two.jar
      
      
        one.jar
      
    
    

    Doing that it made one.jar available to two.jar in the container.

    -kurt

提交回复
热议问题