sudo apt update
sudo apt install maven
mvn -version
We open the command terminal and edit the .bashrc file using the below command.
nano ~/.bashrc
Add maven-specific lines to the file.
export M2_HOME=/usr/local/apache-maven/apache-maven-3.3.9
export M2=$M2_HOME/bin
export MAVEN_OPTS=-Xms256m -Xmx512m
export PATH=$M2:$PATH
Use the clone command to clone the repository.
git clone https://github.com/DipayanP007/Assignment-Maven.git
cd ../Assignment-Maven
cd cal-api/
mvn clean compile
mvn package
mvn install
cd cal-impl/
mvn clean compile
mvn exec:java