博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
什么是Maven神器?
阅读量:3582 次
发布时间:2019-05-20

本文共 4204 字,大约阅读时间需要 14 分钟。

本文翻译自:

什么是神器?为什么Maven需要它?


#1楼

参考:


#2楼

I know this is an ancient thread but I wanted to add a few nuances. 我知道这是一个古老的线索,但我想添加一些细微差别。

There are Maven artifacts, repository manager artifacts and then there are Maven Artifact s. 有Maven工件,存储库管理器工件,然后有Maven Artifact

A Maven artifact is just as other commenters/responders say: it is a thing that is spat out by building a Maven project. Maven工件正如其他评论者/响应者所说的那样:通过构建Maven项目来实现这一点。 That could be a .jar file, or a .war file, or a .zip file, or a .dll , or what have you. 这可能是.jar文件, .war文件, .zip文件,或.dll ,或者你有什么。

A repository manager artifact is a thing that is, well, managed by a repository manager. 存储库管理器工件是由存储库管理器管理的。 A repository manager is basically a highly performant naming service for software executables and libraries. 存储库管理器基本上是软件可执行文件和库的高性能命名服务。 A repository manager doesn't care where its artifacts come from (maybe they came from a Maven build, or a local file, or an Ant build, or a by-hand compilation...). 存储库管理器不关心其工件的来源(可能来自Maven构建,本地文件,Ant构建或手工编译......)。

A Maven Artifact is a Java class that represents the kind of "name" that gets dereferenced by a repository manager into a repository manager artifact. Maven Artifact是一个Java类,它表示由存储库管理器取消引用到存储库管理器工件中的“名称”类型。 When used in this sense, an Artifact is just a glorified name made up of such parts as groupId , artifactId , version , scope , classifier and so on. 在这个意义上使用时, Artifact只是一个美化的名称,由groupIdartifactIdversionscopeclassifier等部分组成。

To put it all together: 把它们放在一起:

  • Your Maven project probably depends on several Artifact s by way of its <dependency> elements. 您的Maven项目可能通过其<dependency>元素依赖于几个Artifact
  • Maven interacts with a repository manager to resolve those Artifact s into files by instructing the repository manager to send it some repository manager artifacts that correspond to the internal Artifact s. Maven与存储库管理器交互,通过指示存储库管理器向其发送一些与内部Artifact对应的存储库管理器工件,将这些Artifact解析为文件。
  • Finally, after resolution, Maven builds your project and produces a Maven artifact. 最后,在解决之后,Maven构建您的项目并生成Maven工件。 You may choose to "turn this into" a repository manager artifact by, in turn, using whatever tool you like, sending it to the repository manager with enough coordinating information that other people can find it when they ask the repository manager for it. 您可以选择“把它变成”由仓库管理器神器,反过来,用你喜欢的任何工具,它有足够的协调信息,其他人可以找到它当他们问仓库管理员将数据发送到存储库管理。

Hope that helps. 希望有所帮助。


#3楼

An artifact is a JAR or something that you store in a repository. 工件是JAR或存储在存储库中的东西。 Maven gets them out and builds your code. Maven将它们取出并构建您的代码。


#4楼

To maven, the build process is arranged as a set of artifacts. 对于maven,构建过程被安排为一组工件。 Artifacts include: 文物包括:

  1. The plugins that make up Maven itself. 构成Maven的插件本身。
  2. Dependencies that your code depends on. 代码所依赖的依赖关系。
  3. Anything that your build produces that can, in turn be consumed by something else. 构建产生的任何东西都可以被其他东西消耗掉。

Artifacts live in repositories. 工件存放在存储库中。


#5楼

In general software terms, an " " is something produced by the software development process, whether it be software related documentation or an executable file. 在一般软件术语中,“ ”是由软件开发过程产生的东西,无论是软件相关文档还是可执行文件。

In Maven terminology, the artifact is the resulting output of the maven build, generally a jar or war or other executable file. 在Maven术语中,工件是maven构建的结果输出,通常是jarwar或其他可执行文件。 Artifacts in maven are identified by a coordinate system of groupId, artifactId, and version. maven中的工件由groupId,artifactId和version的坐标系标识。 Maven uses the groupId , artifactId , and version to identify dependencies (usually other jar files) needed to build and run your code. Maven使用groupIdartifactIdversion来识别构建和运行代码所需的依赖项(通常是其他jar文件)。


#6楼

An artifact is a file, usually a JAR, that gets deployed to a Maven repository. 工件是一个文件,通常是JAR,可以部署到Maven存储库。

A Maven build produces one or more artifacts, such as a compiled JAR and a "sources" JAR. Maven构建会生成一个或多个工件,例如已编译的JAR和“sources”JAR。

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. 每个工件都有一个组ID(通常是反向域名,如com.example.foo),工件ID(只是一个名称)和一个版本字符串。 The three together uniquely identify the artifact. 三者一起唯一地识别工件。

A project's dependencies are specified as artifacts. 项目的依赖项被指定为工件。

转载地址:http://kmlgj.baihongyu.com/

你可能感兴趣的文章
【STM32+w5500汇总】23,HTTP_Client 连接到ONENET上传了一段数据之后会断开,数据上传格式的设置
查看>>
【STM32+W5500+HTTPClient】25,路由器DHCP租赁IP时间为2h,NetBios可以很好的解决IP变化的问题,DNS,2018年12月25日
查看>>
【STM32CubeMX+FreeRTOS 】29,prtinf卡死;4任务只运行了3个;W5500联网失败(堆栈不能太大或者太小)
查看>>
【STM32+FPGA+FSMC】31,FSMC熟练掌握;KEIL5生成bin文件;SDRAM的使用;IAP检验码 2019年04月10日
查看>>
【IC1】【转 非常好】运算放大器使用的六个经验
查看>>
【IC-ADC 3】ADC的选型
查看>>
HiKey960/970用户手册;HiKey960 Development Board User Manual
查看>>
【书籍推荐】FPGA,xilinx
查看>>
N9-SQL注入(union注入)
查看>>
N10-sql注入(information_schema注入)
查看>>
N1-Kali虚拟机中SQLmap
查看>>
N11-sql注入(http头注入)
查看>>
N2-sqlmap初使用
查看>>
N12-sql盲注原理以及boolean盲注案例实现
查看>>
N13-sqli盲注 基于时间型
查看>>
N1 技术心得 2019-6-26
查看>>
N1-环境配置
查看>>
N2-审计方法与步骤
查看>>
N3-常见的INI配置
查看>>
代码审计 N4 常见危险函数和特殊函数(一)
查看>>