Skip to content
Advertisement

Interface CDI wildfly external projects

So my idea is to have 3 projects:

  1. com.tests.interfaces
  2. com.tests.services
  3. com.tests.schedulers

com.tests.interfaces basically is:

JavaScript

com.tests.services is:

JavaScript

I am deploying the “services” project and it works fine using wildfly 24.0.0. Then I am trying to have another .war project called: com.tests.schedulers which looks like this:

JavaScript

But it cant be deployed and this is the relevant part of wildfly’s (same server to all .wars) output:

JavaScript

What am I missing or doing wrong?

Advertisement

Answer

You cannot refer a class in one WAR from a class in another WAR (unless both are in the same EAR).

This is by design!

Note that you can have all your projects in separate JAR files which are put in the same WAR file which then share their classpath when deployed. This is how it is typically done. Either convert your projects to Maven projects and refer to artifacts, or have your IDE help you create the single WAR.

Advertisement