0
我無法使用ivy-2.3.0和nexus/maven 2回購解決SNAPSHOT依賴關係。常春藤(2.3.0或2.4)不解決SNAPSHOT與分類器的maven依賴關係
我已經嘗試了幾件事情,但還是失敗了,
這部分已定:看到我在評論區發表評論。
我得到的最新輸出是maven:分類器不是與元素相關的 。爲此,我需要填寫名稱空間 映射,不知道這應該如何看待分類器部分的maven和ivy 。
我的聯繫是使用時間戳。
我的,項目文件
<project
name="test"
xmlns:ivy="antlib:org.apache.ivy.ant"
>
<ivy:settings file="ivysettings.xml" />
<ivy:retrieve pattern="[organisation]/[module]/[revision]/[artifact]-[revision](-[classifier]).[ext]" />
.....
我ivysettings文件:
<?xml version="1.0" encoding="UTF-8"?>
<ivysettings>
<!-- what should I put here for maven and ivy to use classifier? -->
<namespace name="test">
<rule>
<fromsystem>
<src org="systemorg"/>
<dest org="A"/>
</fromsystem>
<tosystem>
<src org="A"/>
<dest org="systemorg"/>
</tosystem>
</rule>
</namespace>
<credentials host="nexus"
realm="Sonatype Nexus Repository Manager"
username="xyz" passwd="xyz"/>
<property name="libs_snapshot"
value="http://nexus.host.com/nexus/content/repositories/libs_snapshot"/>
<property
name="version_pattern"
value="[organisation]/[module]/[revision]/[artifact]-[revision](-[classifier]).[ext]"
/>
<settings defaultResolver="repos" />
<resolvers>
<chain name="repos">
<ibiblio name="central" m2compatible="true"/>
<ibiblio
name="libs_snapshot"
m2compatible="true"
pattern="${version_pattern}"
root="${libs_snapshot}"
/>
</chain>
</resolvers>
</ivysettings>
我ivy.xml文件:
<ivy-module version='2.0' xmlns:m="http://ant.apache.org/ivy/maven">
<info
organisation="com.xyz"
module="chained-resolvers"
/>
<dependencies>
<dependency
org="com.xyz"
name="cache_store"
rev="1.1-SNAPSHOT"
changing="true"
>
<artifact name="cache_store"
m:classifier="mobile"
type="jar" ext="jar"/>
</dependency>
</dependencies>
</ivy-module>
我設法解決常春藤抱怨的部分。 maven:分類器沒有與元素相關聯。 將xmlns:m =「http://ant.apache.org/ivy/maven」 添加到常青藤模塊。 line so: –
Wayne
2014-09-02 15:02:56
問題並不清楚。以下是如何使用Maven分類器檢索快照工件的示例:http://stackoverflow.com/questions/7804253/how-to-dowload-multiple-maven-dependencies-in-ivy-with-different-classifiers/7815627#7815627 – 2014-09-02 19:01:03