How can I accomplish Maven goals from Eclipse without M2Eclipse?

I am using the eclipse plugin for maven to create eclipse projects from maven pom.xml files.

mvn -Dwtpversion=1.5 eclipse:eclipse 

This works great, and after some experimenting with several of the 400 different archetypes available, I decided to use the webapp-javaee6 archetype, which was the only one that created a set of dependencies that were accessible to everyone and that created a project that could be used with the WTP plugin.

Now the problem is that I would like to use mvn targets from eclipse. The accepted way to do this, I understand, is to use the m2eclipse plugin that I installed.

However, after I played a little and did not get anywhere, I found this comment in the .project file:

 <comment>NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse.</comment> 

Further search (see this long diatribe from October ) suggests me not (just) being stupid, not being able to get it to work.

Interconnected in the top answer, this question seems hopelessly outdated.

So the real question is: what is the correct way to use maven to create a WTP-friendly project that can be converted to eclipse and then use eclipse to invoke the goals of the project?

+4
source share
2 answers

Have you tried File -> Import -> Check existing Maven projects from SCM? I understand that m2eclipse will create an eclipse project for you. If the packaging defined in the pump is war, the project must be deployed using WTP. (The latter also required the maven-wtp-integration plugin, I don’t know if everything is in this case).

+2
source

Not sure about the WTP or maven artifacts, but did you end up in the SpringSource Tool Suite (Spring packed eclipse) and created a Spring Roo project? You can use this to create a data-driven web application in minutes. You can even remove Spring bit roo if you don't want this, this will give you a good starting point for a web application with very little pain.

0
source

All Articles