Ant is the eldest of the various Java build automation frameworks and it is still very much in use today. There are extensions to Ant for a variety of languages, Java-based and non-Java-based alike. We'll focus only on Java for this assignment.
Download and install Apache Ant (version 1.10.5) from:\
https://ant.apache.org/bindownload.cgi
To verify that Ant has been installed correctly, run the following command on the command line to verify that it is version 1.10.5:
ant -v
Unlike Ant, we don't generally use Ivy as a standalone tool. Instead, we use it as a plugin for Ant, which means that it extends Ant's existing capabilities. This means that it requires a little bit of work to deploy, although that work is fairly painless:
- Change into the tools directory that was included in the cloned Git repository.
- Run the Ant script with the default target:
ant - Copy the ivy.jar file from the tools/ivy directory to your
<ANT-HOME>/libdirectory. - Run the ant script with the
go-nodepstarget to confirm that Ivy works:ant go-nodeps
Note: We're using version 2.4.0 of Ivy, which is a slightly older version. The current version is 2.5.0-RC1, but I try to only have you use GA releases of the tools.
In this section, you will get some basic experience in writing Ant scripts. You will focus on completing the sections of the files -- build.xml and ivy.xml -- marked with TODO comments.
Note: The scripts will work as long as the TODOs are addressed -- you should not need to modify any other part of the script.
To test the build script, just use the default ant target:
ant
To execute the packaged JAR, you can use the following command:
java -jar target/hello-world-all-1.0-SNAPSHOT.jar
Download and install Apache Maven (version 3.6.0) from:
https://maven.apache.org/download.cgi
To verify that Maven has been installed correctly, run the following command on the command line to verify that it is 3.6.0:
mvn -v
In this section, you will get some basic experience in writing Maven scripts. You will focus on completing the sections of the scripts -- pom.xml -- marked with TODO comments.
Note: The scripts will work as long as the TODOs are addressed -- you should not need to modify any other part of the script.
To test the build script, just use the following Maven command (we're not using the install goal since we don't really need this installed into our local repository):
mvn clean package
To execute the packaged JAR, you can use the following command:
java -jar target/hello-world-1.0-SNAPSHOT-jar-with-dependencies.jar
Download and install Gradle (version 5.1.1) from:
Note: You can use either the "binary-only" or the "complete" release. The complete is bigger but provides lots of samples. I'm partial to Gradle so that's the one I choose. My biases don't need to affect your behavior in this case.
To verify that Gradle has been installed correctly, run the following command on the command line to verify that it is 5.1.1:
gradle -v
In this section, you will get some basic experience in writing Maven scripts. You will focus on completing the sections of the scripts -- build.gradle -- marked with TODO comments.\
Note: The scripts will work as long as the TODOs are addressed -- you should not need to modify any other part of the script.
To test the build script, just use the following Maven command (we're not using the install goal since we don't really need this installed into our local repository):
gradle clean fatJar
To execute the packaged JAR, you can use the following command:
java -jar build/libs/hello-world-all-1.0-SNAPSHOT.jar
- Add your screen captures to a new images directory.
- Update the file, SUBMISSION.md.
- Commit all of your code changes, the images directory, and the updated SUBMISSION.md to your remote Github repository.