If MVN is installed, you should note that it is best to modify the default download directory because the path contains spaces.
Modification Method: Add Maven/CONF/settings. XML to this file: <localrepository> D:/worker/MVN </localrepository>
Note that it is best to create a directory named. m2 under the MVN directory. For example, D:/worker/MVN/. m2 on my machine.
Below is the MVN download path. I selected the following red part.
It is best to modify the path of the package you want to create and the project name, Com. mycompany. app, myproject
Archetype |
Command |
JSF basic |
MVN archetype: Create-example = org. appfuse. archetypes-examples = appfuse-Basic-JSF-dremoterepositories = http://static.appfuse.org/releases-darchetypeversion = 2.0.2-dgroupid = com. mycompany. app-dartifactid = project |
Spring MVC basic |
MVN archetype: Create-example = org. appfuse. archetypes-types = appfuse-Basic-spring-dremoterepositories = http://static.appfuse.org/releases-darchetypeversion = 2.0.2-dgroupid = com. mycompany. app-dartifactid = project |
Struts 2 Basic |
MVN archetype: Create-example = org. appfuse. archetypes-types = appfuse-Basic-Struts-dremoterepositories = http://static.appfuse.org/releases-darchetypeversion = 2.0.2-dgroupid = com. mycompany. app-dartifactid = project |
Tapestry basic |
MVN archetype: Create-example = org. appfuse. archetypes-example = appfuse-Basic-Tapestry-example = http://static.appfuse.org/releases-darchetypeversion = 2.0.2-dgroupid = com. mycompany. app-dartifactid = myproject |
JSF Modular |
MVN archetype: Create-example = org. appfuse. archetypes-examples = appfuse-modular-JSF-examples = http://static.appfuse.org/releases-darchetypeversion = 2.0.2-dgroupid = com. mycompany. app-dartifactid = myproject |
Spring MVC Modular |
MVN archetype: Create-example = org. appfuse. archetypes-examples = appfuse-modular-spring-example = http://static.appfuse.org/releases-darchetypeversion = 2.0.2-dgroupid = com. mycompany. app-dartifactid = myproject |
Struts 2 Modular |
MVN archetype: Create-patterns = org. appfuse. archetypes-patterns = appfuse-modular-Struts-patterns = http://static.appfuse.org/releases-darchetypeversion = 2.0.2-dgroupid = com. mycompany. app-dartifactid = myproject |
Tapestry Modular |
MVN archetype: Create-example = org. appfuse. archetypes-examples = appfuse-modular-Tapestry-example = http://static.appfuse.org/releases-darchetypeversion = 2.0.2-dgroupid = com. mycompany. app-dartifactid = myproject |
Core (Backend only) |
MVN archetype: Create-example = org. appfuse. archetypes-examples = appfuse-core-dremoterepositories = http://static.appfuse.org/releases-darchetypeversion = 2.0.2-dgroupid = com. mycompany. app-dartifactid = myproject |
After executing the above command, remember to modify the Pom. XML in the project directory, change the database username, password port, and so on.
In this way, you can automatically create databases and related tables. This is awesome,
The next step is to get the source code for easy learning.MVN appfuse: Full-Source
I am used to using eclipse and modify all projects to eclipse:MVN install Eclipse: Eclipse
By the way, I also encountered a prompt when using the above command.Apache-Tomcat-6.0.14. the reason for the failure of zip and decompression is that there is a problem with the downloading. I don't know if the foreigner hasn't handled the problem or the network is faulty, my half-day weekend is over ),
Go to Apache to download, and find that there is no 6.0.14, but you have no choice but to download. 20, then rename it to. 14, and put it in the directory
C:/Documents and Settings/Administrator/Local Settings/temp/Cargo/install
The Web server can use this commandMVN jetty: Run