Maven Architecture Objectives And Commands
maven build tool architecture
⇒ Making the build process easy.
⇒ Providing a uniform build system.
⇒ providing quality project information.
⇒ providing guidelines for best practices development.
⇒ Allowing transparent migration to new feature.
#What is Maven not:
⇒ MAVEN is a site and documentation tool.
⇒ MAVEN extends ANT to let you download dependencies.
⇒ MAVEN is a set of reusable ANT script-lets.
MAVEN’s objectives are quite different.
Note: To execute below commands we need to open command prompt and we need to go to where our project “pom.xml” file available.(POM – Project Object Model).
: It deletes target directory in our project which is created by MAVEN.
: It will compile source files but not test cases. Once we are executing this command, it will generate class files in the mentioned package.
: It will compile JUnit test case classes and it will run JUnit test cases. When we run this command it runs some other command internally.
: It will create .jar or .war or .ear file based on pom.xml file configuration. Before run this command it will run some other commands also in the following order:
: Once we created the .jar file into the local system and if we want to move our .jar file form local system to project repository then we should use this command. When we are using this command it will executes some other command in the following order:
: Eclipse will create the needed .project, .settings, .classpath files based on your pom.xml and environment settings (installed Java version, etc.)
: Starts Tomcat server.
: Stops Tomcat server.
: Deploys the project into Tomcat server.
: Undeploys the project.
⇒ To get .jar files artifactId, groupId and versions we need to use: http://mvnrepository.com, http://repository.sonatype.org
#Maven Integrating with Eclipse:
⇒ Before integrating Maven project into the Eclipse, first we need to convert Maven project into Eclipse project.
⇒ To convert Maven project into Eclipse project we need to use below command from where our project’s pom.xml file existed:
⇒ Add Tomcat Maven plugin into the Maven project.
<-Previous: Maven – Build And Project Management Comprehension Tool | | Next->Maven Examples