Maven in 5 Minutes

1. Download the maven. (version 3.2.1)

2. Configure the maven bin path in system path.

       
 3.
Check whether the maven is installed successfully using [mvn –v] in dos

         

4. Execute below command.

 mvn archetype:generate -DgroupId=com.mycompany.app -DartifactId=my-app -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false   

5. Below is the generated file structure

my-app
|-- pom.xml
`-- src
    |-- main
    |   `-- java
    |       `-- com
    |           `-- mycompany
    |               `-- app
    |                   `-- App.java
    `-- test
        `-- java
            `-- com
                `-- mycompany
                    `-- app
                        `-- AppTest.java

猜你喜欢

转载自antlove.iteye.com/blog/2059448