apache - pom.xml中项目标签下的 "<url>http://maven.apache.org</url>"标签是什么?

标签 apache maven url

很长一段时间以来,我都将依赖管理工具用作 Maven。
我不明白 的必要性是什么网址 下 pom.xml 中的标记项目标签。

<project>
  <modelVersion>4.0.0</modelVersion>

  <groupId>com.mycompany.app</groupId>
  <artifactId>my-app</artifactId>
  <version>1.0-SNAPSHOT</version>
  <packaging>jar</packaging>

  <name>Maven Quick Start Archetype</name>
  <url>http://maven.apache.org</url>

  <dependencies>
    ...
  </dependencies>
</project>

最佳答案

url 为您提供有关项目的信息,项目所在的位置

来自文档(http://maven.apache.org/pom.html):

url: The URL, like the name, is not required. This is a nice gesture for projects users, however, so that they know where the project lives.url: The URL, like the name, is not required. This is a nice gesture for projects users, however, so that they know where the project lives.



例子

乔达时间:

https://github.com/JodaOrg/joda-time/blob/master/pom.xml
  <packaging>jar</packaging>
  <name>Joda-Time</name>
  <version>2.8-SNAPSHOT</version>
  <description>Date and time library to replace JDK date handling</description>
  <url>http://www.joda.org/joda-time/</url>

Apache 公共(public)语言:
http://svn.apache.org/viewvc/commons/proper/lang/trunk/pom.xml?view=markup
  <inceptionYear>2001</inceptionYear>
  <description>
    Apache Commons Lang, a package of Java utility classes for the
    classes that are in java.lang's hierarchy, or are considered to be so
    standard as to justify existence in java.lang.
  </description>
  <url>http://commons.apache.org/proper/commons-lang/</url>

关于apache - pom.xml中项目标签下的 "<url>http://maven.apache.org</url>"标签是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28292503/

相关文章:

php - Zend Server 8 PDO 无法通过 CLI 找到驱动程序

maven - pitest 找不到测试

java - Maven:从命令行添加测试目录

python - Django 在错误的应用程序中搜索 URL

javascript - 在 Filestack v3 中不获取 JSON 的值

ruby-on-rails - 直接访问页面时忽略上一个 URL 的 URI(request.referer).path

apache - 使用 htaccess RewriteRule 复制站点

php - Linux 服务器上的内部服务器错误 (500) 和 PHP max_execution_time

php - 图像文件未在 Apache Linux Fedora 17 中加载。403 禁止错误

java - 将 ivy.xml 转换为 pom.xml