Java – service modules without publishing do not work in Helios

I recently moved a webapp I was developing to a new machine running 64 bit eclipse Helios (service release 2). I am using Maven plug-in m2eclipse

I have deployed on the local Tomcat installation on eclipse, and everything is normal (more or less), but I want to select the "service module without publishing" option, but when I select this option, I will receive an error:

log4j:ERROR Could not read configuration file from URL [file:/C:/butterfly/svn/trunk/micro/src/main/webapp/WEB-INF/classes/log4j.properties].
java.io.FileNotFoundException: C:\butterfly\svn\trunk\micro\src\main\webapp\WEB-INF\classes\log4j.properties (The system cannot find the file specified)

log4j. The properties file is not there, just like the source directory in my life in Src / main / resources - after building it, it is copied to target / WEB-INF / classes /

Eclipse seems to mix the expected target directory with the SRC directory, so it cannot be found

I'm not sure if this only happens in the properties file, or if the same problem will occur, looking for all built resources

I have seen these problems:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=318449

http://www.eclipse.org/forums/index.php?t=msg&goto=661045&S=25bafd85b11e042c169ecf1752bfa479

But they seem slightly different or have been fixed (my Helios was a new download last weekend)

Has anyone experienced this or knows how to solve it?

Solution

Start here: "the serve module without publishing option completes what it says. Web content will be provided directly from the" webcontent "folder of dynamic web project. Custom context is used to make the dependencies of the project available in the class loader of web application" After building the project, I want eclipse to simulate serving each class / resource file (including log4j. Properties) from Web - inf / classes As a solution, how to create the "classes" folder in webcontent and copy log4j Properties file and see if the class loader is satisfied?

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>