I have a multi-module java / maven application that I'd like to run on openliberty in dev mode (mvn liberty:dev). The application is structured as follows:
root
\ejb
\ear
OpenLiberty is looking for dependencies in the \ejb\target\classes folder on application startup but not finding the dependencies because they are not there. However, they do exist in the \ear\target\classes folder.
I think liberty should be looking in \ear\target\classes for its dependencies. This is because the maven build compiles them into the ear, not the ejb jar.
I assume the correct fix for this is to tell liberty (somehow) where to find the application dependencies (that live in \ear\target\classes not \ejb\target\classes).
Does this sound like the correct fix and does anyone know how to tell liberty to look for the dependencies in the correct location?
As a side note, I am getting the message
[WARNING] CWWKM2179W: The application is not defined in the server configuration but the POM configuration indicates it should be installed in the apps folder. Application configuration is being added to the target server configuration dropins folder by the plug-in.
On openliberty startup.
This is even though the absolute path to the ear file is specified in server.xml in the ear file like so:
<enterpriseApplication id="my-app"
type="ear" location="C:\Users\ absolute path to my app"
name="my-app" contextRoot="/" />
I am additionally wondering if this log warning might be related to the trouble I'm having.
Here is an example of the messages I am getting on startup:
[INFO] [WARNING ] SRVE9967W: The manifest class path myjar-SNAPSHOT.jar can not be found in jar file file:/c:/my-app/ejb/target/classes/ or its parent.
If it looked in
file:/c:/my-app/ear/
I think I'd be good.