Why do I need Maven if I use Eclipse?

I saw that if I right-click on a project in Eclipse and decide to run it on the server, then I can see the output, which means that the project is running.

If everything works fine, Maven, then what's the point of using it. How is this different than just running it through eclipse?

+4
source share
2 answers

Maven is a build tool (in fact, a build manager) similar to ANT. The main task of any construction tool is to set up a project, compile using the necessary projects and final packaging. The script construct in your project gives a blue print of the project structure. This frees you from any custom dependencies on a particular IDE, such as Eclipse. All you need to know is the standard build command, and you can build your code almost anywhere.

Now, back to your question, why not do it in Eclipse?

For a simple project and a small team, Maven is redundant. You can easily pass on the configuration, IDE to use, and indicate any special steps that need to be taken. Nevertheless, in large projects, there are many dependencies loosely connected with each other. To begin with, various settings will be set for building the developer's machine, assembling tests, and assembling. There are requirements for running automatic tests, integration tests, storing an assembly package (artifact) in a public repository, and updating versions of various modules.

Obviously, if all the steps mentioned above are performed manually, there is a chance to skip the step. In addition, the manual process takes a lot of time.

Ideally, you should choose the tool that suits you best. If you think you can achieve what you need without Maven, it makes sense not to use the Maven / build-tool just because everyone uses it.

It is proposed to study automatic deployment, this will give you a more complete picture of what all the materials you can do with the building tools. And if you don’t feel this adds any value to your current process, you probably don’t need Maven or any other build tool right now.

+14
source

Your question does not make much sense. Do you expect your users to access your application from eclipse? If it is very strange, in my opinion.

Perhaps your question should be about how to build your project. Maven gives you the ability to centralize dependency libraries in your enterprise. It allows you to automate the build process (most likely, in combination with a CI server, for example, hudson, cruise control, etc.). It allows you to automate testing of your device. Maven makes application packaging very easy to use. The developer does not need to follow a secret set of steps to package the application. You add the correct plugin, and maven takes care of this as part of the build life cycle. All this magic can happen due to the principle of convention over configuration. There are many more advantages, I just mentioned a few.

Maven does not replace the way you launch the application, and not as the application package , automate this process and manage the dependencies of your application.

Some links on why someone should use maven: -

+5
source

Source: https://habr.com/ru/post/1340269/


All Articles