TABLE OF CONTENTS
2. Setting Up Maven and Environment Variables
2.1 Adding Maven to the PATH variable
2.2 Setting up Maven environment variables
2.3 Editing the Path environment variable
2.4 Verifying the Maven installation
1. Overview
Maven is a tool which can be used for building and managing Java-based project. This article provides the procedure to set up Maven and the environment variables needed for the algoQA deployment on a windows machine.
2. Setting Up Maven and Environment Variables
Perform the following:
2.1 Adding Maven to the PATH variable
- After downloading the Maven, unzip the folder and copy it to a location on your computer (for example, C:\Program Files\apache-maven-3.9.6).
- Search for "Environment Variables" in the Windows search bar and select "Edit the system environment variables."
- In the System Properties window, click on "Environment Variables."
- In the Environment Variables window, under "System variables," select the "Path" variable and click "Edit."
- Add the path to the Maven bin directory (for example, C:\Program Files\apache-maven- 3.9.6\bin) to the list of paths). Ensure to replace with the actual path.
2.2 Setting up Maven environment variables
- In the Environment Variables window, click "New" under the "User variables" section.
- For "Variable Name," enter MAVEN_HOME.
- For "Variable Value," enter the path to the Maven folder. ( for example, C:\Program Files\apache-maven-3.9.6).
- Click "OK" to save the variable.
- Repeat the above steps to add another variable:
- Variable Name: M2_HOME
- Variable Value: Enter the path to the Maven folder, (for example, C:\Program Files\apache-maven-3.9.6).
2.3 Editing the Path environment variable
- In the Environment Variables window, find the "Path" variable under "System variables" and click "Edit."
- Add %M2_HOME%\bin to the list of paths.
- Click "OK" to save the changes.
2.4 Verifying the Maven installation
- Open a new command prompt
- Run the command mvn -version to verify the Maven version.
2.5 Adding Key Pair
Add the following key pair as the system environment variable as shown in the table:
Variable Name | Variable Value |
NODE_OPTIONS | --openssl-legacy-provider |
IS_LOCAL | |
DATABASE_HOST | |
DATABASE_PORT | |
DATABASE_USER | |
DATABASE_PASSWORD | |
DATABASE_NAME | |
DATABASE_HOST_CLIENT | |
DATABASE_PORT_CLIENT | |
DATABASE_USER_CLIENT | |
DATABASE_PASSWORD_CLIENT | |
DATABASE_NAME_CLIENT | |
ALGOQA_PROJECT_BASE_PATH | ./AlgoQA_Data |
These are applicable if you are managing user authentication locally. The list between Is_Local to Databse_name in the Variable Name column are used for user authentication locally.
2.6 Creating the .env file
- Create AlgoQA folder.
- Create a new file named .env inside AlgoQA folder.
- Open the .env file and replace the actual values for the PLACE_HOLDER with the appropriate values:
Note that last five are applicable for authentication of users on your local machines.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article