Get started with maven

后端 未结 3 1713
日久生厌
日久生厌 2021-02-06 19:11

I have experience in Ant, how to get started with maven. Any advantage with maven over ant?

3条回答
  •  抹茶落季
    2021-02-06 19:22

    Around two weeks ago, I was in the same situation. In my opinion, Maven is a lot more powerful as compared to Ant.

    It has a generate command which makes it very easy to start new projects of various kinds (artifacts) and will also build a standard directory structure along with the pom.xml file, thereby taking care of a lot of things that are needed to be written in the build.xml file of Ant.

    Managing dependencies is also a lot better. Maven will download dependencies from repos and will store them in a central repo on your system. If a dependency is already present in the local repository, it will take it from there instead of downloading it again.

    I use eclipse and maven has a command (mvn eclipse:eclipse) which creates the .classpath file in the project directory. So no need to add the libraries again in eclipse.

    The Getting started guide on the maven website is a good resource and covers quite a lot of stuff -

提交回复
热议问题