当前位置:首页 > 开发 > 编程语言 > 持续集成 > 正文

通过maven命令了解其生命周期

发表于: 2012-11-04   作者:晨必须的   来源:转载   浏览:
摘要:   mvn validate [INFO] Scanning for projects... [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building  0.0.1-SNAPSHOT [INFO] -----------

 

mvn validate

[INFO] Scanning for projects...

[INFO]

[INFO] ------------------------------------------------------------------------

[INFO] Building  0.0.1-SNAPSHOT

[INFO] ------------------------------------------------------------------------

[INFO] ------------------------------------------------------------------------

[INFO] BUILD SUCCESS

[INFO] ------------------------------------------------------------------------

[INFO] Total time: 0.269s

[INFO] Finished at: Sun Nov 04 17:14:02 CST 2012

[INFO] Final Memory: 2M/123M

[INFO] ------------------------------------------------------------------------


mvn resources:resources
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building  0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.5:resources (default-cli) @ maven ---
[debug] execute contextualize
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.991s
[INFO] Finished at: Sun Nov 04 17:11:27 CST 2012
[INFO] Final Memory: 3M/123M
[INFO] ------------------------------------------------------------------------


mvn clean
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building  0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ maven ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.510s
[INFO] Finished at: Sun Nov 04 16:50:39 CST 2012
[INFO] Final Memory: 2M/4M
[INFO] ------------------------------------------------------------------------

mvn compile
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building  0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ maven ---
[debug] execute contextualize
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) @ maven ---
[INFO] Nothing to compile - all classes are up to date
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.217s
[INFO] Finished at: Sun Nov 04 17:14:41 CST 2012
[INFO] Final Memory: 3M/123M
[INFO] ------------------------------------------------------------------------

mvn test
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building  0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ maven ---
[debug] execute contextualize
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) @ maven ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.5:testResources (default-testResources) @ maven ---
[debug] execute contextualize
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory E:\MyEclipseProject\maven\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:testCompile (default-testCompile) @ maven ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.10:test (default-test) @ maven ---
[INFO] No tests to run.
[INFO] Surefire report directory: E:\MyEclipseProject\maven\target\surefire-reports
-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Results :
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.125s
[INFO] Finished at: Sun Nov 04 17:19:14 CST 2012
[INFO] Final Memory: 4M/123M
[INFO] ------------------------------------------------------------------------

mvn package
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building  0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ maven ---
[debug] execute contextualize
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) @ maven ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.5:testResources (default-testResources) @ maven ---
[debug] execute contextualize
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory E:\MyEclipseProject\maven\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:testCompile (default-testCompile) @ maven ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.10:test (default-test) @ maven ---
[INFO] No tests to run.
[INFO] Surefire report directory: E:\MyEclipseProject\maven\target\surefire-reports
-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Results :
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] --- maven-war-plugin:2.3:war (default-war) @ maven ---
[INFO] Packaging webapp
[INFO] Assembling webapp [maven] in [E:\MyEclipseProject\maven\WebRoot]
[INFO] Processing war project
[INFO] Webapp assembled in [20 msecs]
[INFO] Building war: E:\MyEclipseProject\maven\target\maven-0.0.1-SNAPSHOT.war
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.463s
[INFO] Finished at: Sun Nov 04 17:17:36 CST 2012
[INFO] Final Memory: 5M/123M
[INFO] ------------------------------------------------------------------------

mvn install
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building  0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ maven ---
[debug] execute contextualize
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) @ maven ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.5:testResources (default-testResources) @ maven ---
[debug] execute contextualize
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory E:\MyEclipseProject\maven\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:testCompile (default-testCompile) @ maven ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.10:test (default-test) @ maven ---
[INFO] No tests to run.
[INFO] Surefire report directory: E:\MyEclipseProject\maven\target\surefire-reports
-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Results :
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] --- maven-war-plugin:2.3:war (default-war) @ maven ---
[INFO] Packaging webapp
[INFO] Assembling webapp [maven] in [E:\MyEclipseProject\maven\WebRoot]
[INFO] Processing war project
[INFO] Webapp assembled in [60 msecs]
[INFO] Building war: E:\MyEclipseProject\maven\target\maven-0.0.1-SNAPSHOT.war
[INFO]
[INFO] --- maven-install-plugin:2.3.1:install (default-install) @ maven ---
[INFO] Installing E:\MyEclipseProject\maven\target\maven-0.0.1-SNAPSHOT.war to E:\maven_resposity\maven\maven\0.0.1-SNAPSHOT\maven-0.0.1-SNAPSHOT.war
[INFO] Installing E:\MyEclipseProject\maven\pom.xml to E:\maven_resposity\maven\maven\0.0.1-SNAPSHOT\maven-0.0.1-SNAPSHOT.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 12.688s
[INFO] Finished at: Sun Nov 04 17:24:23 CST 2012
[INFO] Final Memory: 5M/123M
[INFO] ------------------------------------------------------------------------

最后想说一句话:命令行,是最值得喜欢的东东。

通过maven命令了解其生命周期

  • 0

    开心

    开心

  • 0

    板砖

    板砖

  • 0

    感动

    感动

  • 0

    有用

    有用

  • 0

    疑问

    疑问

  • 0

    难过

    难过

  • 0

    无聊

    无聊

  • 0

    震惊

    震惊

编辑推荐
maven常用的命令 mvn archetype:create 创建Maven项目 mvn compile 编译源代码 mvn deploy 发布项
以前使用maven时没有细了解过maven的生命周期,这段时间需要自己做架构设计,为了能更好的使用maven
一个完整的项目构建通常包括清理,编译,测试,打包,继承部署等步骤,而maven是生命周期的抽象,具
通过dos命令行定位到要创建项目的目录,执行以下命令: mvn archetype:create -DgroupId=com.learn
看了这几篇文章: Maven入门指南(一) http://ifeve.com/maven-1/ Maven入门指南(二) http://ife
一、生命周期 当一个视图控制器被创建,并在屏幕上显示的时候。 代码的执行顺序 1、 alloc 创建对象
Maven的生命周期是抽象的,即生命周期不做任何实际的工作,实际任务由插件完成,类似于设计模式中的
一、Maven的生命周期 Maven的生命周期就是对所有的构建过程进行抽象和统一。包含了项目的清理、初始
一、Maven的生命周期 Maven的生命周期就是对所有的构建过程进行抽象和统一。包含了项目的清理、初始
一、Maven的生命周期 Maven的生命周期就是对所有的构建过程进行抽象和统一。包含了项目的清理、初始
版权所有 IT知识库 CopyRight © 2009-2015 IT知识库 IT610.com , All Rights Reserved. 京ICP备09083238号