gpt4 book ai didi

ant - apache ivy - ivysettings.xml 中有什么

转载 作者:行者123 更新时间:2023-12-02 19:43:06 25 4
gpt4 key购买 nike

我一直在玩基本的Ivy Tutorial并逐渐扩展到现在我有一个单独的 ivy.xml 定义我的依赖项以及 apache ant 安装中的 ivy jar 的状态。

我还设法定义了一个共享存储库来阻止 ivy 弹出到外部存储库。这是通过在解析任务中定义属性来完成的。

<target name="resolve" depends="" description="Resolve the dependencies">  
<property name="ivy.shared.default.root" value="C:/ivy/localLibsStore" />
<property name="ivy.shared.default.artifact.pattern" value="[module]/[revision]/[type]s/[artifact]-[revision].[ext]" />
<ivy:retrieve/>
</target>

但是,我尝试将这些属性移动到单独的 ivysettings.xml 文件中,但没有成功。

所以问题是我的 ivysettings.xml 中应该有什么?

我最近的尝试给出了错误:

unknown resolver null

no resolver found for ...

<ivysettings>
<property name="ivy.shared.default.root" value="C:/ivy/localLibsStore" />
<property name="ivy.shared.default.artifact.pattern" value="[module]/[revision]/[type]s/[artifact]-[revision].[ext]" />

<resolvers>
<filesystem name="shared">
<ivy pattern="${ivy.shared.default.root}/${ivy.shared.default.ivy.pattern}" />
<artifact pattern="${ivy.shared.default.root}/${ivy.shared.default.artifact.pattern}" />
</filesystem>
</resolvers>
</ivysettings>

最佳答案

怀疑它。

找到这个good description of ivy

我已将 settings.xml 更改为如下所示

<ivysettings>
<settings defaultResolver="chained"/>
<property name="java.net.maven.pattern" value="[organisation]/jars/[module]-[revision].[ext]"/>
<property name="ivy.shared.default.root" value="C:/ivy/localLibsStore" />
<property name="ivy.shared.default.artifact.pattern" value="[module]/[revision]/[type]s/[artifact]-[revision].[ext]" />
<resolvers>
<filesystem name="sharedbill">
<ivy pattern="${ivy.shared.default.root}/${ivy.shared.default.ivy.pattern}" />
<artifact pattern="${ivy.shared.default.root}/${ivy.shared.default.artifact.pattern}" />
</filesystem>
<chain name="chained" returnFirst="true">
<resolver ref="sharedbill"/>
<ibiblio name="ibiblio" m2compatible="true"/>
<ibiblio name="java-net-maven1" root="http://download.java.net/maven/1" pattern="${java.net.maven.pattern}" m2compatible="false"/>
<ibiblio name="java-net-maven2" root="http://download.java.net/maven/2/" m2compatible="true"/>
<url name="sourceforge">
<artifact pattern="http://easynews.dl.sourceforge.net/sourceforge/[organization]/[module]_[revision].zip" />
<artifact pattern="http://easynews.dl.sourceforge.net/sourceforge/[organization]/[module]-[revision].zip" />
</url>
</chain>
</resolvers>
</ivysettings>

关于ant - apache ivy - ivysettings.xml 中有什么,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1860020/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com