什么是 Maven 工件? [英] What is a Maven artifact?

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

问题描述

什么是工件,为什么 Maven 需要它?

What is an artifact and why does Maven need it?

推荐答案

工件是部署到 Maven 存储库的文件,通常是 JAR.

An artifact is a file, usually a JAR, that gets deployed to a Maven repository.

Maven 构建会生成一个或多个工件,例如已编译的 JAR 和源"JAR.

A Maven build produces one or more artifacts, such as a compiled JAR and a "sources" JAR.

每个工件都有一个组 ID(通常是一个反向域名,如 com.example.foo)、一个工件 ID(只是一个名称)和一个版本字符串.这三者共同唯一地标识了工件.

Each artifact has a group ID (usually a reversed domain name, like com.example.foo), an artifact ID (just a name), and a version string. The three together uniquely identify the artifact.

项目的依赖项被指定为工件.

A project's dependencies are specified as artifacts.

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

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