列出Maven 2中的所有可能目标? [英] List all of the possible goals in Maven 2?

查看:127
本文介绍了列出Maven 2中的所有可能目标?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是Maven的新手,来自Ant世界。

I'm new to Maven, coming from the Ant world.

是否可以列出所有可能的目标(包括所有插件)你可以运行吗?

Is it possible to list all of the possible goals (including, say, all the plugins) that you can run?

我可以看到Maven 1中曾经有一个 -g 标志,但是这在版本2中不可用。

I can see that there used to be a -g flag in Maven 1, but this isn't available in version 2.

推荐答案

您在命令行中指明的目标链接到生命周期。例如, build 生命周期(你还有 clean site 不同的生命周期)由以下阶段组成:

The goal you indicate in the command line is linked to the lifecycle of Maven. For example, the build lifecycle (you also have the clean and site lifecycles which are different) is composed of the following phases:


  • validate :验证项目是否正确并且所有必要信息都可用。

  • compile :编译项目的源代码。

  • test :使用合适的单元测试框架测试编译的源代码。这些测试不应要求打包或部署代码。

  • package :获取已编译的代码并将其打包为可分发的格式,例如JAR。

  • integration-test :如有必要,将包处理并部署到可以运行集成测试的环境中。

  • 验证:运行任何检查以验证包是否有效并符合质量标准

  • install :将软件包安装到本地存储库,作为本地其他项目的依赖项。

  • deploy :在集成或发布环境中完成,将最终包复制到远程存储库以与其他开发人员和项目共享。

  • validate: validate the project is correct and all necessary information is available.
  • compile: compile the source code of the project.
  • test: test the compiled source code using a suitable unit testing framework. These tests should not require the code be packaged or deployed.
  • package: take the compiled code and package it in its distributable format, such as a JAR.
  • integration-test: process and deploy the package if necessary into an environment where integration tests can be run.
  • 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.

您可以在此处找到核心插件列表,但是还有很多其他的插件,比如代码插件,此处

You can find the list of "core" plugins here, but there are plenty of others plugins, such as the codehaus ones, here.

这篇关于列出Maven 2中的所有可能目标?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