我正在尝试向常春藤添加档案库,但它不起作用。
以下是使用的文件:
常春藤.xml
<ivy-module version="2.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd">
<info organisation="in.ex" module="ivy-example" status="integration">
</info>
<dependencies>
<dependency org="commons-lang" name="commons-lang" rev="2.6" />
</dependencies>
</ivy-module>
常春藤设置.xml
<?xml version="1.0" encoding="UTF-8"?>
<ivysettings>
<settings defaultResolver="archiva" />
<credentials host="http://myarchiva/archiva/" realm="Apache Archiva"
username="user" passwd="pwd" />
<property name="archiva-internal"
value="http://myarchiva/archiva/repository/internal" />
<resolvers>
<ibiblio name="archiva" m2compatible="true" root="${archiva-internal}" />
</resolvers>
</ivysettings>
构建.xml
<project name="ivy example" default="resolve" xmlns:ivy="antlib:org.apache.ivy.ant">
<target name="resolve" description="resolve dependencies with ivy">
<ivy:settings file="ivysettings.xml" />
<ivy:retrieve />
</target>
</project>
当我运行 ant 任务时,显示以下错误:
module not found: commons-lang#commons-lang;2.6
==== archiva: tried
http://myarchiva/archiva/repository/internal/commons-lang/commons-lang/2.6/commons-lang-2.6.pom
-- artifact commons-lang#commons-lang;2.6!commons-lang.jar:
http://myarchiva/archiva/repository/internal/commons-lang/commons-lang/2.6/commons-lang-2.6.jar
似乎没有找到 commons-lang 但它仍然存在。当我在浏览器中尝试 url 时,我得到了 jar。
有人能帮帮我吗?谢谢!