You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ivy-user@ant.apache.org by LINUS FERNANDES <li...@gmail.com> on 2023/04/13 15:08:37 UTC

Problem with resolving dependencies for saxon-HE on Maven repo

There is a problem downloading the dependencies for Saxon-HE from Maven
using Ivy.
The xmlresolver-5.1.1.jar does not download but it's classified jar
xmlresolver-data-5.1.1.jar does.  Both jars are listed as dependencies in
the pom for Saxon-HE.

You can read about it in more detail on the following thread:

https://github.com/checkstyle/checkstyle/issues/12969

You can execute an ant build for the same at :

https://github.com/Fernal73/CheckStyleSample/

Regards,
Linus.

Re: Problem with resolving dependencies for saxon-HE on Maven repo

Posted by LINUS FERNANDES <li...@gmail.com>.
Buildfile: /root/IvySample/build.xml

init-ivy:

retrieve:

BUILD FAILED
/root/IvySample/build.xml:16: ivy-retrieve doesn't support the "pathid"
attribute

Total time: 5 seconds

On Wed, 26 Apr 2023, 14:07 LINUS FERNANDES, <li...@gmail.com>
wrote:

> This doesn't seem to work either.
>
> u0_a27414:06IvySample$ cat build.xml
> <project default="retrieve">
>   <property environment="env"/>
>   <target name="init-ivy">
>     <path id="ivy.lib.path">
>             <fileset dir="${env.ANT_HOME}/lib" includes="ivy*.jar" />
>     </path>
>     <taskdef resource="org/apache/ivy/ant/antlib.xml"
>              uri="antlib:org.apache.ivy.ant" classpathref="ivy.lib.path" />
>      <taskdef name="ivy-configure"
> classname="org.apache.ivy.ant.IvyConfigure" classpathref="ivy.lib.path"/>
>   <taskdef name="ivy-resolve" classname="org.apache.ivy.ant.IvyResolve"
> classpathref="ivy.lib.path"/>
>   <taskdef name="ivy-retrieve" classname="org.apache.ivy.ant.IvyRetrieve"
> classpathref="ivy.lib.path"/>
>     <taskdef name="ivy-publish" classname="org.apache.ivy.ant.IvyPublish"
> 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>
>
>
> On Wed, 26 Apr 2023, 13:15 LINUS FERNANDES, <li...@gmail.com>
> wrote:
>
>> I have the same error on Arch Linux on Termux:
>>
>> echo $ANT_HOME
>> /usr/share/ant
>>
>> root07:40IvySample$ ls /usr/share/ant/lib
>> ant-antlr.jar
>> ant-apache-bcel.jar
>> ant-apache-bsf.jar
>> ant-apache-log4j.jar
>> ant-apache-oro.jar
>> ant-apache-regexp.jar
>> ant-apache-resolver.jar
>> ant-apache-xalan2.jar
>> ant-commons-logging.jar
>> ant-commons-net.jar
>> ant-contrib-1.0b3.jar
>> ant-contrib-20020829.jar
>> ant-imageio.jar
>> ant-jai.jar
>> ant.jar
>> ant-javamail.jar
>> ant-jdepend.jar
>> ant-jmf.jar
>> ant-jsch.jar
>> ant-junit4.jar
>> ant-junit.jar
>> ant-junitlauncher.jar
>> ant-launcher.jar
>> ant-netrexx.jar
>> ant-swing.jar
>> ant-testutil.jar
>> ant-xz.jar
>> apiguardian-api-1.1.2.jar
>> commons-net-3.9.0.jar
>> images
>> ivy-2.5.1.jar
>> junit-platform-commons-1.9.2.jar
>> junit-platform-engine-1.9.2.jar
>> junit-platform-launcher-1.9.2.jar
>> opentest4j-1.2.0.jar
>> root07:40IvySample$ vim build.xml
>> root07:42IvySample$ ant
>> Buildfile: /root/IvySample/build.xml
>>
>> init-ivy:
>>
>> retrieve:
>>
>> BUILD FAILED
>> /root/IvySample/build.xml:12: ivy:retrieve doesn't support the "pathid"
>> attribute
>>
>> Total time: 5 seconds
>>
>> cat build.xml
>> <project default="retrieve">
>>         <property environment="env"/>
>>   <target name="init-ivy">
>>     <path id="ivy.lib.path">
>>             <fileset dir="${env.ANT_HOME}/lib" includes="ivy*.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>
>>
>> On Wed, 26 Apr 2023, 12:20 Stefan Bodewig, <bo...@apache.org> wrote:
>>
>>> 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
>>>
>>>
>>>

Re: Problem with resolving dependencies for saxon-HE on Maven repo

Posted by LINUS FERNANDES <li...@gmail.com>.
This doesn't seem to work either.

u0_a27414:06IvySample$ cat build.xml
<project default="retrieve">
  <property environment="env"/>
  <target name="init-ivy">
    <path id="ivy.lib.path">
            <fileset dir="${env.ANT_HOME}/lib" includes="ivy*.jar" />
    </path>
    <taskdef resource="org/apache/ivy/ant/antlib.xml"
             uri="antlib:org.apache.ivy.ant" classpathref="ivy.lib.path" />
     <taskdef name="ivy-configure"
