Why does the WTP plugin deploy one Maven dependency as a folder, instead of a jar?

我只是一个虾纸丫 提交于 2019-12-03 05:59:08

I solved the problem by deleting the dependency in the "Deployment assembly" project settings page and adding it back.

abinet

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!