I created a Java project that will be used as a library for other projects, which will reduce code duplication between projects. This lib project is exported to jar for inclusion in web projects (WAR, not EAR).
In web projects (where these classes are deleted) everything works as usual, while all classes are stored on them; ─ injection of simple and complex objects (with manufacturers and settings) works fine.
After removing these classes of web projects and adding jar with the same classes to web projects (installing this library in pom.xml in Maven projects), everything compiled fine as before. But when starting the server, the classes (CDI beans) present in the bank are not detected by the container when starting CDI, generating this (known) error:
WELD-001408: Unsatisfied dependencies for type Session with qualifiers (...)
Beans.xml has already been added to the META-INF folder both in the src / main / resources file (specified in the WELD and CDI documents) and in the project root folder.

The following are examples of beans (Session, SessionFactory, and ExampleLogger) presented in the bank that should be added to other projects (and worked fine when the class was in web projects), but now no CDI is detected:
public class HibernateConnectionFactory {
@Produces
@ApplicationScoped @ConnectionBaseExample
public SessionFactory createSessionFactoryExample() {
Configuration configuration = new Configuration();
configurarSessionFactory(configuration, "baseExampleDS");
ServiceRegistry registry = new StandardServiceRegistryBuilder().applySettings(configuration.getProperties()).build();
return configuration.buildSessionFactory(registry);
}
@Produces
@RequestScoped @ConnectionBaseExample
public Session createSessionExample(@ConnectionBaseExample SessionFactory sessionFactory) {
return sessionFactory.openSession();
}
public void destruirSessionExemplo(@Disposes @ConnectionBaseExample Session session) {
if (session.isOpen()) {
session.close();
}
}
}
public class ExampleLoggerProducer {
@Produces
public ExampleLogger createLogger(InjectionPoint injectionPoint) {
return new ExampleLogger(injectionPoint.getMember().getDeclaringClass());
}
}
Maven, , Maven. - ? - , beans, , ? .
Java EE7, CDI 1.1, WELD 2.1, WildFly 8.1