Search code examples
javaeclipsedeploymentweblogicear

Dependency from web module not deployed on Weblogic server 10.3.6 via Eclipse Kepler


So we have an Ear project (MyEar) that contains three modules:

  • Client module (let's call it MyClient)
  • EJB module (let's call it MyEjbModule)
  • Web module (let's call it MyWebModule)

The web module contains a jnlp file under MyWebModule/WebContent/MyApp.jnlp This jnlp directs to a needed jar file, which we want to deploy automatically with the app, and this is where we face some issues at the moment.

In eclipse, we set the MyWebModule project to deploy the jar file from some location to the root of the app (where the jnlp file is also deployed).

This works fine on one machine, and every time we publish the project to the server a fresh jar gets copied from the specified location. However, on another machine, the project deploys properly with everything but this jar, which we have to place with the jnlp file under WebContent for it to deploy (which means we have to manually update that jar everytime).

After a lot of research and trying to look for differences in the environments, we found a difference under the {workspace}/.metadata/.plugins/org.eclipse.core.resources/.projects/MyEar/beadep/my_domain/MyEar/ folder, which seems to be where Eclipse stages the EAR before publishing to the server

In the working deployment, everytime we publish our app we see an updated ear folder structure:

  • lib
  • META-INF
  • MyClient.jar
  • MyEJBModule.jar
  • MyWebModule.war

and the WAR folder of the web module contains the proper jar next to the jnlp file.

However, in the other machine, under that folder we see a folder named split_src that only contains a META-INF folder with a couple of descriptors and a file named .beabuild.txt

It's worth noting that when exporting the EAR project to an ear file, the jar gets copied properly and placed inside the ear like it should.

Does anyone have an idea why the differences in the beadep folder, and why the dependency isn't copied on one machine?


Solution

  • Ok, it turns out our two machines had a different "publishing mode" setting.

    I am not sure the exact reason for this, but if you set the server publishing mode to "Exploded Archive" the extra dependency is deployed properly into the web module, unlike in the virtual application (split source) publishing mode

    There is a little more information in this question