classname="org.apache.ivy.ant.IvyConfigure" classpathref="ivy.lib.path"/>
  <taskdef name="ivy-resolve" classname="org.apache.ivy.ant.IvyResolve"
classpathref="ivy.lib.path"/>
  <taskdef name="ivy-retrieve" classname="org.apache.ivy.ant.IvyRetrieve"
classpathref="ivy.lib.path"/>
    <taskdef name="ivy-publish" classname="org.apache.ivy.ant.IvyPublish"
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>


On Wed, 26 Apr 2023, 13:15 LINUS FERNANDES, <li...@gmail.com>
wrote:

> I have the same error on Arch Linux on Termux:
>
> echo $ANT_HOME
> /usr/share/ant
>
> root07:40IvySample$ ls /usr/share/ant/lib
> ant-antlr.jar
> ant-apache-bcel.jar
> ant-apache-bsf.jar
> ant-apache-log4j.jar
> ant-apache-oro.jar
> ant-apache-regexp.jar
> ant-apache-resolver.jar
> ant-apache-xalan2.jar
> ant-commons-logging.jar
> ant-commons-net.jar
> ant-contrib-1.0b3.jar
> ant-contrib-20020829.jar
> ant-imageio.jar
> ant-jai.jar
> ant.jar
> ant-javamail.jar
> ant-jdepend.jar
> ant-jmf.jar
> ant-jsch.jar
> ant-junit4.jar
> ant-junit.jar
> ant-junitlauncher.jar
> ant-launcher.jar
> ant-netrexx.jar
> ant-swing.jar
> ant-testutil.jar
> ant-xz.jar
> apiguardian-api-1.1.2.jar
> commons-net-3.9.0.jar
> images
> ivy-2.5.1.jar
> junit-platform-commons-1.9.2.jar
> junit-platform-engine-1.9.2.jar
> junit-platform-launcher-1.9.2.jar
> opentest4j-1.2.0.jar
> root07:40IvySample$ vim build.xml
> root07:42IvySample$ ant
> Buildfile: /root/IvySample/build.xml
>
> init-ivy:
>
> retrieve:
>
> BUILD FAILED
> /root/IvySample/build.xml:12: ivy:retrieve doesn't support the "pathid"
> attribute
>
> Total time: 5 seconds
>
> cat build.xml
> <project default="retrieve">
>         <property environment="env"/>
>   <target name="init-ivy">
>     <path id="ivy.lib.path">
>             <fileset dir="${env.ANT_HOME}/lib" includes="ivy*.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>
>
> On Wed, 26 Apr 2023, 12:20 Stefan Bodewig, <bo...@apache.org> wrote:
>
>> 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
>>
>>
>>

Re: Problem with resolving dependencies for saxon-HE on Maven repo

Posted by LINUS FERNANDES <li...@gmail.com>.
Thanks, Stefan.
It's amazing that you were able to answer all my queries so quickly and so
clearly.
I probably panicked a bit at seeing my setup not working as anticipated
suddenly.
Thanks for all the help.

On Wed, 26 Apr 2023, 19:32 Stefan Bodewig, <bo...@apache.org> wrote:

> On 2023-04-26, LINUS FERNANDES wrote:
>
> > Thanks, Stefan.
>
> > I think that was caused by me trying the Ant way to install Ivy as
>
> > https://ant.apache.org/ivy/history/2.4.0/install.html
>
> > That's the one that shows up first when I Google it.
>
> I don't think we can influence Google's decisions ...
>
> Ivy 2.4.0 has been released 2014 so its documentation applies to a much
> older version of Ant.
>
> Please see https://ant.apache.org/ivy/history/2.5.1/ant.html and use the
> "Ant 1.6.0 or superior" approach. The apprach that uses multiple
> taskdefs is only required on a version of Ant that doesn't know th
> concept of antlibs which has been introduced with Ant 1.6.0 in, errm,
> 2003. Ivy's docs seem to be quite conservative :-)
>
> Please take anything Ivy-specific I say with a big grain of salt. I
> happen to be an Ant developer who fixed a bug in Ivy but am far from
> being familiar with Ivy itself.
>
> Stefan
>

Re: Problem with resolving dependencies for saxon-HE on Maven repo

Posted by Stefan Bodewig <bo...@apache.org>.
On 2023-04-26, LINUS FERNANDES wrote:

> Thanks, Stefan.

> I think that was caused by me trying the Ant way to install Ivy as

> https://ant.apache.org/ivy/history/2.4.0/install.html

> That's the one that shows up first when I Google it.

I don't think we can influence Google's decisions ...

Ivy 2.4.0 has been released 2014 so its documentation applies to a much
older version of Ant.

Please see https://ant.apache.org/ivy/history/2.5.1/ant.html and use the
"Ant 1.6.0 or superior" approach. The apprach that uses multiple
taskdefs is only required on a version of Ant that doesn't know th
concept of antlibs which has been introduced with Ant 1.6.0 in, errm,
2003. Ivy's docs seem to be quite conservative :-)

