Before you begin, ensure you have the following installed:
- Java 20 (JDK)
- Apache Maven
To run the project using the jar file created in the packaging step, use the following command:
java -jar childbank-<tag>-<version>-SNAPSHOT.jar
Replace <tag>
and <version>
with the actual tag and version of the jar file.
-
Clone the Repository
git clone https://github.com/Qianmoxsn/childbank.git cd childbank
-
Navigate to the Project Directory
cd childbank
To run the tests included in the project, use the following command:
mvn test
This will compile the project and run all the tests defined in the src/test/java
directory.
To compile the project, use the following command:
mvn compile
This command will compile the source code located in the src/main/java
directory.
To package the project into a jar file, use the following command:
mvn package
This command will compile the project and package it into a jar file, which will be located in the target
directory.
After you package the project, you can run the program like # Start from Jar File
section.
- Clean the Project: This command removes the
target
directory with all the build data before performing the actual build.mvn clean
- Maven not recognized: Ensure Maven is installed and the
MAVEN_HOME
environment variable is set correctly. - Java version issues: Ensure the correct Java version is installed and the
JAVA_HOME
environment variable is set correctly. - Dependency issues: Run
mvn dependency:resolve
to resolve and download dependencies specified in thepom.xml
file.