URL直接下载jetty

URL to directly download jetty

来自 eclipse jetty 下载站点的以下 URL 不能通过 wget

http://eclipse.org/downloads/download.php?file=/jetty/stable-9/dist/jetty-distribution-9.2.8.v20150217.zip&r=1

显然需要在浏览器中运行这个?

运行 wget 的方法是什么。以下命令以 xml 文档结束 - 而不是所需的码头 jar 文件

wget -O jetty.zip http://eclipse.org/downloads/download.php?file=/jetty/stable-9/dist/jetty-distribution-9.2.8.v20150217.zip&r=1

所有工件,包括 jetty-distribution 也可以在

上找到

central.maven.org

只需要知道您想要的工件的 Maven 坐标,然后从那里拼凑 URL。

Search for jetty-distribution on search.maven.org

所以下面这个神器...

<dependency>
    <groupId>org.eclipse.jetty</groupId>
    <artifactId>jetty-distribution</artifactId>
    <version>9.2.8.v20150217</version>
</dependency>

反对工件存储库树的现在标准格式。

key:
{aid} = artifactId
{gid} = groupId
{ver} = version
{type} = type
{classifier} = classifier

http://central.maven.org/maven2/{gid}/{aid}/{ver}/{aid}-{ver}.{type}

.. and with optional {classifier} ...

http://central.maven.org/maven2/{gid}/{aid}/{ver}/{aid}-{ver}-{classifier}.{type}

导致版本 9.2.8.v20150217 的工件 jetty-distribution 的 URL 类型 tar.gz ...

http://central.maven.org/maven2/org/eclipse/jetty/jetty-distribution/9.2.8.v20150217/jetty-distribution-9.2.8.v20150217.tar.gz

注意:当您计算最终的 URL

时,groupId 中的 . 将转换为 /