命令创建maven项目

mvn archetype:generate -DgroupId=com.google.finance -DartifactId=Tortoise -DarchetypeCatalog=local -DinteractiveMode=false

修改生成项目中pom.xml里的packaging为pom

在项目目录下创建模块:
mvn archetype:generate -DgroupId=com.google.finance -DartifactId=app-web-service -DarchetypeArtifactId=maven-archetype-webapp -DarchetypeCatalog=local -DinteractiveMode=false

mvn archetype:generate -DgroupId=com.google.finance -DartifactId=app-biz-shared -DarchetypeArtifactId=maven-archetype-quickstart -DarchetypeCatalog=local -DinteractiveMode=false
将archetype-catalog.xml文件放在~/.m2下面,这样创建maven项目时才快速

maven默认settings.xml的内容
"1.0" encoding="utf-8"?>

"http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="         http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">  


    
        nexus-osc
        central
        Nexus osc
        http://maven.oschina.net/content/groups/public/
    
    
        nexus-osc-thirdparty
        thirdparty
        Nexus osc thirdparty
        http://maven.oschina.net/content/repositories/thirdparty/
    


   
  
                jdk-1.7            
                
                    1.7
                

                
                    
                        nexus
                        local private nexus
                        http://maven.oschina.net/content/groups/public/
                        
                            true
                        
                        
                            false
                        
                    
                
                
                    
                        nexus
                        local private nexus
                        http://maven.oschina.net/content/groups/public/
                        
                            true
                        
                        
                            false
                        
                    
                
            
    
    
   
    nexus 
   

你可能感兴趣的:(无头无尾)