Friday, May 17, 2013

Use Apache Maven to create Java projects

Why should I use Apache Maven to create a Java project?

If the Java project will not use external dependencies (some jar files such as junit, mysql-connector-java), then there is no need to use Maven. But when using external jars are needed, Maven will make life much simpler.

Maven maintains a list of commonly used dependencies in its repository. To include the dependencies in the project, simply add the dependency entries to pom.xml. When Maven generates a project, it reads pom.xml and will automatically download all the related jar files. Therefore, you do not have to search for the jar and install them one by one.

A tool that can find most current version and generate xml entry for pom.xml can be found here, http://mvnrepository.com

Next: Install Apache Maven on Windows

No comments:

Post a Comment