Please take anything Ivy-specific I say with a big grain of salt. I
happen to be an Ant developer who fixed a bug in Ivy but am far from
being familiar with Ivy itself.

Stefan

Re: Problem with resolving dependencies for saxon-HE on Maven repo

Posted by LINUS FERNANDES <li...@gmail.com>.
Do you still recommend adding the ivy taskdefs as below:

<taskdef name="ivy-configure" classname="org.apache.ivy.ant.IvyConfigure"/>
<taskdef name="ivy-resolve" classname="org.apache.ivy.ant.IvyResolve"/> <
taskdef name="ivy-retrieve" classname="org.apache.ivy.ant.IvyRetrieve"/> <
taskdef name="ivy-publish" classname="org.apache.ivy.ant.IvyPublish"/>

On Wed, 26 Apr 2023, 17:22 LINUS FERNANDES, <li...@gmail.com>
wrote:

> Thanks, Stefan.
>
> I think that was caused by me trying the Ant way to install Ivy as
>
> https://ant.apache.org/ivy/history/2.4.0/install.html
>
> That's the one that shows up first when I Google it.
>
>
>
> On Wed, 26 Apr 2023, 16:57 Stefan Bodewig, <bo...@apache.org> wrote:
>
>> [you ran a different command than I asked for, this way we still don't
>> see which version of Ivy you use ;-)]
>>
>> >              init-ivy:                                       parsing
>> > buildfile jar:file:/root/.ant/lib/ivy.jar!/org/apache/ivy/ant/antlib.xml
>> > with URI =
>> jar:file:/root/.ant/lib/ivy.jar!/org/apache/ivy/ant/antlib.xml
>> > from a zip file
>>
>> I believe this one is the culprit. There is an ivy.jar in your
>> ~/.ant/lib directory and I'm willing to bet it contains an older version
>> of Ivy.
>>
>> Adding -nouserlib to the Ant command line should help avoiding this.
>>
>> The documentation for the pathid attribute in
>> https://ant.apache.org/ivy/history/2.5.1/use/retrieve.html (the current
>> docs) says it has been added with Ivy 2.3 so most likely the version you
>> actually use is older than 2.3.
>>
>> Stefan
>>
>

Re: Problem with resolving dependencies for saxon-HE on Maven repo

Posted by LINUS FERNANDES <li...@gmail.com>.
Thanks, Stefan.

I think that was caused by me trying the Ant way to install Ivy as

https://ant.apache.org/ivy/history/2.4.0/install.html

That's the one that shows up first when I Google it.



On Wed, 26 Apr 2023, 16:57 Stefan Bodewig, <bo...@apache.org> wrote:

> [you ran a different command than I asked for, this way we still don't
> see which version of Ivy you use ;-)]
>
> >              init-ivy:                                       parsing
> > buildfile jar:file:/root/.ant/lib/ivy.jar!/org/apache/ivy/ant/antlib.xml
> > with URI = jar:file:/root/.ant/lib/ivy.jar!/org/apache/ivy/ant/antlib.xml
> > from a zip file
>
> I believe this one is the culprit. There is an ivy.jar in your
> ~/.ant/lib directory and I'm willing to bet it contains an older version
> of Ivy.
>
> Adding -nouserlib to the Ant command line should help avoiding this.
>
> The documentation for the pathid attribute in
> https://ant.apache.org/ivy/history/2.5.1/use/retrieve.html (the current
> docs) says it has been added with Ivy 2.3 so most likely the version you
> actually use is older than 2.3.
>
> Stefan
>

Re: Problem with resolving dependencies for saxon-HE on Maven repo

Posted by Stefan Bodewig <bo...@apache.org>.
[you ran a different command than I asked for, this way we still don't
see which version of Ivy you use ;-)]

>              init-ivy:                                       parsing
> buildfile jar:file:/root/.ant/lib/ivy.jar!/org/apache/ivy/ant/antlib.xml
> with URI = jar:file:/root/.ant/lib/ivy.jar!/org/apache/ivy/ant/antlib.xml
> from a zip file

I believe this one is the culprit. There is an ivy.jar in your
~/.ant/lib directory and I'm willing to bet it contains an older version
of Ivy.

Adding -nouserlib to the Ant command line should help avoiding this.

The documentation for the pathid attribute in
https://ant.apache.org/ivy/history/2.5.1/use/retrieve.html (the current
docs) says it has been added with Ivy 2.3 so most likely the version you
actually use is older than 2.3.

Stefan

Re: Problem with resolving dependencies for saxon-HE on Maven repo

Posted by LINUS FERNANDES <li...@gmail.com>.
The latest documentation doesn't display any pathid attribute either.

Hence, my initial question as to whether it has been removed since. I'm
revisiting my repo after a break and I had to reinstall ivy once more this
morning. I don't recall which version I was using earlier.

https://ant.apache.org/ivy/history/2.2.0/use/retrieve.html

On Wed, 26 Apr 2023, 16:38 LINUS FERNANDES, <li...@gmail.com>
wrote:

