Can Eclipse import a Maven Web project as a “Dynamic Web Application”?

后端 未结 3 1155
小蘑菇
小蘑菇 2020-12-28 18:19

High Level Goal: Create a single Maven Web Application project that can be used correctly in both Netbeans and Eclipse

When converting a Maven proje

相关标签:
3条回答
  • 2020-12-28 18:42

    I have had better luck with the m2eclipse plugin from Sonatype. When I started, I made the mistake of trying to use both m2eclipse and the eclipse:eclipse goal. They don't do exactly the same thing, so if you install the plugin, stop doing mvn eclipse:eclipse. Anyway, it has worked very well for me with single web projects and very well with multi-project reactor style projects as well.

    The only problem I've had is with trying to deploy a war file to a server configured in eclipse if that war file is built with an overlay, but that doesn't seem to be an issue for you.

    0 讨论(0)
  • 2020-12-28 19:00

    m2e-wtp plugin does this automatically, as stated here: Import Existing Maven in Eclipse as WTP

    All facets, source folders etc will be correctly set after import.

    https://www.eclipse.org/m2e-wtp/

    0 讨论(0)
  • 2020-12-28 19:02

    As suggested by jhericks ,if you use m2eclipse , you don't need to use eclipse:eclipse goal. What the eclipse:eclipse goal does can also be done by the m2eclipse.

    To convert a project to the Dynamic Web Application , you can configure the Project Facets options in your project properties

    enter image description here

    0 讨论(0)
提交回复
热议问题