Setting Up Maven
Install Maven, add it to PATH, and set the environment variables algoQA needs. Maven is a tool used for building and managing Java-based projects. Set up Maven and the environment variables needed for the algoQA deployment on a Windows machine.
Setting Up Maven and Environment Variables
Perform the following:
Adding Maven to the PATH variable
- After downloading 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.
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).
Editing the Path environment variable
- In the Environment Variables window, find the "Path" variable under "System variables" and click "Edit."
- Add
%M2_HOME%\binto the list of paths. - Click "OK" to save the changes.
Verifying the Maven installation
- Open a new command prompt.
- Run the command
mvn -versionto verify the Maven version.
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 from IS_LOCAL to DATABASE_NAME in the Variable Name column are used for user authentication locally.
Creating the .env file
- Create
AlgoQAfolder. - Create a new file named
.envinsideAlgoQAfolder. - Open the
.envfile and replace the actual values for thePLACE_HOLDERwith the appropriate values:
Note that the last five are applicable for authentication of users on your local machines.
Was this page helpful?