> $ ant -v
>                Apache Ant(TM) version 1.10.12 compiled on December 12
> 1969                                     Trying the default build file:
> build.xml        Buildfile: /root/IvySample/build.xml            Detected
> Java version: 20 in: /usr/lib/jvm/java-20-openjdk
>             Detected OS: Linux                              parsing
> buildfile /root/IvySample/build.xml with URI =
> file:/root/IvySample/build.xml           Project base dir set to:
> /root/IvySample        parsing buildfile
> jar:file:/usr/share/ant/lib/ant.jar!/org/apache/tools/ant/antlib.xml with
> URI = jar:file:/usr/share/ant/lib/ant.jar!/org/apache/tools/ant/antlib.xml
> from a zip file           [property] Loading Environment env.
> Build sequence for target(s) `retrieve' is [init-ivy, retrieve]
>                      Complete build sequence is [init-ivy, retrieve, ]
>
>              init-ivy:                                       parsing
> buildfile jar:file:/root/.ant/lib/ivy.jar!/org/apache/ivy/ant/antlib.xml
> with URI = jar:file:/root/.ant/lib/ivy.jar!/org/apache/ivy/ant/antlib.xml
> from a zip file                      parsing buildfile
> jar:file:/usr/share/ant/lib/ivy-2.5.1.jar!/org/apache/ivy/ant/antlib.xml
> with URI =
> jar:file:/usr/share/ant/lib/ivy-2.5.1.jar!/org/apache/ivy/ant/antlib.xml
> from a zip file  parsing buildfile
> jar:file:/usr/share/ant/lib/ivy-2.5.1.jar!/org/apache/ivy/ant/antlib.xml
> with URI =
> jar:file:/usr/share/ant/lib/ivy-2.5.1.jar!/org/apache/ivy/ant/antlib.xml
> from a zip file                                                  retrieve:
>                                      parsing buildfile
> jar:file:/root/.ant/lib/ivy.jar!/org/apache/ivy/ant/antlib.xml with URI =
> jar:file:/root/.ant/lib/ivy.jar!/org/apache/ivy/ant/antlib.xml from a zip
> file                      parsing buildfile
> jar:file:/usr/share/ant/lib/ivy-2.5.1.jar!/org/apache/ivy/ant/antlib.xml
> with URI =
> jar:file:/usr/share/ant/lib/ivy-2.5.1.jar!/org/apache/ivy/ant/antlib.xml
> from a zip file                                                  BUILD
> FAILED                                    /root/IvySample/build.xml:16:
> ivy-retrieve doesn't support the "pathid" attribute
>  at
> org.apache.tools.ant.RuntimeConfigurable.maybeConfigure(RuntimeConfigurable.java:536)
>       at
> org.apache.tools.ant.RuntimeConfigurable.maybeConfigure(RuntimeConfigurable.java:463)
>       at org.apache.tools.ant.Task.maybeConfigure(Task.java:203)
>                           at
> org.apache.tools.ant.UnknownElement.configure(UnknownElement.java:202)
>                  at
> org.apache.tools.ant.UnknownElement.maybeConfigure(UnknownElement.java:166)
>                 at org.apache.tools.ant.Task.perform(Task.java:349)
>                                      at
> org.apache.tools.ant.Target.execute(Target.java:449)
>                  at
> org.apache.tools.ant.Target.performTasks(Target.java:470)
>                   at
> org.apache.tools.ant.Project.executeSortedTargets(Project.java:1401)
>                  at
> org.apache.tools.ant.Project.executeTarget(Project.java:1374)
>                   at
> org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
>         at org.apache.tools.ant.Project.executeTargets(Project.java:1264)
>                              at
> org.apache.tools.ant.Main.runBuild(Main.java:818)
>                   at org.apache.tools.ant.Main.startAnt(Main.java:223)
>                                       at
> org.apache.tools.ant.launch.Launcher.run(Launcher.java:284)
>                   at
> org.apache.tools.ant.launch.Launcher.main(Launcher.java:101)
>          Caused by: The <ivy-retrieve> type doesn't support the "pathid"
> attribute.                              at
> org.apache.tools.ant.IntrospectionHelper.setAttribute(IntrospectionHelper.java:414)
>         at
> org.apache.tools.ant.RuntimeConfigurable.maybeConfigure(RuntimeConfigurable.java:527)
>       ... 15 more
>                    Total time: 5 seconds
>
> On Wed, 26 Apr 2023, 16:23 Stefan Bodewig, <bo...@apache.org> wrote:
>
>> On 2023-04-26, LINUS FERNANDES wrote:
>>
>> > I have the same error on Arch Linux on Termux:
>>
>> > echo $ANT_HOME
>> > /usr/share/ant
>>
>> > root07:40IvySample$ ls /usr/share/ant/lib
>> > ant-antlr.jar
>> > ant-apache-bcel.jar
>> > ant-apache-bsf.jar
>> > ant-apache-log4j.jar
>> > ant-apache-oro.jar
>> > ant-apache-regexp.jar
>> > ant-apache-resolver.jar
>> > ant-apache-xalan2.jar
>> > ant-commons-logging.jar
>> > ant-commons-net.jar
>> > ant-contrib-1.0b3.jar
>> > ant-contrib-20020829.jar
>> > ant-imageio.jar
>> > ant-jai.jar
>> > ant.jar
>> > ant-javamail.jar
>> > ant-jdepend.jar
>> > ant-jmf.jar
>> > ant-jsch.jar
>> > ant-junit4.jar
>> > ant-junit.jar
>> > ant-junitlauncher.jar
>> > ant-launcher.jar
>> > ant-netrexx.jar
>> > ant-swing.jar
>> > ant-testutil.jar
>> > ant-xz.jar
>> > apiguardian-api-1.1.2.jar
>> > commons-net-3.9.0.jar
>> > images
>> > ivy-2.5.1.jar
>> > junit-platform-commons-1.9.2.jar
>> > junit-platform-engine-1.9.2.jar
>> > junit-platform-launcher-1.9.2.jar
>> > opentest4j-1.2.0.jar
>> > root07:40IvySample$ vim build.xml
>> > root07:42IvySample$ ant
>> > Buildfile: /root/IvySample/build.xml
>>
>> > init-ivy:
>>
>> > retrieve:
>>
>> > BUILD FAILED
>> > /root/IvySample/build.xml:12: ivy:retrieve doesn't support the "pathid"
>> > attribute
>>
>> The only way I can explain this is there is another jar that contains an
>> older version of Ivy on your classpath and this one is loaded first.
>>
>> As you can see in my output, Ivy announces its version number
>>
>> >> retrieve:
>> >> [ivy:retrieve] :: Apache Ivy 2.5.1 - 20221101102211 ::
>> >> https://ant.apache.org/ivy/ ::
>>
>> what does it say in your case when you remove the pathid attribute?
>>
>> Stefan
>>
>

Re: Problem with resolving dependencies for saxon-HE on Maven repo

Posted by LINUS FERNANDES <li...@gmail.com>.
$ ant -v
               Apache Ant(TM) version 1.10.12 compiled on December 12 1969
                                   Trying the default build file:
build.xml        Buildfile: /root/IvySample/build.xml            Detected
Java version: 20 in: /usr/lib/jvm/java-20-openjdk
            Detected OS: Linux                              parsing
buildfile /root/IvySample/build.xml with URI =
file:/root/IvySample/build.xml           Project base dir set to:
/root/IvySample        parsing buildfile
jar:file:/usr/share/ant/lib/ant.jar!/org/apache/tools/ant/antlib.xml with
URI = jar:file:/usr/share/ant/lib/ant.jar!/org/apache/tools/ant/antlib.xml
from a zip file           [property] Loading Environment env.
Build sequence for target(s) `retrieve' is [init-ivy, retrieve]
                     Complete build sequence is [init-ivy, retrieve, ]

             init-ivy:                                       parsing
