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.13) 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 the version is correct:
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>/lib
directory. - Run the ant script with the
go-nodeps
target to confirm that Ivy works:ant go-nodeps
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.9.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 the version is correct:
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 7.6) 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 the version is correct:
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 jar
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.
- Verify that all of your images are displaying in the SUBMISSION.md page. I want to see the images, not the links to the images.