为什么不是常青藤下载从我们的内联网回购的神器? [英] Why isn't Ivy downloading an artifact from our intranet repo?

查看:225
本文介绍了为什么不是常青藤下载从我们的内联网回购的神器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个原型常春藤建设工作得相当好。我只是看着它今天我看到,它的发现在我的内联网回购神器,但没有将其下载到本地缓存,或在我的本地构建,这会导致编译失败取回它。

I've had a prototype Ivy build working reasonably well. I just looked at it today and I'm seeing that it's finding an artifact on my intranet repo but not downloading it to the local cache or retrieving it in my local build, which causes the build to fail.

构建指定几个其他依赖关系,其中大部分上mavencentral被找到,和一个在同一本地Intranet回购另一个回购,它的发现(但不下载)的其它工件。

The build specifies several other dependencies, most of which are found on mavencentral, and one in another repo in the same local intranet repo that it's finding (but not downloading) the other artifact.

我试过几次,以清除缓存常春藤并再次运行,但它下载所有的文物,除了这个特殊的。

I've tried a few times to clear out the ivy cache and run this again, but it downloads all of the artifacts except for this particular one.

首先,这里是从构建输出有关,一些小件省略:

First, here is the relevant output from the build, with some minor pieces elided:

install-dependencies:
:: Apache Ivy 2.3.0 - 20130110142753 :: http://ant.apache.org/ivy/ ::
:: loading settings :: file = <pathtoivysettingsxmlfile>
:: resolving dependencies :: com.att.ecom.poc#coherence_poc;working@<hostname> [not transitive]
    confs: [default]
    found com.att.ecom.poc#poc-domain-model;0.0.1-SNAPSHOT in mavenCentralSnapshots
    found org.apache.commons#commons-lang3;3.1 in central
    found org.springframework#spring-aop;4.0.0.RELEASE in central
    found org.springframework#spring-beans;4.0.0.RELEASE in central
    found org.springframework#spring-context;4.0.0.RELEASE in central
    found org.springframework#spring-core;4.0.0.RELEASE in central
    found org.springframework#spring-expression;4.0.0.RELEASE in central
    found org.springframework#spring-web;4.0.0.RELEASE in central
    found com.oracle.coherence#coherence;12.1.2-0-0 in mavenCentralThirdparty
:: resolution report :: resolve 351ms :: artifacts dl 8ms
    ---------------------------------------------------------------------
    |                  |            modules            ||   artifacts   |
    |       conf       | number| search|dwnlded|evicted|| number|dwnlded|
    ---------------------------------------------------------------------
    |      default     |   9   |   0   |   0   |   0   ||   8   |   0   |
    ---------------------------------------------------------------------
:: retrieving :: com.att.ecom.poc#coherence_poc
    confs: [default]
    0 artifacts copied, 8 already retrieved (0kB/5ms)

在库mavenCentralSnapshots和mavenCentralThirdparty实际上对我们的本地Intranet的回购协议(也稀里糊涂被称为行家中心)。

The repositories "mavenCentralSnapshots" and "mavenCentralThirdparty" are actually on our local intranet repo (which is also confusedly called "maven central").

请注意,它说,有9个模块,但只有8人下载。在列表中,POC域模型第一神器是不是要下载的,但我不明白为什么。

Notice that it says there are 9 modules, but only 8 were downloaded. The first artifact in the list, "poc-domain-model" is the one that is not being downloaded, but I don't see why.

下面是我的ivysettings.xml文件:

Here is my "ivysettings.xml" file:

<ivysettings>
    <settings defaultResolver="default"/>
    <property name="m2-pattern" value="${user.home}/.m2/repository/[organisation]/[module]/[revision]/[module]-[revision](-[classifier]).[ext]" override="false" />
    <resolvers>
        <chain name="default">
            <filesystem name="local-maven2" m2compatible="true" >
                <artifact pattern="${m2-pattern}"/>
                <ivy pattern="${m2-pattern}"/>
            </filesystem>
            <ibiblio name="mavenCentralSnapshots" m2compatible="true"
             root="http://<hostandport>/nexus/content/repositories/cditspoc-snapshots"/>
            <ibiblio name="mavenCentralThirdparty" m2compatible="true"
             root="http://<hostandport>/nexus/content/repositories/cditspoc-3rd-party"/>
            <ibiblio name="central" m2compatible="true"/>
        </chain>
    </resolvers>
</ivysettings>

这是我的的ivy.xml

And here is my "ivy.xml":

<ivy-module version="2.0">
  <info organisation="com.att.ecom.poc" module="coherence_poc"/>
  <dependencies>
    <dependency org="com.att.ecom.poc" name="poc-domain-model" rev="0.0.1-SNAPSHOT"/>
    <dependency org="org.apache.commons" name="commons-lang3" rev="3.1"/>
    <dependency org="org.springframework" name="spring-aop" rev="4.0.0.RELEASE"/>
    <dependency org="org.springframework" name="spring-beans" rev="4.0.0.RELEASE"/>
    <dependency org="org.springframework" name="spring-context" rev="4.0.0.RELEASE"/>
    <dependency org="org.springframework" name="spring-core" rev="4.0.0.RELEASE"/>
    <dependency org="org.springframework" name="spring-expression" rev="4.0.0.RELEASE"/>
    <dependency org="org.springframework" name="spring-web" rev="4.0.0.RELEASE"/>
    <dependency org="com.oracle.coherence" name="coherence" rev="12.1.2-0-0"/>
  </dependencies>
