“Module name is invalid” when exporting an existing eclipse project to a war file

天大地大妈咪最大 提交于 2019-12-03 10:58:22
Aneurysmo

I had the same issue, and I fixed it. Please follow the steps below, and you can create your war file.

  1. Right-click on folder project.
  2. Click on properties.
  3. Go to project facets.
  4. Activate, if necessary.
  5. Scroll down to Configuration and mark Dynamic Web Module.

This works for me.

you must be sure your project is a Web Project, if it's not a Web Project check this link: http://eclipse.dzone.com/tips/converting-java-project-dynami

Oleg Kranga

In Eclipse STS

  1. Right-click on folder project.
  2. Click on properties.
  3. Go to project facets.
  4. Choose your Java 1.8
  5. Scroll down to Configuration and mark Dynamic Web Module.

After that, it works fine.

In my case error went off when the war file name matched the project name of the eclipse. Its easy to choose one from the drop down box.

I am not sure about the exact cause. But this gets resolved most of the times if you give the exporting project war file name just same as the project name in the IDE

When I converted my java project onto dynamic web project using eclipse for EE developers, I encountered this. Then I made a whole new dynamic web project and copied all my source files to it, and I was able to export a war file easily.

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