A maven project is a special directory structure which is accepted by all industry to develop web application and enterprise application.It is used to provide clean separation between all the classes,XML file and the jar file in a well formed manner.
A typical maven project contains some standard directory structure for every java based web project and enterprise project. Its structure is like......
List OF Maven Command
. Compile
A typical maven project contains some standard directory structure for every java based web project and enterprise project. Its structure is like......
Folder Directory Explanation.
List OF Maven Command
. Compile
- mvn compile
. Compile (offline)- mvn -o compile
3. Install the generated output to the respective repository
- mvn install
- mvn clean
- mvn package
- mvn eclipse:eclipse
- mvn test
- mvn -Dsurefire.useFile=false test
- mvn test –Dtest=org.shankh.mavenTest
- mvn package -Dmaven.test.skip
- mvn install -Dmaven.test.skip
- mvn eclipse:clean eclipse:eclipse –DdownloadSources=true
- mvn archetype:generate -DgroupId=com.mycompany.app -DartifactId=my-app
14. Create a Web Application
- mvn archetype:generate
- -DarchetypeGroupId=org.apache.maven.archetypes
- -DarchetypeArtifactId=maven-archetype-webapp
- -DgroupId=com.mycompany
- -DartifactId=my-app
- mvn jetty:run
- mvn jetty:run-war
<build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>1.5</source> <target>1.5</target> </configuration> </plugin> </plugins> </build>
18. Generate site for a single project
- mvn site
- mvn javadoc:javadoc
- MAVEN_OPTS=”-Xmx512m -Xms256m -XX:MaxPermSize=128m”
Goto Window -> Preferences -> Java -> build path -> classpath variable -> New Name: M2_REPO Path: C:\Users\my_user_name\.m2\repository (In vista) C:\Documents And Settings\my_user_name\.m2\repository (In XP) ~/.m2/repository (in Linus/ unix flavours)
Thank u so much...It s very Helpful..
ReplyDeleteThanks for response..............
Deletethis explanation is giving clear cut idea about maven.this is very understandable and excellent explanation.thnks a lot..........
ReplyDeleteone request plz give lk ths axplanation about log4j....
Good Work....Keep it up and Thanx alot....
ReplyDelete