Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Differences in NetBeans and Eclipse for maven projects [closed]

What are the differences between Netbeans and Eclipse for working with maven projects?

like image 637
rk2010 Avatar asked Apr 16 '12 14:04

rk2010


People also ask

What is the difference between NetBeans and Eclipse?

Apache NetBeans is geared primarily toward Java, C, C++, Python, PHP and HTML development. Eclipse is primarily designed for Java projects, but it supports more than two dozen languages in its plugin ecosystem. Eclipse also provides support for C# and R, which NetBeans does not cater to as much.

Is Eclipse better than NetBeans?

NetBeans and Eclipse Java IDEs both offer excellent debugging capabilities, open-source coding, plugins, and extensions. NetBeans is easier to learn and has more features out of the box than Eclipse, but Eclipse can handle larger projects and is more customizable.


5 Answers

I'm Eclipse user, but to be perfectly honest I have to say that Maven support in Eclipse isn't perfect and often cause weird errors you resolving by cleaning, recompiling, regenerating project files etc.

As far as I know, IDEA and NetBeans have far better support for Maven.

like image 125
Michał Kalinowski Avatar answered Oct 18 '22 02:10

Michał Kalinowski


NetBeans has native support for Maven.

What does that mean exactly? It means that if you have a Maven-based project in NetBeans then the pom.xml is what the IDE uses for project definition. The POM is the definition!

Contrast this with Eclipse where Maven support is bolted on top of Eclipse's project definition. This means that any Eclipse solution will have to concentrate on converting to/from Eclipse's own project definition and the POM. I believe this is the root cause of Eclipse's sometimes-less-than-optimal Maven support.

In NetBeans, if your project is Maven-based, then all actions are carried out by Maven. Even the "run" action is effectively done by Maven. The IDE only triggers it. Having this consistency means that you can be sure that your project behaves exactly the same for example if in a non-IDE environment such as a Jenkins/Hudson.

I've met many people who believe that Maven is cumbersome. When you talk some more about it turns out that their bad experience to a large extent comes down to their experience with Maven from within Eclipse, not so much Maven itself. Users of Eclipse tend to think that this is just the way it is supposed to be because they've never seen anything else. (NetBeans users do the same in the opposite direction in the areas where NetBeans is sub-optimal and Eclipse shines)

Let there be no doubt: Eclipse has MANY virtues. Maven support is not one of them.

like image 37
peterh Avatar answered Oct 18 '22 04:10

peterh


Starting on an maven based project is much more easier in Netbeans and IDEA than using Eclipse.

  • in Eclipse, you have to configure your existing project to use maven. Starting by enabling a appropriate maven plugin
  • using Netbeans and maven is much more easier. Open -> Projekt -> select the pom.xml and you are ready
  • IDEA has a similar approach. You simply have to import a the project from the existing pom.xml

I have chosen IDEA as my favorite IDE and I'm quite happy with the maven support. Sometimes I have to open NetBeans and at least the maven support works as expected. My own experiences with Eclipse are a little bit outdated but I hear a lot of complaints from my colleagues using Eclipse together with maven.

like image 33
magomi Avatar answered Oct 18 '22 03:10

magomi


m2e is the "latest" maven eclipse integration (not to confuse with the old m2eclipse). I really thank all people who spend their time in developing eclipse, maven and m2e - it's my daily work setup, but m2e is far from perfect. Just have a look at the latest "M2E plugin execution not covered" dilemma. If you use non mainstream plugins you have to modify your pom.xml for the m2e usage - just to avoid project errors in eclipse.

To run my mave commands I prefer the command line instead m2e.

As I know Netbeans uses maven more "native" and therefore has not that kind of integration problems. But I am not sure about it. If you have the choice you should compare both possibilities.

like image 42
FrVaBe Avatar answered Oct 18 '22 02:10

FrVaBe


I've used both Eclipse and Netbeans. I've used Eclipse more at the university, and professionally it was mixed between Eclipse and Netbeans.

Eclipse is far better than Netbeans depending on the domain. If you want to work with scala - no other way, eclipse scala plugin is heavily maintained and works much better than Netbeans. If you want to work with perl, same thing. If you have a massive project with more than 50 large modules and need to do cross cutting refactoring, you are faster with mvn eclipse:eclipse on your root pom, and leting eclipse import and build the project, and then starting with your refactoring.

With that said, when you are doing feature development. And your base project is built in the CI by maven. Oh! Then I can promise you, Netbeans is light years better than eclipse. They are not in the same league when you add maven as the build tool into the equation.

With eclipse, you have to give in and say: - It is beyond me I let eclipse work as my own built tool and I keep away from the command line. If I even go to a folder and do mvn clean install, eclipse with fight against me.

With netbeans, he just does not try to re-invent the wheel. He lets maven do what maven does, and build your project. It runs your tests with surefire.

In my personal opinion, for Java EE development - namely adding features and "NOT" doing cross cutting massive refactoring and your project is built on maven, Netbeans is by far the best IDE. It is perfect. It is simplicity in itself. A simple and confortable user interface. A perfect debugger. Perfect JSF to bean navication. Perfect maven integration. Perfect colaboration with Jrebel. Netbeans is simple and super effective.

I've found Eclipse to be my enemy, when i want to use maven to run all unit tests or for wahtever reason. If I want to deploy a WAR built by maven ... better not! I need to absolutely give myself into eclipse and let it own everything. I need to keep well away from a command line.

like image 20
99Sono Avatar answered Oct 18 '22 04:10

99Sono