通过ivy依赖解析下载Netty失败
Downloading Netty through Ivy dependency resolution fails
我正在尝试在 Ant 中使用 Ivy 来解决我的项目的依赖关系,其中之一是 Netty。
我现在的 ivy.xml
是这样的:
<ivy-module version="2.4">
<info organisation="foo" module="bar"/>
<dependencies>
<dependency org="io.netty" name="netty-all" rev="4.0.30.Final"/>
</dependencies>
</ivy-module>
当我在 build.xml
中执行 <ivy:retrieve/>
时,我得到以下输出:
download-ivy:
[echo] Downloading ivy to /home/emichael/.ant/lib...
[mkdir] Created dir: /home/emichael/.ant/lib
[get] Getting: http://repo2.maven.org/maven2/org/apache/ivy/ivy/2.4.0/ivy-2.4.0.jar
[get] To: /home/emichael/.ant/lib/ivy.jar
init-ivy:
resolve:
[ivy:retrieve] :: Apache Ivy 2.4.0 - 20141213170938 :: http://ant.apache.org/ivy/ ::
[ivy:retrieve] :: loading settings :: url = jar:file:/home/emichael/.ant/lib/ivy.jar!/org/apache/ivy/core/settings/ivysettings.xml
[ivy:retrieve] :: resolving dependencies :: com.ellismichael#scalableagreement;working@fortuna
[ivy:retrieve] confs: [default]
[ivy:retrieve] found io.netty#netty-all;4.0.30.Final in public
[ivy:retrieve] found io.netty#netty-buffer;4.0.30.Final in public
[ivy:retrieve] found io.netty#netty-common;4.0.30.Final in public
[ivy:retrieve] found io.netty#netty-codec;4.0.30.Final in public
[ivy:retrieve] found io.netty#netty-transport;4.0.30.Final in public
[ivy:retrieve] found io.netty#netty-codec-haproxy;4.0.30.Final in public
[ivy:retrieve] found io.netty#netty-codec-http;4.0.30.Final in public
[ivy:retrieve] found io.netty#netty-handler;4.0.30.Final in public
[ivy:retrieve] found io.netty#netty-codec-socks;4.0.30.Final in public
[ivy:retrieve] found io.netty#netty-transport-rxtx;4.0.30.Final in public
[ivy:retrieve] found org.rxtx#rxtx;2.1.7 in public
[ivy:retrieve] found io.netty#netty-transport-sctp;4.0.30.Final in public
[ivy:retrieve] found io.netty#netty-transport-udt;4.0.30.Final in public
[ivy:retrieve] found com.barchart.udt#barchart-udt-bundle;2.3.0 in public
[ivy:retrieve] found io.netty#netty-example;4.0.30.Final in public
[ivy:retrieve] found com.google.protobuf#protobuf-java;2.5.0 in public
[ivy:retrieve] found io.netty#netty-tcnative;1.1.33.Fork4 in public
[ivy:retrieve] found org.eclipse.jetty.npn#npn-api;1.1.1.v20141010 in public
[ivy:retrieve] found com.yammer.metrics#metrics-core;2.2.0 in public
[ivy:retrieve] found org.slf4j#slf4j-api;1.7.5 in public
[ivy:retrieve] found org.jboss.marshalling#jboss-marshalling;1.3.18.GA in public
[ivy:retrieve] found commons-logging#commons-logging;1.1.3 in public
[ivy:retrieve] found log4j#log4j;1.2.17 in public
[ivy:retrieve] downloading https://repo1.maven.org/maven2/io/netty/netty-all/4.0.30.Final/netty-all-4.0.30.Final-sources.jar ...
[ivy:retrieve] ....................................................................................................... (1621kB)
[ivy:retrieve] .. (0kB)
[ivy:retrieve] [SUCCESSFUL ] io.netty#netty-all;4.0.30.Final!netty-all.jar(source) (397ms)
[ivy:retrieve] downloading https://repo1.maven.org/maven2/io/netty/netty-all/4.0.30.Final/netty-all-4.0.30.Final-javadoc.jar ...
[ivy:retrieve] ........................................................................................................................................................................................................................................................................................ (4453kB)
[ivy:retrieve] .. (0kB)
[ivy:retrieve] [SUCCESSFUL ] io.netty#netty-all;4.0.30.Final!netty-all.jar(javadoc) (361ms)
[ivy:retrieve] downloading https://repo1.maven.org/maven2/io/netty/netty-all/4.0.30.Final/netty-all-4.0.30.Final.jar ...
[ivy:retrieve] ................................................................................................................................. (2009kB)
[ivy:retrieve] .. (0kB)
[ivy:retrieve] [SUCCESSFUL ] io.netty#netty-all;4.0.30.Final!netty-all.jar (166ms)
[ivy:retrieve] downloading https://repo1.maven.org/maven2/io/netty/netty-buffer/4.0.30.Final/netty-buffer-4.0.30.Final.jar ...
[ivy:retrieve] ............. (185kB)
[ivy:retrieve] .. (0kB)
[ivy:retrieve] [SUCCESSFUL ] io.netty#netty-buffer;4.0.30.Final!netty-buffer.jar (105ms)
[ivy:retrieve] downloading https://repo1.maven.org/maven2/io/netty/netty-codec/4.0.30.Final/netty-codec-4.0.30.Final.jar ...
[ivy:retrieve] .......... (141kB)
[ivy:retrieve] .. (0kB)
[ivy:retrieve] [SUCCESSFUL ] io.netty#netty-codec;4.0.30.Final!netty-codec.jar (93ms)
[ivy:retrieve] downloading https://repo1.maven.org/maven2/io/netty/netty-codec-haproxy/4.0.30.Final/netty-codec-haproxy-4.0.30.Final.jar ...
[ivy:retrieve] ... (19kB)
[ivy:retrieve] .. (0kB)
[ivy:retrieve] [SUCCESSFUL ] io.netty#netty-codec-haproxy;4.0.30.Final!netty-codec-haproxy.jar (88ms)
[ivy:retrieve] downloading https://repo1.maven.org/maven2/io/netty/netty-codec-http/4.0.30.Final/netty-codec-http-4.0.30.Final.jar ...
[ivy:retrieve] ............................ (429kB)
[ivy:retrieve] .. (0kB)
[ivy:retrieve] [SUCCESSFUL ] io.netty#netty-codec-http;4.0.30.Final!netty-codec-http.jar (105ms)
[ivy:retrieve] downloading https://repo1.maven.org/maven2/io/netty/netty-codec-socks/4.0.30.Final/netty-codec-socks-4.0.30.Final.jar ...
[ivy:retrieve] ..... (48kB)
[ivy:retrieve] .. (0kB)
[ivy:retrieve] [SUCCESSFUL ] io.netty#netty-codec-socks;4.0.30.Final!netty-codec-socks.jar (87ms)
[ivy:retrieve] downloading https://repo1.maven.org/maven2/io/netty/netty-common/4.0.30.Final/netty-common-4.0.30.Final.jar ...
[ivy:retrieve] ............................ (426kB)
[ivy:retrieve] .. (0kB)
[ivy:retrieve] [SUCCESSFUL ] io.netty#netty-common;4.0.30.Final!netty-common.jar (123ms)
[ivy:retrieve] downloading https://repo1.maven.org/maven2/io/netty/netty-handler/4.0.30.Final/netty-handler-4.0.30.Final.jar ...
[ivy:retrieve] ................. (243kB)
[ivy:retrieve] .. (0kB)
[ivy:retrieve] [SUCCESSFUL ] io.netty#netty-handler;4.0.30.Final!netty-handler.jar (102ms)
[ivy:retrieve] downloading https://repo1.maven.org/maven2/io/netty/netty-transport/4.0.30.Final/netty-transport-4.0.30.Final.jar ...
[ivy:retrieve] ...................... (335kB)
[ivy:retrieve] .. (0kB)
[ivy:retrieve] [SUCCESSFUL ] io.netty#netty-transport;4.0.30.Final!netty-transport.jar (100ms)
[ivy:retrieve] downloading https://repo1.maven.org/maven2/io/netty/netty-transport-rxtx/4.0.30.Final/netty-transport-rxtx-4.0.30.Final.jar ...
[ivy:retrieve] ... (17kB)
[ivy:retrieve] .. (0kB)
[ivy:retrieve] [SUCCESSFUL ] io.netty#netty-transport-rxtx;4.0.30.Final!netty-transport-rxtx.jar (88ms)
[ivy:retrieve] downloading https://repo1.maven.org/maven2/io/netty/netty-transport-sctp/4.0.30.Final/netty-transport-sctp-4.0.30.Final.jar ...
[ivy:retrieve] ..... (47kB)
[ivy:retrieve] .. (0kB)
[ivy:retrieve] [SUCCESSFUL ] io.netty#netty-transport-sctp;4.0.30.Final!netty-transport-sctp.jar (87ms)
[ivy:retrieve] downloading https://repo1.maven.org/maven2/io/netty/netty-transport-udt/4.0.30.Final/netty-transport-udt-4.0.30.Final.jar ...
[ivy:retrieve] ... (28kB)
[ivy:retrieve] .. (0kB)
[ivy:retrieve] [SUCCESSFUL ] io.netty#netty-transport-udt;4.0.30.Final!netty-transport-udt.jar (89ms)
[ivy:retrieve] downloading https://repo1.maven.org/maven2/io/netty/netty-example/4.0.30.Final/netty-example-4.0.30.Final.jar ...
[ivy:retrieve] .................... (291kB)
[ivy:retrieve] .. (0kB)
[ivy:retrieve] [SUCCESSFUL ] io.netty#netty-example;4.0.30.Final!netty-example.jar (99ms)
[ivy:retrieve] downloading https://repo1.maven.org/maven2/com/google/protobuf/protobuf-java/2.5.0/protobuf-java-2.5.0.jar ...
[ivy:retrieve] .................................. (520kB)
[ivy:retrieve] .. (0kB)
[ivy:retrieve] [SUCCESSFUL ] com.google.protobuf#protobuf-java;2.5.0!protobuf-java.jar(bundle) (111ms)
[ivy:retrieve] downloading https://repo1.maven.org/maven2/org/jboss/marshalling/jboss-marshalling/1.3.18.GA/jboss-marshalling-1.3.18.GA.jar ...
[ivy:retrieve] ................ (228kB)
[ivy:retrieve] .. (0kB)
[ivy:retrieve] [SUCCESSFUL ] org.jboss.marshalling#jboss-marshalling;1.3.18.GA!jboss-marshalling.jar (95ms)
[ivy:retrieve] downloading https://repo1.maven.org/maven2/org/slf4j/slf4j-api/1.7.5/slf4j-api-1.7.5.jar ...
[ivy:retrieve] ... (25kB)
[ivy:retrieve] .. (0kB)
[ivy:retrieve] [SUCCESSFUL ] org.slf4j#slf4j-api;1.7.5!slf4j-api.jar (86ms)
[ivy:retrieve] downloading https://repo1.maven.org/maven2/commons-logging/commons-logging/1.1.3/commons-logging-1.1.3.jar ...
[ivy:retrieve] ..... (60kB)
[ivy:retrieve] .. (0kB)
[ivy:retrieve] [SUCCESSFUL ] commons-logging#commons-logging;1.1.3!commons-logging.jar (89ms)
[ivy:retrieve] downloading https://repo1.maven.org/maven2/log4j/log4j/1.2.17/log4j-1.2.17.jar ...
[ivy:retrieve] ............................... (478kB)
[ivy:retrieve] .. (0kB)
[ivy:retrieve] [SUCCESSFUL ] log4j#log4j;1.2.17!log4j.jar(bundle) (134ms)
[ivy:retrieve] downloading https://repo1.maven.org/maven2/org/rxtx/rxtx/2.1.7/rxtx-2.1.7.jar ...
[ivy:retrieve] ..... (58kB)
[ivy:retrieve] .. (0kB)
[ivy:retrieve] [SUCCESSFUL ] org.rxtx#rxtx;2.1.7!rxtx.jar (87ms)
[ivy:retrieve] downloading https://repo1.maven.org/maven2/com/barchart/udt/barchart-udt-bundle/2.3.0/barchart-udt-bundle-2.3.0.jar ...
[ivy:retrieve] ................................................................................................................ (1774kB)
[ivy:retrieve] .. (0kB)
[ivy:retrieve] [SUCCESSFUL ] com.barchart.udt#barchart-udt-bundle;2.3.0!barchart-udt-bundle.jar(bundle) (170ms)
[ivy:retrieve] downloading https://repo1.maven.org/maven2/org/eclipse/jetty/npn/npn-api/1.1.1.v20141010/npn-api-1.1.1.v20141010.jar ...
[ivy:retrieve] .. (5kB)
[ivy:retrieve] .. (0kB)
[ivy:retrieve] [SUCCESSFUL ] org.eclipse.jetty.npn#npn-api;1.1.1.v20141010!npn-api.jar (87ms)
[ivy:retrieve] downloading https://repo1.maven.org/maven2/com/yammer/metrics/metrics-core/2.2.0/metrics-core-2.2.0.jar ...
[ivy:retrieve] ....... (80kB)
[ivy:retrieve] .. (0kB)
[ivy:retrieve] [SUCCESSFUL ] com.yammer.metrics#metrics-core;2.2.0!metrics-core.jar (89ms)
[ivy:retrieve] :: resolution report :: resolve 12177ms :: artifacts dl 3111ms
---------------------------------------------------------------------
| | modules || artifacts |
| conf | number| search|dwnlded|evicted|| number|dwnlded|
---------------------------------------------------------------------
| default | 23 | 23 | 23 | 0 || 25 | 24 |
---------------------------------------------------------------------
[ivy:retrieve]
[ivy:retrieve] :: problems summary ::
[ivy:retrieve] :::: WARNINGS
[ivy:retrieve] [FAILED ] io.netty#netty-tcnative;1.1.33.Fork4!netty-tcnative.jar: (0ms)
[ivy:retrieve] ==== shared: tried
[ivy:retrieve] /home/emichael/.ant/shared/io.netty/netty-tcnative/1.1.33.Fork4/jars/netty-tcnative.jar
[ivy:retrieve] ==== public: tried
[ivy:retrieve] https://repo1.maven.org/maven2/io/netty/netty-tcnative/1.1.33.Fork4/netty-tcnative-1.1.33.Fork4-${os.detected.classifier}.jar
[ivy:retrieve] ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:retrieve] :: FAILED DOWNLOADS ::
[ivy:retrieve] :: ^ see resolution messages for details ^ ::
[ivy:retrieve] ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:retrieve] :: io.netty#netty-tcnative;1.1.33.Fork4!netty-tcnative.jar
[ivy:retrieve] ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:retrieve]
[ivy:retrieve] :: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS
BUILD FAILED
问题似乎是 ${os.detected.classifier}
未定义。至少,这是唯一对我有意义的事情,因为 https://repo1.maven.org/maven2/io/netty/netty-tcnative/1.1.33.Fork4/ 确实存在并且肯定有很多罐子。谷歌搜索 os.detected.classifier 除了 netty-tcnative 项目的 link 之外没有太多收获,但似乎 netty 在其依赖项解析中使用了一些 maven 插件。它甚至有可能通过 Ivy 获得 netty,还是我做的不对?
另外,奇怪的是,完全取决于
<dependency org="io.netty" name="netty-tcnative" rev="1.1.33.Fork4"/>
解决得很好,但取决于
<dependency org="io.netty" name="netty-tcnative" rev="1.1.33.Fork4"/>
<dependency org="io.netty" name="netty-all" rev="4.0.30.Final"/>
失败。
问题是ivy不理解optional tag in the netty-tcnative dependency (see parent pom)。 Maven 不会尝试下载它,如果你想要它,你必须自己添加它,然后需要定义分类器。由于常春藤不理解这一点,您需要将其添加为排除:
<dependency org="io.netty" name="netty-all" rev="4.0.30.Final">
<exclude org="io.netty" name="netty-tcnative"/>
</dependency>
对于 Maven 来说是:
<dependencies>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-example</artifactId>
<version>4.0.34.Final</version>
<exclusions>
<exclusion>
<groupId>io.netty</groupId>
<artifactId>netty-tcnative</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
我正在尝试在 Ant 中使用 Ivy 来解决我的项目的依赖关系,其中之一是 Netty。
我现在的 ivy.xml
是这样的:
<ivy-module version="2.4">
<info organisation="foo" module="bar"/>
<dependencies>
<dependency org="io.netty" name="netty-all" rev="4.0.30.Final"/>
</dependencies>
</ivy-module>
当我在 build.xml
中执行 <ivy:retrieve/>
时,我得到以下输出:
download-ivy:
[echo] Downloading ivy to /home/emichael/.ant/lib...
[mkdir] Created dir: /home/emichael/.ant/lib
[get] Getting: http://repo2.maven.org/maven2/org/apache/ivy/ivy/2.4.0/ivy-2.4.0.jar
[get] To: /home/emichael/.ant/lib/ivy.jar
init-ivy:
resolve:
[ivy:retrieve] :: Apache Ivy 2.4.0 - 20141213170938 :: http://ant.apache.org/ivy/ ::
[ivy:retrieve] :: loading settings :: url = jar:file:/home/emichael/.ant/lib/ivy.jar!/org/apache/ivy/core/settings/ivysettings.xml
[ivy:retrieve] :: resolving dependencies :: com.ellismichael#scalableagreement;working@fortuna
[ivy:retrieve] confs: [default]
[ivy:retrieve] found io.netty#netty-all;4.0.30.Final in public
[ivy:retrieve] found io.netty#netty-buffer;4.0.30.Final in public
[ivy:retrieve] found io.netty#netty-common;4.0.30.Final in public
[ivy:retrieve] found io.netty#netty-codec;4.0.30.Final in public
[ivy:retrieve] found io.netty#netty-transport;4.0.30.Final in public
[ivy:retrieve] found io.netty#netty-codec-haproxy;4.0.30.Final in public
[ivy:retrieve] found io.netty#netty-codec-http;4.0.30.Final in public
[ivy:retrieve] found io.netty#netty-handler;4.0.30.Final in public
[ivy:retrieve] found io.netty#netty-codec-socks;4.0.30.Final in public
[ivy:retrieve] found io.netty#netty-transport-rxtx;4.0.30.Final in public
[ivy:retrieve] found org.rxtx#rxtx;2.1.7 in public
[ivy:retrieve] found io.netty#netty-transport-sctp;4.0.30.Final in public
[ivy:retrieve] found io.netty#netty-transport-udt;4.0.30.Final in public
[ivy:retrieve] found com.barchart.udt#barchart-udt-bundle;2.3.0 in public
[ivy:retrieve] found io.netty#netty-example;4.0.30.Final in public
[ivy:retrieve] found com.google.protobuf#protobuf-java;2.5.0 in public
[ivy:retrieve] found io.netty#netty-tcnative;1.1.33.Fork4 in public
[ivy:retrieve] found org.eclipse.jetty.npn#npn-api;1.1.1.v20141010 in public
[ivy:retrieve] found com.yammer.metrics#metrics-core;2.2.0 in public
[ivy:retrieve] found org.slf4j#slf4j-api;1.7.5 in public
[ivy:retrieve] found org.jboss.marshalling#jboss-marshalling;1.3.18.GA in public
[ivy:retrieve] found commons-logging#commons-logging;1.1.3 in public
[ivy:retrieve] found log4j#log4j;1.2.17 in public
[ivy:retrieve] downloading https://repo1.maven.org/maven2/io/netty/netty-all/4.0.30.Final/netty-all-4.0.30.Final-sources.jar ...
[ivy:retrieve] ....................................................................................................... (1621kB)
[ivy:retrieve] .. (0kB)
[ivy:retrieve] [SUCCESSFUL ] io.netty#netty-all;4.0.30.Final!netty-all.jar(source) (397ms)
[ivy:retrieve] downloading https://repo1.maven.org/maven2/io/netty/netty-all/4.0.30.Final/netty-all-4.0.30.Final-javadoc.jar ...
[ivy:retrieve] ........................................................................................................................................................................................................................................................................................ (4453kB)
[ivy:retrieve] .. (0kB)
[ivy:retrieve] [SUCCESSFUL ] io.netty#netty-all;4.0.30.Final!netty-all.jar(javadoc) (361ms)
[ivy:retrieve] downloading https://repo1.maven.org/maven2/io/netty/netty-all/4.0.30.Final/netty-all-4.0.30.Final.jar ...
[ivy:retrieve] ................................................................................................................................. (2009kB)
[ivy:retrieve] .. (0kB)
[ivy:retrieve] [SUCCESSFUL ] io.netty#netty-all;4.0.30.Final!netty-all.jar (166ms)
[ivy:retrieve] downloading https://repo1.maven.org/maven2/io/netty/netty-buffer/4.0.30.Final/netty-buffer-4.0.30.Final.jar ...
[ivy:retrieve] ............. (185kB)
[ivy:retrieve] .. (0kB)
[ivy:retrieve] [SUCCESSFUL ] io.netty#netty-buffer;4.0.30.Final!netty-buffer.jar (105ms)
[ivy:retrieve] downloading https://repo1.maven.org/maven2/io/netty/netty-codec/4.0.30.Final/netty-codec-4.0.30.Final.jar ...
[ivy:retrieve] .......... (141kB)
[ivy:retrieve] .. (0kB)
[ivy:retrieve] [SUCCESSFUL ] io.netty#netty-codec;4.0.30.Final!netty-codec.jar (93ms)
[ivy:retrieve] downloading https://repo1.maven.org/maven2/io/netty/netty-codec-haproxy/4.0.30.Final/netty-codec-haproxy-4.0.30.Final.jar ...
[ivy:retrieve] ... (19kB)
[ivy:retrieve] .. (0kB)
[ivy:retrieve] [SUCCESSFUL ] io.netty#netty-codec-haproxy;4.0.30.Final!netty-codec-haproxy.jar (88ms)
[ivy:retrieve] downloading https://repo1.maven.org/maven2/io/netty/netty-codec-http/4.0.30.Final/netty-codec-http-4.0.30.Final.jar ...
[ivy:retrieve] ............................ (429kB)
[ivy:retrieve] .. (0kB)
[ivy:retrieve] [SUCCESSFUL ] io.netty#netty-codec-http;4.0.30.Final!netty-codec-http.jar (105ms)
[ivy:retrieve] downloading https://repo1.maven.org/maven2/io/netty/netty-codec-socks/4.0.30.Final/netty-codec-socks-4.0.30.Final.jar ...
[ivy:retrieve] ..... (48kB)
[ivy:retrieve] .. (0kB)
[ivy:retrieve] [SUCCESSFUL ] io.netty#netty-codec-socks;4.0.30.Final!netty-codec-socks.jar (87ms)
[ivy:retrieve] downloading https://repo1.maven.org/maven2/io/netty/netty-common/4.0.30.Final/netty-common-4.0.30.Final.jar ...
[ivy:retrieve] ............................ (426kB)
[ivy:retrieve] .. (0kB)
[ivy:retrieve] [SUCCESSFUL ] io.netty#netty-common;4.0.30.Final!netty-common.jar (123ms)
[ivy:retrieve] downloading https://repo1.maven.org/maven2/io/netty/netty-handler/4.0.30.Final/netty-handler-4.0.30.Final.jar ...
[ivy:retrieve] ................. (243kB)
[ivy:retrieve] .. (0kB)
[ivy:retrieve] [SUCCESSFUL ] io.netty#netty-handler;4.0.30.Final!netty-handler.jar (102ms)
[ivy:retrieve] downloading https://repo1.maven.org/maven2/io/netty/netty-transport/4.0.30.Final/netty-transport-4.0.30.Final.jar ...
[ivy:retrieve] ...................... (335kB)
[ivy:retrieve] .. (0kB)
[ivy:retrieve] [SUCCESSFUL ] io.netty#netty-transport;4.0.30.Final!netty-transport.jar (100ms)
[ivy:retrieve] downloading https://repo1.maven.org/maven2/io/netty/netty-transport-rxtx/4.0.30.Final/netty-transport-rxtx-4.0.30.Final.jar ...
[ivy:retrieve] ... (17kB)
[ivy:retrieve] .. (0kB)
[ivy:retrieve] [SUCCESSFUL ] io.netty#netty-transport-rxtx;4.0.30.Final!netty-transport-rxtx.jar (88ms)
[ivy:retrieve] downloading https://repo1.maven.org/maven2/io/netty/netty-transport-sctp/4.0.30.Final/netty-transport-sctp-4.0.30.Final.jar ...
[ivy:retrieve] ..... (47kB)
[ivy:retrieve] .. (0kB)
[ivy:retrieve] [SUCCESSFUL ] io.netty#netty-transport-sctp;4.0.30.Final!netty-transport-sctp.jar (87ms)
[ivy:retrieve] downloading https://repo1.maven.org/maven2/io/netty/netty-transport-udt/4.0.30.Final/netty-transport-udt-4.0.30.Final.jar ...
[ivy:retrieve] ... (28kB)
[ivy:retrieve] .. (0kB)
[ivy:retrieve] [SUCCESSFUL ] io.netty#netty-transport-udt;4.0.30.Final!netty-transport-udt.jar (89ms)
[ivy:retrieve] downloading https://repo1.maven.org/maven2/io/netty/netty-example/4.0.30.Final/netty-example-4.0.30.Final.jar ...
[ivy:retrieve] .................... (291kB)
[ivy:retrieve] .. (0kB)
[ivy:retrieve] [SUCCESSFUL ] io.netty#netty-example;4.0.30.Final!netty-example.jar (99ms)
[ivy:retrieve] downloading https://repo1.maven.org/maven2/com/google/protobuf/protobuf-java/2.5.0/protobuf-java-2.5.0.jar ...
[ivy:retrieve] .................................. (520kB)
[ivy:retrieve] .. (0kB)
[ivy:retrieve] [SUCCESSFUL ] com.google.protobuf#protobuf-java;2.5.0!protobuf-java.jar(bundle) (111ms)
[ivy:retrieve] downloading https://repo1.maven.org/maven2/org/jboss/marshalling/jboss-marshalling/1.3.18.GA/jboss-marshalling-1.3.18.GA.jar ...
[ivy:retrieve] ................ (228kB)
[ivy:retrieve] .. (0kB)
[ivy:retrieve] [SUCCESSFUL ] org.jboss.marshalling#jboss-marshalling;1.3.18.GA!jboss-marshalling.jar (95ms)
[ivy:retrieve] downloading https://repo1.maven.org/maven2/org/slf4j/slf4j-api/1.7.5/slf4j-api-1.7.5.jar ...
[ivy:retrieve] ... (25kB)
[ivy:retrieve] .. (0kB)
[ivy:retrieve] [SUCCESSFUL ] org.slf4j#slf4j-api;1.7.5!slf4j-api.jar (86ms)
[ivy:retrieve] downloading https://repo1.maven.org/maven2/commons-logging/commons-logging/1.1.3/commons-logging-1.1.3.jar ...
[ivy:retrieve] ..... (60kB)
[ivy:retrieve] .. (0kB)
[ivy:retrieve] [SUCCESSFUL ] commons-logging#commons-logging;1.1.3!commons-logging.jar (89ms)
[ivy:retrieve] downloading https://repo1.maven.org/maven2/log4j/log4j/1.2.17/log4j-1.2.17.jar ...
[ivy:retrieve] ............................... (478kB)
[ivy:retrieve] .. (0kB)
[ivy:retrieve] [SUCCESSFUL ] log4j#log4j;1.2.17!log4j.jar(bundle) (134ms)
[ivy:retrieve] downloading https://repo1.maven.org/maven2/org/rxtx/rxtx/2.1.7/rxtx-2.1.7.jar ...
[ivy:retrieve] ..... (58kB)
[ivy:retrieve] .. (0kB)
[ivy:retrieve] [SUCCESSFUL ] org.rxtx#rxtx;2.1.7!rxtx.jar (87ms)
[ivy:retrieve] downloading https://repo1.maven.org/maven2/com/barchart/udt/barchart-udt-bundle/2.3.0/barchart-udt-bundle-2.3.0.jar ...
[ivy:retrieve] ................................................................................................................ (1774kB)
[ivy:retrieve] .. (0kB)
[ivy:retrieve] [SUCCESSFUL ] com.barchart.udt#barchart-udt-bundle;2.3.0!barchart-udt-bundle.jar(bundle) (170ms)
[ivy:retrieve] downloading https://repo1.maven.org/maven2/org/eclipse/jetty/npn/npn-api/1.1.1.v20141010/npn-api-1.1.1.v20141010.jar ...
[ivy:retrieve] .. (5kB)
[ivy:retrieve] .. (0kB)
[ivy:retrieve] [SUCCESSFUL ] org.eclipse.jetty.npn#npn-api;1.1.1.v20141010!npn-api.jar (87ms)
[ivy:retrieve] downloading https://repo1.maven.org/maven2/com/yammer/metrics/metrics-core/2.2.0/metrics-core-2.2.0.jar ...
[ivy:retrieve] ....... (80kB)
[ivy:retrieve] .. (0kB)
[ivy:retrieve] [SUCCESSFUL ] com.yammer.metrics#metrics-core;2.2.0!metrics-core.jar (89ms)
[ivy:retrieve] :: resolution report :: resolve 12177ms :: artifacts dl 3111ms
---------------------------------------------------------------------
| | modules || artifacts |
| conf | number| search|dwnlded|evicted|| number|dwnlded|
---------------------------------------------------------------------
| default | 23 | 23 | 23 | 0 || 25 | 24 |
---------------------------------------------------------------------
[ivy:retrieve]
[ivy:retrieve] :: problems summary ::
[ivy:retrieve] :::: WARNINGS
[ivy:retrieve] [FAILED ] io.netty#netty-tcnative;1.1.33.Fork4!netty-tcnative.jar: (0ms)
[ivy:retrieve] ==== shared: tried
[ivy:retrieve] /home/emichael/.ant/shared/io.netty/netty-tcnative/1.1.33.Fork4/jars/netty-tcnative.jar
[ivy:retrieve] ==== public: tried
[ivy:retrieve] https://repo1.maven.org/maven2/io/netty/netty-tcnative/1.1.33.Fork4/netty-tcnative-1.1.33.Fork4-${os.detected.classifier}.jar
[ivy:retrieve] ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:retrieve] :: FAILED DOWNLOADS ::
[ivy:retrieve] :: ^ see resolution messages for details ^ ::
[ivy:retrieve] ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:retrieve] :: io.netty#netty-tcnative;1.1.33.Fork4!netty-tcnative.jar
[ivy:retrieve] ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:retrieve]
[ivy:retrieve] :: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS
BUILD FAILED
问题似乎是 ${os.detected.classifier}
未定义。至少,这是唯一对我有意义的事情,因为 https://repo1.maven.org/maven2/io/netty/netty-tcnative/1.1.33.Fork4/ 确实存在并且肯定有很多罐子。谷歌搜索 os.detected.classifier 除了 netty-tcnative 项目的 link 之外没有太多收获,但似乎 netty 在其依赖项解析中使用了一些 maven 插件。它甚至有可能通过 Ivy 获得 netty,还是我做的不对?
另外,奇怪的是,完全取决于
<dependency org="io.netty" name="netty-tcnative" rev="1.1.33.Fork4"/>
解决得很好,但取决于
<dependency org="io.netty" name="netty-tcnative" rev="1.1.33.Fork4"/>
<dependency org="io.netty" name="netty-all" rev="4.0.30.Final"/>
失败。
问题是ivy不理解optional tag in the netty-tcnative dependency (see parent pom)。 Maven 不会尝试下载它,如果你想要它,你必须自己添加它,然后需要定义分类器。由于常春藤不理解这一点,您需要将其添加为排除:
<dependency org="io.netty" name="netty-all" rev="4.0.30.Final">
<exclude org="io.netty" name="netty-tcnative"/>
</dependency>
对于 Maven 来说是:
<dependencies>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-example</artifactId>
<version>4.0.34.Final</version>
<exclusions>
<exclusion>
<groupId>io.netty</groupId>
<artifactId>netty-tcnative</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>