buildfile jar:file:/root/.ant/lib/ivy.jar!/org/apache/ivy/ant/antlib.xml
with URI = jar:file:/root/.ant/lib/ivy.jar!/org/apache/ivy/ant/antlib.xml
from a zip file                      parsing buildfile
jar:file:/usr/share/ant/lib/ivy-2.5.1.jar!/org/apache/ivy/ant/antlib.xml
with URI =
jar:file:/usr/share/ant/lib/ivy-2.5.1.jar!/org/apache/ivy/ant/antlib.xml
from a zip file  parsing buildfile
jar:file:/usr/share/ant/lib/ivy-2.5.1.jar!/org/apache/ivy/ant/antlib.xml
with URI =
jar:file:/usr/share/ant/lib/ivy-2.5.1.jar!/org/apache/ivy/ant/antlib.xml
from a zip file                                                  retrieve:
                                     parsing buildfile
jar:file:/root/.ant/lib/ivy.jar!/org/apache/ivy/ant/antlib.xml with URI =
jar:file:/root/.ant/lib/ivy.jar!/org/apache/ivy/ant/antlib.xml from a zip
file                      parsing buildfile
jar:file:/usr/share/ant/lib/ivy-2.5.1.jar!/org/apache/ivy/ant/antlib.xml
with URI =
jar:file:/usr/share/ant/lib/ivy-2.5.1.jar!/org/apache/ivy/ant/antlib.xml
from a zip file                                                  BUILD
FAILED                                    /root/IvySample/build.xml:16:
ivy-retrieve doesn't support the "pathid" attribute
 at
org.apache.tools.ant.RuntimeConfigurable.maybeConfigure(RuntimeConfigurable.java:536)
      at
org.apache.tools.ant.RuntimeConfigurable.maybeConfigure(RuntimeConfigurable.java:463)
      at org.apache.tools.ant.Task.maybeConfigure(Task.java:203)
                          at
org.apache.tools.ant.UnknownElement.configure(UnknownElement.java:202)
                 at
org.apache.tools.ant.UnknownElement.maybeConfigure(UnknownElement.java:166)
                at org.apache.tools.ant.Task.perform(Task.java:349)
                                     at
org.apache.tools.ant.Target.execute(Target.java:449)
                 at
org.apache.tools.ant.Target.performTasks(Target.java:470)
                  at
org.apache.tools.ant.Project.executeSortedTargets(Project.java:1401)
                 at
org.apache.tools.ant.Project.executeTarget(Project.java:1374)
                  at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1264)
                             at
