I'm using Eclipse Luna. I'm working on a Maven project. When I try to run my application on a weblogic's application server, and exception is thrown with the message:
weblogic.application.ModuleException: [HTTP:101027][WebAppModule(_auto_generated_ear_:MyAppName)] Document root: "D:\MGelbana\workspace\my-app-name\target\m2e-wtp\web-resources" does not exist.
I looked into the project's deployment assembly configuration and found the following error message: Cannot find entry: "/target/m2e-wtp/web-resources"
So I thought Luna's default Maven installation isn't what I need to I uninstalled it and I installed M2E-WTP from this URL (http://download.eclipse.org/m2e-wtp/releases/luna/) but I believe I ended up with the same version and same options.
I understand that this plugin has the option of generating this folder /target/m2e-wtp/web-resources
which helps Eclipse to deploy an application into an application server (Run on server
option)
(Which is my end goal but I'm having issues with deploying the application with it's needed dependencies. If I generate the application's WAR file by
Install
ing the maven project and deploying the generated that WAR manually, the application works, but I need to be able to debug\run it on the application server using Eclipse.)
But this folder (i.e. /target/m2e-wtp/web-resources
) isn't created !
In Eclipse's Maven > Java EE Integration > WAR project preferences > Maven archiver generated files under the build directory (I checked this option)
In the project-specific options, I only have a Maven menu and a Lifecycle mapping sub-menu and nothing to do with the maven archiver generating files or not !
So how can I direct maven to output the WTP related files ?
What is this web resources folder? target/m2e-wtp/web-resources/ is a folder containing automatically generated resources, that need to be deployed on the application server. These generated resources are : pom. properties and MANIFEST.
Summary. When developing a web application in eclipse, the default deploy path of java classes is “WEB-INF/classes” and every folder defined under WebContent is automatically deployed under the root path of the application.
I was struggling with the same issue for a couple of days. Ultimately the following steps worked for me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With