什么是神器? [英] What is an Artifact?

查看:59
本文介绍了什么是神器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近我遇到了与 maven 构建工具相关的术语artifact"...

Recently I came across with the term 'artifact' in related to maven build tool...

谁能解释一下工件"在软件行业,特别是在 maven 中的含义.

Can someone please explain what it's meant by 'artifact' in software industry and specifically in maven.

推荐答案

Maven 在项目中组织它的构建.
maven 中的 artifact 是 maven 项目生成的资源.每个 maven 项目都可以有一个 artifact,例如 jar、war、ear 等.
项目的配置文件 "pom.xml" 描述了工件是如何构建的,单元测试是如何运行的,等等.通常,使用 maven 构建的软件项目由许多构建构成产品的工件(例如 jar)的 maven 项目组成.
例如.

Maven organizes it's build in projects.
An artifact in maven is a resource generated by a maven project. Each maven project can have exactly one artifact like a jar, war, ear, etc.
The project's configuration file "pom.xml" describes how the artifact is build, how unit tests are run, etc. Commonly a software project build with maven consists of many maven-projects that build artifacts (e.g. jars) that constitute the product.
E.g.

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 存档、本机库等.

Maven artifacts are not limited to java resources. You can generate whatever resource you need. E.g. documentation, project-site, zip-archives, native-libraries, etc.

这篇关于什么是神器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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