org.apache.tools.ant.Main.runBuild(Main.java:818)
                  at org.apache.tools.ant.Main.startAnt(Main.java:223)
                                      at
org.apache.tools.ant.launch.Launcher.run(Launcher.java:284)
                  at
org.apache.tools.ant.launch.Launcher.main(Launcher.java:101)
         Caused by: The <ivy-retrieve> type doesn't support the "pathid"
attribute.                              at
org.apache.tools.ant.IntrospectionHelper.setAttribute(IntrospectionHelper.java:414)
        at
org.apache.tools.ant.RuntimeConfigurable.maybeConfigure(RuntimeConfigurable.java:527)
      ... 15 more
                   Total time: 5 seconds

On Wed, 26 Apr 2023, 16:23 Stefan Bodewig, <bo...@apache.org> wrote:

> On 2023-04-26, LINUS FERNANDES wrote:
>
> > I have the same error on Arch Linux on Termux:
>
> > echo $ANT_HOME
> > /usr/share/ant
>
> > root07:40IvySample$ ls /usr/share/ant/lib
> > ant-antlr.jar
> > ant-apache-bcel.jar
> > ant-apache-bsf.jar
> > ant-apache-log4j.jar
> > ant-apache-oro.jar
> > ant-apache-regexp.jar
> > ant-apache-resolver.jar
> > ant-apache-xalan2.jar
> > ant-commons-logging.jar
> > ant-commons-net.jar
> > ant-contrib-1.0b3.jar
> > ant-contrib-20020829.jar
> > ant-imageio.jar
> > ant-jai.jar
> > ant.jar
> > ant-javamail.jar
> > ant-jdepend.jar
> > ant-jmf.jar
> > ant-jsch.jar
> > ant-junit4.jar
> > ant-junit.jar
> > ant-junitlauncher.jar
> > ant-launcher.jar
> > ant-netrexx.jar
> > ant-swing.jar
> > ant-testutil.jar
> > ant-xz.jar
> > apiguardian-api-1.1.2.jar
> > commons-net-3.9.0.jar
> > images
> > ivy-2.5.1.jar
> > junit-platform-commons-1.9.2.jar
> > junit-platform-engine-1.9.2.jar
> > junit-platform-launcher-1.9.2.jar
> > opentest4j-1.2.0.jar
> > root07:40IvySample$ vim build.xml
> > root07:42IvySample$ ant
> > Buildfile: /root/IvySample/build.xml
>
> > init-ivy:
>
> > retrieve:
>
> > BUILD FAILED
> > /root/IvySample/build.xml:12: ivy:retrieve doesn't support the "pathid"
> > attribute
>
> The only way I can explain this is there is another jar that contains an
> older version of Ivy on your classpath and this one is loaded first.
>
> As you can see in my output, Ivy announces its version number
>
> >> retrieve:
> >> [ivy:retrieve] :: Apache Ivy 2.5.1 - 20221101102211 ::
> >> https://ant.apache.org/ivy/ ::
>
> what does it say in your case when you remove the pathid attribute?
>
> Stefan
>

Re: Problem with resolving dependencies for saxon-HE on Maven repo

Posted by Stefan Bodewig <bo...@apache.org>.
On 2023-04-26, LINUS FERNANDES wrote:

> I have the same error on Arch Linux on Termux:

> echo $ANT_HOME
> /usr/share/ant

> root07:40IvySample$ ls /usr/share/ant/lib
> ant-antlr.jar
> ant-apache-bcel.jar
> ant-apache-bsf.jar
> ant-apache-log4j.jar
> ant-apache-oro.jar
> ant-apache-regexp.jar
> ant-apache-resolver.jar
> ant-apache-xalan2.jar
> ant-commons-logging.jar
> ant-commons-net.jar
> ant-contrib-1.0b3.jar
> ant-contrib-20020829.jar
> ant-imageio.jar
> ant-jai.jar
> ant.jar
> ant-javamail.jar
> ant-jdepend.jar
> ant-jmf.jar
> ant-jsch.jar
> ant-junit4.jar
> ant-junit.jar
> ant-junitlauncher.jar
> ant-launcher.jar
> ant-netrexx.jar
> ant-swing.jar
> ant-testutil.jar
> ant-xz.jar
> apiguardian-api-1.1.2.jar
> commons-net-3.9.0.jar
> images
> ivy-2.5.1.jar
> junit-platform-commons-1.9.2.jar
> junit-platform-engine-1.9.2.jar
> junit-platform-launcher-1.9.2.jar
> opentest4j-1.2.0.jar
> root07:40IvySample$ vim build.xml
> root07:42IvySample$ ant
> Buildfile: /root/IvySample/build.xml

> init-ivy:

> retrieve:

> BUILD FAILED
> /root/IvySample/build.xml:12: ivy:retrieve doesn't support the "pathid"
> attribute

The only way I can explain this is there is another jar that contains an
older version of Ivy on your classpath and this one is loaded first.

As you can see in my output, Ivy announces its version number

>> retrieve:
>> [ivy:retrieve] :: Apache Ivy 2.5.1 - 20221101102211 ::
>> https://ant.apache.org/ivy/ ::

