APPENDIX BApache Maven Tutorial
When you are developing a Java software project, there are many tasks to take care of: downloading dependencies, putting JAR files on a classpath, compiling source code into binary bytecode, running tests, packaging bytecode into deployable JAR files, deploying JAR files to a remote repository server, and so on. Apache Maven, a software project management and comprehension tool that is based on the concept of a project object model (POM), can automate all of these tasks. Maven is intended primarily as a tool for managing Java-based projects, but it can also be used for projects using other programming languages such as C# and Ruby. As alternatives to Maven, Ant and Gradle are also popular software project management tools.
For more information about Ant, see http://ant.apache.org/
.
For more information about Gradle, see https://gradle.org/guides/#getting-started
.
For a comparison between Ant, Maven, and Gradle, see https://www.baeldung.com/ant-maven-gradle
.
Downloading Maven
You can download Apache Maven as a zipped file, apache-maven-3.6.0-bin.zip
, from the following address:
https://maven.apache.org/download.cgi
After downloading it, just unzip the file to a directory, for example, c:\apache-maven-3.6.0\
. Once it is unzipped, you will find the Maven program, mvn.jar
, in the bin
subdirectory. To test your Maven, just run the following command:
mvn --version
But you need to add c:\apache-maven-3.6.0\bin\
to your system PATH first, or simply ...
Get Practical Java Programming for IoT, AI, and Blockchain now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.