Setting Up Maven

Modified on Wed, 31 Jul at 8:48 PM

TABLE OF CONTENTS

1. Overview

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

2.5 Adding Key Pair

2.6 Creating the .env file

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

  1. 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).
  2. Search for "Environment Variables" in the Windows search bar and select "Edit the system environment variables."
  3. In the System Properties window, click on "Environment Variables." 
  4. In the Environment Variables window, under "System variables," select the "Path" variable and click "Edit."
  5. 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

  1. In the Environment Variables window, click "New" under the "User variables" section.
  2. For "Variable Name," enter MAVEN_HOME.
  3. For "Variable Value," enter the path to the Maven folder. ( for example, C:\Program Files\apache-maven-3.9.6).
  4. Click "OK" to save the variable.
  5. Repeat the above steps to add another variable:
  6. Variable Name: M2_HOME
  7. 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 

  1. In the Environment Variables window, find the "Path" variable under "System variables" and click "Edit."
  2. Add %M2_HOME%\bin to the list of paths.
  3. Click "OK" to save the changes.

2.4 Verifying the Maven installation

  1. Open a new command prompt
  2. 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 

  1. Create AlgoQA folder.
  2. Create a new file named .env inside AlgoQA folder.
  3. 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

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article