what does it say in your case when you remove the pathid attribute?

Stefan

Re: Problem with resolving dependencies for saxon-HE on Maven repo

Posted by LINUS FERNANDES <li...@gmail.com>.
I have the same error on Arch Linux on Termux:

echo $ANT_HOME
/usr/share/ant

root07:40IvySample$ ls /usr/share/ant/lib
ant-antlr.jar
ant-apache-bcel.jar
ant-apache-bsf.jar
ant-apache-log4j.jar
ant-apache-oro.jar
ant-apache-regexp.jar
ant-apache-resolver.jar
ant-apache-xalan2.jar
ant-commons-logging.jar
ant-commons-net.jar
ant-contrib-1.0b3.jar
ant-contrib-20020829.jar
ant-imageio.jar
ant-jai.jar
ant.jar
ant-javamail.jar
ant-jdepend.jar
ant-jmf.jar
ant-jsch.jar
ant-junit4.jar
ant-junit.jar
ant-junitlauncher.jar
ant-launcher.jar
ant-netrexx.jar
ant-swing.jar
ant-testutil.jar
ant-xz.jar
apiguardian-api-1.1.2.jar
commons-net-3.9.0.jar
images
ivy-2.5.1.jar
junit-platform-commons-1.9.2.jar
junit-platform-engine-1.9.2.jar
junit-platform-launcher-1.9.2.jar
opentest4j-1.2.0.jar
root07:40IvySample$ vim build.xml
root07:42IvySample$ ant
Buildfile: /root/IvySample/build.xml

init-ivy:

retrieve:

BUILD FAILED
/root/IvySample/build.xml:12: ivy:retrieve doesn't support the "pathid"
attribute

Total time: 5 seconds

cat build.xml
<project default="retrieve">
        <property environment="env"/>
  <target name="init-ivy">
    <path id="ivy.lib.path">
            <fileset dir="${env.ANT_HOME}/lib" includes="ivy*.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>

On Wed, 26 Apr 2023, 12:20 Stefan Bodewig, <bo...@apache.org> wrote:

> 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
>
>
>

Re: Problem with resolving dependencies for saxon-HE on Maven repo

Posted by Stefan Bodewig <bo...@apache.org>.
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



Re: Problem with resolving dependencies for saxon-HE on Maven repo

Posted by LINUS FERNANDES <li...@gmail.com>.
The question is:
Is this a regression failure or is this the path forward for ivy:retrieve
i.e., it will no longer support the pathid attribute?

On Wed, 26 Apr 2023, 10:17 LINUS FERNANDES, <li...@gmail.com>
wrote:

> No such problem with cachepath. I was not using it earlier though. This
> change forces me to refer to the ivy cache jars directly in my ant
> classpath since I have to jump through hoops to create a lib jar classpath
> for each project dependency in my project of projects.
>
> https://github.com/Fernal73/LearnJava
>
> On Wed, 26 Apr 2023, 10:12 LINUS FERNANDES, <li...@gmail.com>
> wrote:
>
>> No, it doesn't . Ivy 2.5.1 is complaining that the task does not have the
>> attribute pathid or pathId either.
>>
>> On Wed, 26 Apr 2023, 10:09 Stefan Bodewig, <bo...@apache.org> wrote:
>>
>>> On 2023-04-26, LINUS FERNANDES wrote:
>>>
>>> > Could you also let me know in which release of ivy was pathid removed
>>> as an
>>> > attribute in the retrieve task and why? Documentation for that is hard
>>> to
>>> > come by.
>>>
>>> I must admit that I'm not really that familiar with Ivy myself, I just
>>> jumped in to fix a bug.
>>>
>>> AFAICT the IvyRetrieve Java class still contains a setPathId(String) [1]
>>> method so the retrieve task should (still) have a pathId attribute in
>>> 2.5.1.
>>>
>>> Stefan
>>>
>>> [1]
>>> https://github.com/apache/ant-ivy/blob/master/src/java/org/apache/ivy/ant/IvyRetrieve.java#L77
>>>
>>

Re: Problem with resolving dependencies for saxon-HE on Maven repo

Posted by LINUS FERNANDES <li...@gmail.com>.
No such problem with cachepath. I was not using it earlier though. This
change forces me to refer to the ivy cache jars directly in my ant
classpath since I have to jump through hoops to create a lib jar classpath
for each project dependency in my project of projects.

https://github.com/Fernal73/LearnJava

On Wed, 26 Apr 2023, 10:12 LINUS FERNANDES, <li...@gmail.com>
wrote:

> No, it doesn't . Ivy 2.5.1 is complaining that the task does not have the
> attribute pathid or pathId either.
>
> On Wed, 26 Apr 2023, 10:09 Stefan Bodewig, <bo...@apache.org> wrote:
>
>> On 2023-04-26, LINUS FERNANDES wrote:
>>
>> > Could you also let me know in which release of ivy was pathid removed
>> as an
>> > attribute in the retrieve task and why? Documentation for that is hard
>> to
>> > come by.
>>
>> I must admit that I'm not really that familiar with Ivy myself, I just
>> jumped in to fix a bug.
>>
>> AFAICT the IvyRetrieve Java class still contains a setPathId(String) [1]
>> method so the retrieve task should (still) have a pathId attribute in
>> 2.5.1.
>>
>> Stefan
>>
>> [1]
>> https://github.com/apache/ant-ivy/blob/master/src/java/org/apache/ivy/ant/IvyRetrieve.java#L77
>>
>