</ivy-module>

最后,这里是从我的build.xml调用常春藤摘录:

And finally, here's the excerpt from my build.xml that calls Ivy:

<target name="install-dependencies">
  <ivy:resolve transitive="false" type="jar"/>
  <ivy:retrieve conf="*" type="jar" pattern="${basedir}/lib/[artifact]-[type]-[revision].[ext]"/>
</target>

这是我的明显的问题是什么,或者是有什么我可以做,以获得更多的信息?

Is it obvious what my problem is, or is there something I can do to get more information?

更新:

下面是我的com.att.ecom.poc-coherence_poc-default.xml中文件的消隐版本:

Here is an elided version of my "com.att.ecom.poc-coherence_poc-default.xml" file:

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="ivy-report.xsl"?>
<ivy-report version="1.0">
    <info
        organisation="com.att.ecom.poc"
        module="coherence_poc"
        revision="working@<hostname>"
        conf="default"
        confs="default"
        date="20140210084517"/>
    <dependencies>
        <module organisation="com.oracle.coherence" name="coherence">
            <revision name="12.1.2-0-0" status="release" pubdate="20131118143843" resolver="mavenCentralThirdparty" artresolver="mavenCentralThirdparty" homepage="" downloaded="false" searched="false" default="false" conf="system, default, optional, compile, *, provided, runtime, javadoc, sources, master" position="8">
                <metadata-artifact status="no" details="" size="2283" time="0" location="<homedir>\.ivy2\cache\com.oracle.coherence\coherence\ivy-12.1.2-0-0.xml" searched="false" origin-is-local="false" origin-location="<intranetmavenrepo>/nexus/content/repositories/cditspoc-3rd-party/com/oracle/coherence/coherence/12.1.2-0-0/coherence-12.1.2-0-0.pom"/>
                <caller organisation="com.att.ecom.poc" name="coherence_poc" conf="default" rev="12.1.2-0-0" rev-constraint-default="12.1.2-0-0" rev-constraint-dynamic="12.1.2-0-0" callerrev="working@<hostname>"/>
                <artifacts>
                    <artifact name="coherence" type="jar" ext="jar" status="no" details="" size="7027491" time="0" location="<homedir>\.ivy2\cache\com.oracle.coherence\coherence\jars\coherence-12.1.2-0-0.jar">
                        <origin-location is-local="false" location="<intranetmavenrepo>/nexus/content/repositories/cditspoc-3rd-party/com/oracle/coherence/coherence/12.1.2-0-0/coherence-12.1.2-0-0.jar"/>
                    </artifact>
                </artifacts>
            </revision>
        </module>
        <module organisation="org.springframework" name="spring-web">
            <revision name="4.0.0.RELEASE" status="release" pubdate="20131211234952" resolver="central" artresolver="central" homepage="https://github.com/SpringSource/spring-framework" downloaded="false" searched="false" default="false" conf="system, default, optional, compile, *, provided, runtime, javadoc, sources, master" position="7">
                <license name="The Apache Software License, Version 2.0" url="http://www.apache.org/licenses/LICENSE-2.0.txt"/>
                <metadata-artifact status="no" details="" size="5998" time="0" location="<homedir>\.ivy2\cache\org.springframework\spring-web\ivy-4.0.0.RELEASE.xml" searched="false" origin-is-local="false" origin-location="http://repo1.maven.org/maven2/org/springframework/spring-web/4.0.0.RELEASE/spring-web-4.0.0.RELEASE.pom"/>
                <caller organisation="com.att.ecom.poc" name="coherence_poc" conf="default" rev="4.0.0.RELEASE" rev-constraint-default="4.0.0.RELEASE" rev-constraint-dynamic="4.0.0.RELEASE" callerrev="working@<hostname>"/>
                <artifacts>
                    <artifact name="spring-web" type="jar" ext="jar" status="no" details="" size="661567" time="0" location="<homedir>\.ivy2\cache\org.springframework\spring-web\jars\spring-web-4.0.0.RELEASE.jar">
                        <origin-location is-local="false" location="http://repo1.maven.org/maven2/org/springframework/spring-web/4.0.0.RELEASE/spring-web-4.0.0.RELEASE.jar"/>
                    </artifact>
                </artifacts>
            </revision>
        </module>
