zoukankan      html  css  js  c++  java
  • maven2创建的archetypeArtifactId类型大全

    mvn archetype:create -DgroupId=org.cjj.site -DartifactId=org.cjj.site -DpackageName=org.cjj.site -DarchetypeArtifactId=maven-archetype-webapp

     
    重要的
      Script代码
    archetypeArtifactId
      不是吗?
      但是,当我们创建spring项目或者struts项目,到哪里去查他们的archetypeArtifactId呢?
      我google了一下,发现一个好资源:http://cwiki.apache.org/confluence/display/WW/Struts+2+Maven+Archetypes
      呵呵,今天发现原来可以这样:
      Script代码

    mvn archetype:generate

      接下来的事情,很舒服,选择一个类别吧.
      Java代码
    E:workspace>mvn archetype:generate 
    [INFO] Scanning for projects... 
    [INFO] Searching repository for plugin with prefix: 'archetype'. 
    [INFO] ------------------------------------------------------------------------ 
    [INFO] Building Maven Default Project 
    [INFO]  task-segment: [archetype:generate] (aggregator-style) 
    [INFO] ------------------------------------------------------------------------ 
    [INFO] Preparing archetype:generate 
    [INFO] No goals needed for project - skipping 
    [INFO] Setting property: classpath.resource.loader.class => 'org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader'. 
    [INFO] Setting property: velocimacro.messages.on => 'false'. 
    [INFO] Setting property: resource.loader => 'classpath'. 
    [INFO] Setting property: resource.manager.logwhenfound => 'false'. 
    [INFO] [archetype:generate {execution: default-cli}] 
    [INFO] Generating project in Interactive mode 
    [INFO] No archetype defined. Using maven-archetype-quickstart (org.apache.maven.archetypes:maven-archetype-quickstart:1.0) 
    Choose archetype: 
    1: internal -> appfuse-basic-jsf (AppFuse archetype for creating a web application with Hibernate, Spring and JSF) 
    2: internal -> appfuse-basic-spring (AppFuse archetype for creating a web application with Hibernate, Spring and Spring MVC) 
    3: internal -> appfuse-basic-struts (AppFuse archetype for creating a web application with Hibernate, Spring and Struts 2) 
    4: internal -> appfuse-basic-tapestry (AppFuse archetype for creating a web application with Hibernate, Spring and Tapestry 4) 
    5: internal -> appfuse-core (AppFuse archetype for creating a jar application with Hibernate and Spring and XFire) 
    6: internal -> appfuse-modular-jsf (AppFuse archetype for creating a modular application with Hibernate, Spring and JSF) 
    7: internal -> appfuse-modular-spring (AppFuse archetype for creating a modular application with Hibernate, Spring and Spring MVC) 
    8: internal -> appfuse-modular-struts (AppFuse archetype for creating a modular application with Hibernate, Spring and Struts 2) 
    9: internal -> appfuse-modular-tapestry (AppFuse archetype for creating a modular application with Hibernate, Spring and Tapestry 4) 
    10: internal -> maven-archetype-j2ee-simple (A simple J2EE Java application) 
    11: internal -> maven-archetype-marmalade-mojo (A Maven plugin development project using marmalade) 
    12: internal -> maven-archetype-mojo (A Maven Java plugin development project) 
    13: internal -> maven-archetype-portlet (A simple portlet application) 
    14: internal -> maven-archetype-profiles () 
    15: internal -> maven-archetype-quickstart () 
    16: internal -> maven-archetype-site-simple (A simple site generation project) 
    17: internal -> maven-archetype-site (A more complex site project) 
    18: internal -> maven-archetype-webapp (A simple Java web application) 
    19: internal -> jini-service-archetype (Archetype for Jini service project creation) 
    20: internal -> softeu-archetype-seam (JSF+Facelets+Seam Archetype) 
    21: internal -> softeu-archetype-seam-simple (JSF+Facelets+Seam (no persistence) Archetype) 
    22: internal -> softeu-archetype-jsf (JSF+Facelets Archetype) 
    23: internal -> jpa-maven-archetype (JPA application) 
    24: internal -> spring-osgi-bundle-archetype (Spring-OSGi archetype) 
    25: internal -> confluence-plugin-archetype (Atlassian Confluence plugin archetype) 
    26: internal -> jira-plugin-archetype (Atlassian JIRA plugin archetype) 
    27: internal -> maven-archetype-har (Hibernate Archive) 
    28: internal -> maven-archetype-sar (JBoss Service Archive) 
    29: internal -> wicket-archetype-quickstart (A simple Apache Wicket project) 
    30: internal -> scala-archetype-simple (A simple scala project) 
    31: internal -> lift-archetype-blank (A blank/empty liftweb project) 
    32: internal -> lift-archetype-basic (The basic (liftweb) project) 
    33: internal -> cocoon-22-archetype-block-plain ([http://cocoon.apache.org/2.2/maven-plugins/]) 
    34: internal -> cocoon-22-archetype-block ([http://cocoon.apache.org/2.2/maven-plugins/]) 
    35: internal -> cocoon-22-archetype-webapp ([http://cocoon.apache.org/2.2/maven-plugins/]) 
    36: internal -> myfaces-archetype-helloworld (A simple archetype using MyFaces) 
    37: internal -> myfaces-archetype-helloworld-facelets (A simple archetype using MyFaces and facelets) 
    38: internal -> myfaces-archetype-trinidad (A simple archetype using Myfaces and Trinidad) 
    39: internal -> myfaces-archetype-jsfcomponents (A simple archetype for create custom JSF components using MyFaces) 
    40: internal -> gmaven-archetype-basic (Groovy basic archetype) 
    41: internal -> gmaven-archetype-mojo (Groovy mojo archetype) 
    Choose a number: (1/2/3/4/5/6/7/8/9/10/11/12/13/14/15/16/17/18/19/20/21/22/23/24/25/26/27/28/29/30/31/32/33/34/35/36/37/38/39/40/41) 15: :
     
    选择41个类型,有你所要的吗?选择一个数字即可.
      下面就剩下你根据提示来填空了.
     
    ******************************************
    能否使用Maven Archetype来实现项目初始化配置?
    使用mvn archetype:create-from-project,然后,使用 mvn archetype:generate,这样可以选取相应的catalog(也就是archetype模板),输入参数,指定arctifyGroupId等就可以指定包名,生成符合 maven框架的源代码项目。
    不知道maven能否支持更灵活的做法?也就是在mvn archetype:generate过程中,使用自定义初始化的参数,这样,可以按自定义的参数,可以更好的取舍相关的目录结构。
     
  • 相关阅读:
    使用rails Devise
    (转)两年服务器开发的一句话经验集
    新版本,新起点。
    学习《锋利的jQuery》1
    Watir 使用
    一些Web Front的收集
    PHP日期时间函数的高级应用技巧
    如何防止动态加载JavaScript引起的内存泄漏问题
    JavaScript常用函数库详解
    JavaScript加密解密
  • 原文地址:https://www.cnblogs.com/huapox/p/3251608.html
Copyright © 2011-2022 走看看