Re: Problem with resolving dependencies for saxon-HE on Maven repo

Posted by LINUS FERNANDES <li...@gmail.com>.
No, it doesn't . Ivy 2.5.1 is complaining that the task does not have the
attribute pathid or pathId either.

On Wed, 26 Apr 2023, 10:09 Stefan Bodewig, <bo...@apache.org> wrote:

> On 2023-04-26, LINUS FERNANDES wrote:
>
> > Could you also let me know in which release of ivy was pathid removed as
> an
> > attribute in the retrieve task and why? Documentation for that is hard to
> > come by.
>
> I must admit that I'm not really that familiar with Ivy myself, I just
> jumped in to fix a bug.
>
> AFAICT the IvyRetrieve Java class still contains a setPathId(String) [1]
> method so the retrieve task should (still) have a pathId attribute in
> 2.5.1.
>
> Stefan
>
> [1]
> https://github.com/apache/ant-ivy/blob/master/src/java/org/apache/ivy/ant/IvyRetrieve.java#L77
>

Re: Problem with resolving dependencies for saxon-HE on Maven repo

Posted by Stefan Bodewig <bo...@apache.org>.
On 2023-04-26, LINUS FERNANDES wrote:

> Could you also let me know in which release of ivy was pathid removed as an
> attribute in the retrieve task and why? Documentation for that is hard to
> come by.

I must admit that I'm not really that familiar with Ivy myself, I just
jumped in to fix a bug.

AFAICT the IvyRetrieve Java class still contains a setPathId(String) [1]
method so the retrieve task should (still) have a pathId attribute in
2.5.1.

Stefan

[1] https://github.com/apache/ant-ivy/blob/master/src/java/org/apache/ivy/ant/IvyRetrieve.java#L77

Re: Problem with resolving dependencies for saxon-HE on Maven repo

Posted by LINUS FERNANDES <li...@gmail.com>.
Thanks, Stefan.

Could you also let me know in which release of ivy was pathid removed as an
attribute in the retrieve task and why? Documentation for that is hard to
come by.

Regards,
Linus.

On Wed, 26 Apr 2023, 00:58 Stefan Bodewig, <bo...@apache.org> wrote:

> Stefan Bodewig <bo...@apache.org> writes:
>
> > I believe there is a bug in PomModuleDescriptoBuilder that assumes it is
> > just looking at the same dependency twice as it doesn't take the
> > classifier into account.
> >
> > I've opened https://issues.apache.org/jira/browse/IVY-1642
>
> should be fixed with
>
> https://github.com/apache/ant-ivy/commit/5f11f05fe38b2fc3779d5bec6287505798bc701c
> , will be fixed in Ivy 2.5.2 once it is released.
>
> Stefan
>

Re: Problem with resolving dependencies for saxon-HE on Maven repo

Posted by Stefan Bodewig <bo...@apache.org>.
Stefan Bodewig <bo...@apache.org> writes:

> I believe there is a bug in PomModuleDescriptoBuilder that assumes it is
> just looking at the same dependency twice as it doesn't take the
> classifier into account.
>
> I've opened https://issues.apache.org/jira/browse/IVY-1642

should be fixed with
https://github.com/apache/ant-ivy/commit/5f11f05fe38b2fc3779d5bec6287505798bc701c
, will be fixed in Ivy 2.5.2 once it is released.

Stefan

Re: Problem with resolving dependencies for saxon-HE on Maven repo

Posted by Stefan Bodewig <bo...@apache.org>.
Hi Linus

On 2023-04-13, LINUS FERNANDES wrote:

> There is a problem downloading the dependencies for Saxon-HE from Maven
> using Ivy.
> The xmlresolver-5.1.1.jar does not download but it's classified jar
> xmlresolver-data-5.1.1.jar does.  Both jars are listed as dependencies in
> the pom for Saxon-HE.

> You can read about it in more detail on the following thread:

> https://github.com/checkstyle/checkstyle/issues/12969

> You can execute an ant build for the same at :

> https://github.com/Fernal73/CheckStyleSample/

Yes, I can see what you describe when running "ant resolve" on your
example build file - this is what the ivy.xml created from Saxon-HE's
POM says:

<dependency org="org.xmlresolver" name="xmlresolver" rev="5.1.1" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)">
	<artifact name="xmlresolver" type="jar" ext="jar" conf="compile" m:classifier="data"/>
</dependency>

so there is only one artifact in here. If I add a second artifact
manually (without classifier) the "normal" jar is downloaded and copied
from the cache as well.

I believe there is a bug in PomModuleDescriptoBuilder that assumes it is
just looking at the same dependency twice as it doesn't take the
classifier into account.

I've opened https://issues.apache.org/jira/browse/IVY-1642

Thank you

      Stefan