Why do I need maven?

Hello, I would very much like to know, I have reviewed and reread a lot, but I can't understand it. Why do you need Maven, if there is an IDE-Eclipse, Netbeans, etc.? What is its advantage in builds, if the IDE can handle it?

Author: Nofate, 2017-02-16

2 answers

Not quite a correct question, you can't compare Maven and development environments. You can also work with Maven without development environments. Why do you need it? For dependency management, for building projects, and for a bunch of other useful stuff. For example, you write a large project and use a lot of technologies in it, for example, Hibernate, JUnit. The question arises how to connect all the libraries? The answer is simple - just write the dependencies in pom.xml, and maven will download them for you. Then the following situation is possible, you if you want to show the project to a friend, you send it to him, but here's the problem, if it's not a Maven project, then your friend will have to download libraries to make the project work, and so Maven will do it for him.With the growth of your projects - you yourself will appreciate the advantages of Maven. IDEs can handle it - and if there is no IDE on your computer?What are you going to do? Maven comes to the rescue, it is cross-platform and the command line is enough to work with it.

 7
Author: bsuart, 2017-02-16 19:26:25

The IDE can build a project, but each one does it differently-it uses a different version of java, encoding, project structure, external libraries are located in different places and may have different versions.

Maven and other build systems are used to unify this process. They have a number of advantages:

  • they are used to specify the library versions, and what is not unimportant, the system knows where to get them from.
  • has a well-established project structure, this allows you to avoid there is no confusion and it is easier to find what you need.
  • has a specific set of steps - compilation, testing, packaging, and so on.
  • ability to customize the build process by adding additional steps
  • the build does not depend on the IDE, operating system, etc., because you can specify the compiler version, encoding, etc.
 10
Author: Artem Konovalov, 2017-02-17 13:33:05