Install Maven on windows:
https://phoenixnap.com/kb/install-maven-windows
Install maven on Linux:
Install Maven (Latest From Maven Repo)
Follow the steps given below to install the latest maven package from the official maven repo.
Step 1: Go to Maven Downlaods and get the download link of the latest package.
wget wget https://dlcdn.apache.org/maven/maven-3/3.9.0/binaries/apache-maven-3.9.0-bin.tar.gz
Step 2: Untar the mvn package to the /opt folder.
sudo tar xvf apache-maven-3.9.0-bin.tar.gz -C /opt
Step 3: Create a symbolic link to the maven folder. This way, when you have a new version of maven, you just have to update the symbolic link and the path variables remain the same.
sudo ln -s /opt/apache-maven-3.9.0 /opt/maven
Add Maven Folder To System PATH
Maven Command To Create Java Web Application:
mvn archetype:generate -DgroupId=com.companyname.automobile -DartifactId=trucks -DarchetypeArtifactId=maven-archetype-webapp -DinteractiveMode=false
Maven Command to generate artifact:
First go the location where pom.xml file is placed... and execute below command
#mvn package
Deploy Sample Web application on tomcat server:
Copy the artifact from target folder and deploy it on tomcat server(tomcat deployment directory is webapps)
No comments:
Post a Comment