`

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

阅读更多

 

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] ------------------------------------------------------------------------

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

相关推荐

    eclipse下几个简单maven命令

    同时,也可以通过Eclipse的Maven插件(如M2E)配置构建生命周期,实现自动化的构建流程。 总结来说,了解并熟练运用这些基本的Maven命令对于任何Java开发者都非常重要,它们可以帮助你高效地管理项目构建过程,保证...

    maven实用命令

    通过熟练掌握这些Maven命令,你可以更加高效地管理你的Java项目,无论是构建、测试还是部署,都能得心应手。同时,Maven的插件系统使得你可以根据需求扩展其功能,满足各种复杂的构建需求。在实际开发过程中,不断...

    Maven笔记(2)-- 构建Java Project 及 Maven命令使用

    **Maven笔记(2)-- 构建Java Project 及 Maven命令使用** Maven是Apache组织开发的一个项目管理和综合工具,主要用于Java项目构建、依赖管理和项目信息管理。它通过一个统一的构建过程,使得项目的构建变得简单且...

    Maven 命令Maven 命令Maven 命令

    Maven 是一个强大的Java项目管理工具,它简化了构建、依赖管理和项目生命周期的过程。通过使用Maven,开发者可以遵循一种标准化的方式来构建项目,使得不同项目的构建过程具有一致性。以下是一些Maven的常用命令及其...

    apache-maven-3.6.3安装包

    Apache Maven 是一个强大的Java项目管理和综合工具,它简化了构建过程,通过标准化项目结构和自动化构建生命周期。在本文中,我们将深入探讨Maven的核心概念、安装步骤以及如何在实际项目中使用它。 **Maven核心...

    maven打包 maven打jar包详细步骤

    在Java开发中,Maven是一个强大的构建工具,它简化了项目的构建、依赖管理和部署过程。本文将详细讲解如何使用Maven来打包一个Java项目,并...了解这些基本操作和Maven生命周期,有助于提高开发效率并保持项目的整洁。

    maven API maven API

    总结来说,Maven API是构建Java项目的关键工具,通过其丰富的功能和强大的插件系统,可以高效地管理项目构建、依赖和生命周期。了解并熟练使用Maven API,对于提升开发效率和团队协作具有重要意义。

    Maven使用命令创建工程,打包工程和常用命令使用的代码文件

    本篇文章将深入探讨如何使用Maven命令来创建工程、打包工程以及掌握一些常用的Maven命令。 首先,让我们了解Maven的核心概念。Maven基于项目对象模型(Project Object Model,POM),这是一个XML文件,包含了项目的...

    maven学习与命令

    Maven 的核心概念包括项目对象模型(POM)、生命周期、插件和仓库等。 #### 二、常用Maven命令详解 ##### 1. 创建Java项目 ```sh mvn archetype:create -DgroupId=packageName -DartifactId=projectName ``` **...

    Maven3.8.1.rar免费

    - 在`PATH`环境变量中添加`%MAVEN_HOME%\bin`,确保命令行可以执行Maven命令。 4. **验证安装**:打开命令行,输入`mvn -version`,如果显示Maven的版本信息,则表示安装成功。 **四、Maven 的基本使用** 1. **...

    maven教程-maven教程-maven教程

    Maven是Java领域广泛使用的项目管理工具,它能够帮助开发者完成项目的构建、文档生成、报告、依赖管理和软件生命周期管理等工作。通过本文的介绍,我们可以了解到Maven的基本概念、安装配置、基本使用和深入应用详解...

    apache-maven-3.5.4.zip

    default生命周期包括编译、测试、打包、验证等目标,每个目标可以通过Maven命令进行调用。 - **插件**:Maven通过插件扩展其功能,例如,maven-compiler-plugin用于编译Java源代码,maven-surefire-plugin用于运行...

    maven 3.6.3.zip

    Maven 3.6.3是一个强大且广泛使用的Java项目管理工具,通过其强大的依赖管理和生命周期管理功能,极大地简化了开发流程。了解并熟练使用Maven对于Java开发者来说至关重要,可以帮助他们提高工作效率,减少构建和维护...

    Maven 和Maven下载的jar包库

    开发者可以通过执行如`mvn clean compile`这样的命令来执行生命周期中的特定阶段。此外,Maven还支持插件,用于扩展其功能,如Javadoc生成、代码覆盖率报告等。 总结,Maven是一个强大的项目管理和构建工具,通过它...

    Windows下maven安装包

    总结,Windows下安装Maven主要是下载安装包、解压、配置环境变量,并理解其核心概念如POM、仓库、生命周期和插件,以及如何使用Maven进行项目的构建和管理。通过熟练掌握Maven,开发者能更高效地管理Java项目。

    maven - maven tutorial

    通过定义一系列标准化的生命周期和构建阶段,Maven 能够实现跨项目的一致性和可重复性。此外,Maven 还提供了一种机制来管理项目的依赖关系,并且能够自动化常见的任务,如编译、测试和打包。 **1.4 Maven 的特性**...

    maven3.9.rar

    Maven是Java世界中的一款项目管理和综合工具,它简化了构建、依赖管理和项目生命周期的管理。在本文中,我们将深入探讨...通过熟悉Maven的基本概念、配置方法以及生命周期和插件的使用,你将在项目管理中受益匪浅。

    maven 3.8.5 linux版本下载

    Maven有三个主要的生命周期:`clean`、`default`和`site`。其中,`default`生命周期是最常用的部分,包括了以下阶段: - `validate`:验证项目是否可以被构建。 - `compile`:编译项目的源代码。 - `test`:测试...

    maven 安装包 官方版 绿色

    5. **理解生命周期与构建阶段**:避免过度使用mvn命令,了解生命周期和构建阶段之间的关系。 通过上述介绍,你应该对Maven有了更深入的了解。这个官方版的绿色安装包使你能够快速启动和运行Maven,进一步提升你的...

Global site tag (gtag.js) - Google Analytics