How to use Maven in my Java Project and Why?

前端 未结 7 583
臣服心动
臣服心动 2020-12-24 02:42

I am trying to figure out the use of Maven and I got many articles describing its features and uses. But I am just not able to understand the actual use of Maven from produc

7条回答
  •  难免孤独
    2020-12-24 03:42

    I had exactly the same perception as you and for years I avoided Maven.

    The thing is, it allows you to easily get the required jars your application may need( called dependencies - jars and other things - ) . So the next time somebody else run your project he will get the jars automatically.

    I know that's a bit hard to grasp, until you work with an existing projects using it.

    For instance I downloaded an open source project recently, which depended on 10 or 12 different on different jar versions. After downloading the source code and executing Maven, all those jars ( and a lot more others ) were downloaded for me.

    The problem with Maven ( as a friend of mine told me ) is that to perform a "Hello world" program, it first downloads the world to greet him. :P

提交回复
热议问题