On 2023-04-26, LINUS FERNANDES wrote:

> No, it doesn't . Ivy 2.5.1 is complaining that the task does not have the
> attribute pathid or pathId either.

I don't see any error here

$ cat ivy.xml
<ivy-module version="2.0">
  <info organisation="org.example.foo" module="bar" revision="1.0.0" />
  <dependencies>
    <dependency org="org.apache.ivy" name="ivy" rev="2.5.1" />
  </dependencies>
</ivy-module>

$ cat ivysettings.xml 
<ivysettings>
  <caches defaultCacheDir="${user.home}/.ivy2/cache"/>
  <settings defaultResolver="public" />
  <resolvers>
    <ibiblio name="public" m2compatible="true"/>
  </resolvers>
</ivysettings>

$ cat build.xml 
<project default="retrieve">
  <target name="init-ivy">
    <path id="ivy.lib.path">
      <fileset dir="${ivy.jar.dir}" includes="*.jar" />
    </path>
    <taskdef resource="org/apache/ivy/ant/antlib.xml"
             uri="antlib:org.apache.ivy.ant" classpathref="ivy.lib.path" />
  </target>
  <target name="retrieve" depends="init-ivy" 
xmlns:ivy="antlib:org.apache.ivy.ant">
    <ivy:settings file="ivysettings.xml" />
    <ivy:retrieve pathid="foo"/>
  </target>
</project>

$ ant -Divy.jar.dir=$HOME/.m2/repository/org/apache/ivy/ivy/2.5.1/
Buildfile: /tmp/build.xml

init-ivy:

retrieve:
[ivy:retrieve] :: Apache Ivy 2.5.1 - 20221101102211 :: 
https://ant.apache.org/ivy/ ::
[ivy:retrieve] :: loading settings :: file = /tmp/ivysettings.xml
[ivy:retrieve] :: resolving dependencies :: org.example.foo#bar;1.0.0
[ivy:retrieve]  confs: [default]
[ivy:retrieve]  found org.apache.ivy#ivy;2.5.1 in public
[ivy:retrieve]  found junit#junit;4.12 in public
[ivy:retrieve]  found org.hamcrest#hamcrest-core;1.3 in public
[ivy:retrieve]  found org.hamcrest#hamcrest-library;1.3 in public
[ivy:retrieve]  found org.apache.ant#ant-testutil;1.9.14 in public
[ivy:retrieve]  found org.apache.ant#ant-launcher;1.9.14 in public
[ivy:retrieve]  found org.apache.ant#ant-junit;1.9.14 in public
[ivy:retrieve]  found org.apache.ant#ant-junit4;1.9.14 in public
[ivy:retrieve]  found ant-contrib#ant-contrib;1.0b3 in public
[ivy:retrieve]  found xmlunit#xmlunit;1.6 in public
[ivy:retrieve]  found org.apache.ant#ant;1.9.14 in public
[ivy:retrieve]  found org.apache.httpcomponents#httpclient;4.5.10 in public
[ivy:retrieve]  found org.apache.httpcomponents#httpcore;4.4.12 in public
[ivy:retrieve]  found commons-logging#commons-logging;1.2 in public
[ivy:retrieve]  found commons-codec#commons-codec;1.11 in public
[ivy:retrieve]  found oro#oro;2.0.8 in public
[ivy:retrieve]  found org.apache.commons#commons-vfs2;2.2 in public
[ivy:retrieve]  found com.jcraft#jsch;0.1.55 in public
[ivy:retrieve]  found com.jcraft#jsch.agentproxy;0.0.9 in public
[ivy:retrieve]  found com.jcraft#jsch.agentproxy.connector-factory;0.0.9 in 
public
[ivy:retrieve]  found com.jcraft#jsch.agentproxy.core;0.0.9 in public
[ivy:retrieve]  found com.jcraft#jsch.agentproxy.usocket-jna;0.0.9 in public
[ivy:retrieve]  found net.java.dev.jna#jna;4.1.0 in public
[ivy:retrieve]  found net.java.dev.jna#jna-platform;4.1.0 in public
[ivy:retrieve]  found com.jcraft#jsch.agentproxy.usocket-nc;0.0.9 in public
[ivy:retrieve]  found com.jcraft#jsch.agentproxy.sshagent;0.0.9 in public
[ivy:retrieve]  found com.jcraft#jsch.agentproxy.pageant;0.0.9 in public
[ivy:retrieve]  found com.jcraft#jsch.agentproxy.jsch;0.0.9 in public
[ivy:retrieve]  found org.bouncycastle#bcpg-jdk15on;1.64 in public
[ivy:retrieve]  found org.bouncycastle#bcprov-jdk15on;1.64 in public
[ivy:retrieve] :: resolution report :: resolve 290ms :: artifacts dl 12ms
[ivy:retrieve]  :: evicted modules:
[ivy:retrieve]  com.jcraft#jsch;0.1.49 by [com.jcraft#jsch;0.1.55] in [default]
        ---------------------------------------------------------------------
        |                  |            modules            ||   artifacts   |
        |       conf       | number| search|dwnlded|evicted|| number|dwnlded|
        ---------------------------------------------------------------------
        |      default     |   31  |   0   |   0   |   1   ||   31  |   0   |
        ---------------------------------------------------------------------
[ivy:retrieve] :: retrieving :: org.example.foo#bar
[ivy:retrieve]  confs: [default]
[ivy:retrieve]  0 artifacts copied, 31 already retrieved (0kB/5ms)

BUILD SUCCESSFUL
Total time: 0 seconds


Reply via email to