maven指令集

Archetype

Archetype is a Maven project templating toolkit.


mvn archetype:create 创建项目框架


archetype:create

  The archetype creation goal looks for an archetype with a given groupId,
  artifactId, and version and retrieves it from the remote repository. Once
  the archetype is retrieved, it is then processed against a set of user
  parameters to create a working Maven project.

  Available parameters:

    archetypeArtifactId (Default: 'maven-archetype-quickstart')
      The Archetype Artifact Id to be used.
    archetypeGroupId (Default: 'org.apache.maven.archetypes')
      The Archetype Group Id to be used.
    archetypeVersion (Default: 'RELEASE')
      The Archetype Version to be used.
    artifactId
      The Artifact Id of the project to be build.
    basedir (Default: '${user.dir}')
      No description available.
    groupId
      The Group Id of the project to be build.
    localRepository
      Maven's local repository.
    packageName
      The Package Name of the project to be build.
    pomRemoteRepositories
      The remote repositories available for discovering dependencies and
      extensions as indicated by the POM.
    project
      The project to be created an archetype of.
    remoteRepositories
      Other remote repositories available for discovering dependencies and
      extensions.
    version (Default: '1.0-SNAPSHOT')
      The Version of the project to be build

 

archetype:generate

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 -> struts2-archetype-starter (A starter Struts 2 application with Sitemesh, DWR, and Spring)
20: internal -> struts2-archetype-blank (A minimal Struts 2 application)
21: internal -> struts2-archetype-portlet (A minimal Struts 2 application that can be deployed as a portlet)
22: internal -> struts2-archetype-dbportlet (A starter Struts 2 portlet that demonstrates a simple CRUD interface with db backing)
23: internal -> struts2-archetype-plugin (A Struts 2 plugin)
24: internal -> shale-archetype-blank (A blank Shale web application with JSF)
25: internal -> maven-adf-archetype (Archetype to ease the burden of creating a new application based with ADF)
26: internal -> data-app (A new Databinder application with sources and resources.)
27: internal -> jini-service-archetype (Archetype for Jini service project creation)
28: internal -> softeu-archetype-seam (JSF+Facelets+Seam Archetype)
29: internal -> softeu-archetype-seam-simple (JSF+Facelets+Seam (no persistence) Archetype)
30: internal -> softeu-archetype-jsf (JSF+Facelets Archetype)
31: internal -> jpa-maven-archetype (JPA application)
32: internal -> spring-osgi-bundle-archetype (Spring-OSGi archetype)
33: internal -> confluence-plugin-archetype (Atlassian Confluence plugin archetype)
34: internal -> maven-archetype-har (Hibernate Archive)
35: internal -> maven-archetype-sar (JBoss Service Archive)
36: internal -> wicket-archetype-quickstart (A simple Apache Wicket project)


dependency:copy  

  拷贝依赖的包,默认路径为dependency

 

Lifecycle Reference   maven构建生命周期引用

The following lists all build phases of the default, clean and site lifecycle, which are executed in the order given up to the point of the one specified.

Clean Lifecycle


pre-clean     executes processes needed prior to the actual project cleaning
clean     remove all files generated by the previous build
post-clean     executes processes needed to finalize the project cleaning

Default Lifecycle


validate     validate the project is correct and all necessary information is available.
initialize     initialize build state, e.g. set properties or create directories.
generate-sources     generate any source code for inclusion in compilation.
process-sources     process the source code, for example to filter any values.
generate-resources     generate resources for inclusion in the package.
process-resources     copy and process the resources into the destination directory, ready for packaging.
compile     compile the source code of the project.
process-classes     post-process the generated files from compilation, for example to do bytecode enhancement on Java classes.
generate-test-sources     generate any test source code for inclusion in compilation.
process-test-sources     process the test source code, for example to filter any values.
generate-test-resources     create resources for testing.
process-test-resources     copy and process the resources into the test destination directory.
test-compile     compile the test source code into the test destination directory
process-test-classes     post-process the generated files from test compilation, for example to do bytecode enhancement on Java classes. For Maven 2.0.5 and above.
test     run tests using a suitable unit testing framework. These tests should not require the code be packaged or deployed.
prepare-package     perform any operations necessary to prepare a package before the actual packaging. This often results in an unpacked, processed version of the package. (Maven 2.1 and above)
package     take the compiled code and package it in its distributable format, such as a JAR.
pre-integration-test     perform actions required before integration tests are executed. This may involve things such as setting up the required environment.
integration-test     process and deploy the package if necessary into an environment where integration tests can be run.
post-integration-test     perform actions required after integration tests have been executed. This may including cleaning up the environment.
verify     run any checks to verify the package is valid and meets quality criteria.
install     install the package into the local repository, for use as a dependency in other projects locally.
deploy     done in an integration or release environment, copies the final package to the remote repository for sharing with other developers and projects.

Site Lifecycle
pre-site     executes processes needed prior to the actual project site generation
site     generates the project's site documentation
post-site     executes processes needed to finalize the site generation, and to prepare for site deployment
site-deploy     deploys the generated site documentation to the specified web server

 

mvn install -Dmaven.test .skip=true  此命令可以在发布包的时候跳过单元测试

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值