A Java-based application for managing human resources, built with Maven.
- Java 8 or higher installed on your system.
This project includes the Maven Wrapper, so you do not need to install Maven separately.
Tip
Each maven command pre-runs tests before proceeding to the next step. To skip tests, add the -DskipTests flag to the commands. For example:
./mvnw clean install -DskipTests-
Clone or download the project to your local machine.
-
Open a terminal and navigate to the project directory:
cd path/to/hris -
Install the dependencies and build the project using the Maven Wrapper:
./mvnw clean install
-
Compile and run the application:
./mvnw clean compile package exec:exec
The application will start and display the user interface or output as configured.
Important
Ensure you have configured the environment variables as described in the Configuration section before running the application. The database in your connection must exist prior to running the application, as well as no tables on it, the application will create the necessary tables/relations on startup.
Create .env and .env.test files in the project root based on .env.example with the following environment variables:
Caution
Do not set the DB_URL in .env.test the same as the DB_URL in your .env file to avoid data loss during testing. Set the .env.test DB_URL to an H2 in-memory database: jdbc:h2:mem:hris-test;DB_CLOSE_DELAY=-1
DB_URL: JDBC URL for your MySQL database (e.g.,jdbc:mysql://localhost:3306/hris)DB_USER: Database usernameDB_PASSWORD: Database passwordCOMPANY_NAME: Company name used in the application UI and defaultsLOCAL_STORE_SECRET: Optional additional secret used to derive the local session encryption key. Set this to a strong, random string (for example, generated viaopenssl rand -base64 32). This value is only used locally and should not be committed to version control.
Ensure your MySQL database is running and the schema is set up as per the application requirements.
To build the project without running:
./mvnw clean compileCreate Jar file
./mvnw clean package./mvnw test