Simple hello world application template
~/helloworld$ java -jar target/helloworld-0.0.1-SNAPSHOT-jar-with-dependencies.jar -h
helloworld
Version: 0.0.1
usage: helloworld
-h Display this help text
-v Verbose mode
Apache Maven is the build tool of choice. Simply issue mvn install package
to install dependencies and build the jar.
Use mvn clean install compile verify test package site
to clean up existing targets, install dependencies, verify, run unit tests, build a jar, and create the documentation and reports.
Issue a java -jar target/helloworld-<VERSION>-SNAPSHOT-jar-with-dependencies.jar
to run the target directly.
- Download and install Docker https://docs.docker.com/desktop/
- Build the mscs502 image by running
docker build -t mscs502 .
in a terminal - Then run the container based on the mscs502 image with
docker run -it --rm -v $PWD:/helloworld mscs502
on Linux or an absolute path in Windows likedocker run -it --rm -v /c/Users/MICHAELGILDEIN/mscs502-java:/helloworld mscs502
- Use VSCode or your IDE of choice to edit your code locally. HINT: Run
code .
from the terminal when in the folder to easily open it - Build and run the code as you would locally from the Docker container bash prompt
JUnit is used as the Test Framework. To execute unit tests run mvn test
.
To skip tests, add -Dmaven.test.skip=true
as an argument to your Maven command.
- All code (classes, files, global variables, members, and methods) must be thoroughly documented using JavaDoc accepted format. HINT: Use
mvn site
- All existing unit tests must pass. HINT: Use
mvn test
- New unit tests are encouraged!
- README, help text, makefile, and other artifacts must be up to date.
- Program version number should be incremented. HINT: In the pom.xml and global variables
- Use proper git ettiquete with frequent commits and good commit messages.
- All code must be formatted properly and verified with clang-format. HINT: Use
mvn verify
- Binary files and other metadata shall not be committed. HINT: Update the .gitignore, if necessary
- No warnings or errors shall be produced by Maven with
mvn verify test site compile
options.