... several other spring and commons artifacts resolved from central
        <module organisation="com.att.ecom.poc" name="poc-domain-model">
            <revision name="0.0.1-SNAPSHOT" status="integration" pubdate="20140207093019" resolver="mavenCentralSnapshots" artresolver="mavenCentralSnapshots" homepage="" downloaded="false" searched="false" default="false" conf="system, default, optional, compile, *, provided, runtime, javadoc, sources, master" position="0">
                <metadata-artifact status="no" details="" size="3337" time="0" location="<homedir>\.ivy2\cache\com.att.ecom.poc\poc-domain-model\ivy-0.0.1-SNAPSHOT.xml" searched="false" origin-is-local="false" origin-location="<intranetmavenrepo>/nexus/content/repositories/cditspoc-snapshots/com/att/ecom/poc/poc-domain-model/0.0.1-SNAPSHOT/poc-domain-model-0.0.1-20140207.173018-85.pom"/>
                <caller organisation="com.att.ecom.poc" name="coherence_poc" conf="default" rev="0.0.1-SNAPSHOT" rev-constraint-default="0.0.1-SNAPSHOT" rev-constraint-dynamic="0.0.1-SNAPSHOT" callerrev="working@<hostname>"/>
                <artifacts>
                </artifacts>
            </revision>
        </module>
    </dependencies>
</ivy-report>

更新:

我终于注意到下载,因为确切的完全合格的路径不Intranet上的回购存在失败。它寻找名称以快照的文件,但该目录中的文件只能有时间戳,而不是快照。

I finally noticed that the download fails because the exact fully-qualified path doesn't exist on the intranet repo. It's looking for a file with "SNAPSHOT" in the name, but the files in the directory only have timestamps, not "SNAPSHOT".

我注意到下面的讨论中,这似乎是相关的:<一href=\"http://stackoverflow.com/questions/2399099/resolving-snapshot-dependencies-with-timestamps-from-ivy\">enter这里的链接描述的。

I noticed the following discussion, which seems relevant: enter link description here .

由于这个结果,我通过ivysettings.xml修改为以下略消隐版本

As a result of this, I modified by "ivysettings.xml" to the following slightly elided version:

<ivysettings>
<settings defaultResolver="default"/>
<property name="m2-pattern" value="${user.home}/.m2/repository/[organisation]/[module]/[revision]/[module]-[revision](-[classifier]).[ext]" override="false" />
<resolvers>
    <chain name="default">
    <filesystem name="local-maven2" m2compatible="true" >
        <artifact pattern="${m2-pattern}"/>
        <ivy pattern="${m2-pattern}"/>
    </filesystem>
    <ibiblio name="mavenCentralSnapshots" m2compatible="true"
         root="http://<hostandport>/nexus/content/repositories/cditspoc-snapshots"
         pattern="[organisation]/[module]/[revision]/[artifact]-[revision](-[classifier]).[ext]"/>
    <ibiblio name="mavenCentralThirdparty" m2compatible="true"
         root="http://<hostandport>/nexus/content/repositories/cditspoc-3rd-party"/>
    <ibiblio name="central" m2compatible="true"/>
    </chain>
</resolvers>
</ivysettings>

不幸的是,这没有什么区别,它仍然只是试图找到的快照文件,该文件不存在。

Unfortunately, this made no difference, it still just tries to find the "SNAPSHOT" file, which doesn't exist.

更新:

其实,我实现了这个错误的另一个极其重要的细节在这里没有找到我们的MavenCentral神器快照。下面是输出的实际摘录:

Actually, I realized another extremely important detail in that error where it fails to find the SNAPSHOT artifact on our MavenCentral. Here's the actual excerpt from the output:

:: problems summary ::
:::: WARNINGS
        [FAILED     ] com.att.ecom.poc#poc-domain-model;0.0.1-SNAPSHOT!poc-domain-model.jar(bundle):  (0ms)

    ==== shared: tried

      C:\Users\dk068x\.ivy2\shared\com.att.ecom.poc\poc-domain-model\0.0.1-SNAPSHOT\bundles\poc-domain-model.jar

    ==== public: tried

      http://repo1.maven.org/maven2/com/att/ecom/poc/poc-domain-model/0.0.1-SNAPSHOT/poc-domain-model-0.0.1-SNAPSHOT.jar

我应该从这个注意到的是,它甚至没有试图从我的快照存储库中获得神器的。它未能找到它的公开mavencentral,不是我的。这告诉我有什么毛病我的ivysettings.xml,但我不知道它是什么。

What I should have noticed from this is that it isn't even trying to get the artifact from my snapshot repository at all. It's failing to find it on the public mavencentral, not mine. That tells me there's something wrong with my "ivysettings.xml", but I don't know what it would be.

推荐答案

请检查上面还有评论:
然而,在另外:改变你的ivy.xml为以下内容:

Please check the comment above as well: however in addition: change your ivy.xml to the following:

<ivy-module version="2.0">
    <info organisation="com.att.ecom.poc" module="coherence_poc"/>
    <dependencies>
    <dependency org="com.att.ecom.poc" name="poc-domain-model" rev="0.0.1-SNAPSHOT"/>
    </dependencies>
</ivy-module>

,然后启用勾选常青藤控制台与调试级别。 (常青藤控制台在Eclipse的控制台视图),如果可能的话。

And then enable check the "ivy console" with debug level. (Ivy console in the console view of Eclipse) if possible.

这篇关于为什么不是常青藤下载从我们的内联网回购的神器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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