Eclipse and Maven-Wrapper

1.7k Views Asked by At

I try to build a project, which is using the Maven Wrapper. The build works fine on command line. There is also a plug-in for IntelliJ Idea. However, I haven't found any article, how to build such project with Eclipse.

Do you have an experience with project build by ./mvnw command instead of mvn in Eclipse, please?

2

There are 2 best solutions below

0
On

I know, my answer won't make happy these, that are still looking for a solution. I consulted the problem with team and since two years I use IntelliJ Idea. You can use community edition for free or commercial version for about 600 €. It depends on your situation. (Profis tend to not use Eclipse nowadays.)

1
On

As implied by the comment from LMC, the Java edition of Eclipse will come with the "m2e" plugin, which will automatically recognize a project with a pom.xml file as a Maven project, and it will automatically note the dependencies, download them, and compile your source code with those artifacts as dependencies.

That deals with dependencies and compilation. If your build is running unit tests with Surefire, or generating code with particular plugins, unless there is a specialized m2e connector for that plugin, Eclipse will not know to do that.

Inside Eclipse, if you need to run a Maven build, you don't need to care about "mvn" vs. "mvnw". Eclipse will have an embedded Maven installation.