I have a very strange problem with Maven and the Eclipse WTP. I have a multi-module project, let\'s call it project
. It consists of two modules project-base
I was just having the same problem. Upgrading m2e to version 1.2 fixed it.
If that folder is an exploded JAR (so it is like a JAR file, but appearing as a folder, not archived), in my case it was a server connector issue.
Although I use JBoss instead of Tomcat, this might be helpful for others struggling with this problem.
Provided you have the latest JBoss Tools installed on your Eclipse, you can double-click the server in Server view to open the settings.
On Deployment tab, you can select Zip Module Yes/No for each project. When I selected YES for my utility jar files, JBoss then deployed the dependency as a normal JAR file instead of a folder.
I ultimately solved my problem: I had problems with the properties section Deployment Assembly for the project-base
project. I could not save it, as Eclipse mentioned, the current page does contain errors.
I then looked into the settings file .settings/org.eclipse.wst.common.component
. It was completely empty (I don't know why). I then added the following block:
<?xml version="1.0" encoding="UTF-8"?>
<project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="project-base">
<wb-resource deploy-path="/" source-path="/src/main/java"/>
<wb-resource deploy-path="/" source-path="/src/main/resources"/>
</wb-module>
</project-modules>
After this, the settings page is accessible again and the JAR is assembled correctly. Workspace resolution does work, too.
I solved the problem by deleting the dependency in the "Deployment assembly" project settings page and adding it back.