【发布时间】:2011-10-31 02:40:46
【问题描述】:
最近我遇到了与 maven 构建工具相关的术语“artifact”...
谁能解释一下在软件行业,特别是在 maven 中“artifact”是什么意思。
【问题讨论】:
-
不是和stackoverflow.com/questions/2487485/what-is-maven-artifact很像吗?它还包括“通用软件术语”工件的答案。
最近我遇到了与 maven 构建工具相关的术语“artifact”...
谁能解释一下在软件行业,特别是在 maven 中“artifact”是什么意思。
【问题讨论】:
Maven 组织它在项目中的构建。
maven 中的artifact 是maven 项目生成的资源。每个 maven 项目都可以有一个 artifact,比如 jar, war, ear,等等。
项目的配置文件"pom.xml" 描述了如何构建工件、如何运行单元测试等。
通常,使用 maven 构建的软件项目由许多构建构成产品的工件(例如 jar)的 maven 项目组成。
例如。
Root-Project // produces no artifact, simply triggers the build of the other projects
App-Project // The application, that uses the libraries
Lib1-Project // A project that creates a library (jar)
Lib2-Project // Another library
Doc-Project // A project that generates the user documentation from some resources
Maven 工件不限于 java 资源。您可以生成所需的任何资源。例如。文档、项目站点、zip 存档、本机库等。
【讨论】: