Hello, I would very much like to know, I revised and re-read a lot, but I can not understand. Why do you need Maven, if you have an IDE - Eclipse, Netbeans, etc.? What is its advantage in assemblies if and IDE cope?
2 answers
Not quite a correct question, you can not compare Maven and the development environment. C Maven can work without development environments. Why do you need? To manage dependencies, to build projects, and for a heap of everything else useful. For example, you write a big project and use many technologies in it, for example, Hibernate, JUnit. The question arises how to connect all the libraries? The answer is simple - just write dependencies in pom.xml, and maven will download them for you. Then such a situation is possible, you want to show the project to a friend, send it to him, but the problem is, if this is not a Maven project, then your friend will have to download libraries to make the project work, and Maven will do it for him. With the growth of your projects, you yourself appreciate the merits of maven. IDEs cope - and if there is no IDE on your computer? What will you do? Maven comes to the rescue, it is cross-platform and there is enough command line to work with it.
- oneI will add the main answer. IDE use systems, Ant, Maven, Gradle - Bogdan Panchenko
- oneIn my opinion, to theorize about situations “when there is no IDE on your computer” is about how to theorize about situations when you have no electricity in your apartment. - Artem Ionash
The IDE is able to build a project, but each does it differently - it uses a different java version, encoding, project structure, external libraries are in different places and may have a different version.
Maven and other build systems are used to unify this process. They have a number of advantages:
- with their help, versions of libraries are indicated, and what is not unimportant, the system knows where to get them from.
- It has a well-established project structure, it avoids confusion and makes it easier to find what you need.
- has a certain set of steps - compilation, testing, packaging, and so on.
- ability to customize the build process - add additional steps
- assembly does not depend on the IDE, operating system, etc., because You can specify the compiler version, encoding, etc.
mavendependency management is vp_arthgradlerightgradle, he is trendy, youthful - rjhdbymake. With gredlom it will be easier to move to android, if that. And in general, well, objectively, gradle will be much better. Generally holivor of course, so I suggest not to develop :) - rjhdby