Ivy resolve failing for some users

6.5k views Asked by At

Certain developers on my project are unable to successfully execute an ivy resolve. We use an ivy ssh resolver to a remote server/file system. Impacted developers are typically resolving all but 1 or 2 dependencies successfully. The dependencies that fail to be resolved are the larger jars (example: nasa worldwind). Again, most users are able to resolve all dependencies with no problem. The eclipse project, ivy.xml and ivysettings.xml all come from the software repo and are identical between impacted and unimpacted users. If I copy the failed dependency from my ivy2 cache into an impacted users ivy2 cache, the problem goes away. The ivy resolve is initiated through eclipse/ivyDE.

Things I believe are eliminated:

  • differences in ivy.xml, ivysetings.xml, and eclipse project
  • existance of dependency on server
  • file permission issues on remote file system
  • network connectivity
  • version differences in eclipse/ivyDE

Question: What could be causing ivy resolves to fail for some users? I am starting to suspect this may be a timeout issue with ivy, given that it happens with larger jars.

Configuration:

  • Eclispe Kepler
  • IvyDE 2.2.0

example ivysettings.xml:

<ivysettings>
  <settings defaultResolver="test-chain" />
    <resolvers>
      <chain name="test-chain">
        <ssh name="test-cm" host="IPaddress">
          <ivy pattern="/cm/lib/[organisation]/[module]/ivys/ivy-[revision].xml"/>
          <artifact pattern="/cm/lib/[organisation]/[module]/[type]s/[artifact]-[revision].[ext]"/>
        </ssh>
        <url name="test-cm-file">
          <ivy pattern="file://cm/lib/[organisation]/[module]/ivys/ivy-[revision].xml"/>
          <artifact pattern="file://cm/lib/[organisation]/[module]/[type]s/[artifact]-[revision].[ext]"/>
        </url>
      </chain>
    </resolvers>   
</ivysettings>

example ivy.xml:

<?xml version="1.0" encoding="ISO-8859-1"?>
<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="test"
        module="Application"
        status="integration">
    </info>
    <dependencies>
        <dependency org="nasa" name="worldwind" rev="1.4.0"/>
    </dependencies>
</ivy-module>
1

There are 1 answers

0
R Dub On BEST ANSWER

Using Eyad Ebrahim's suggestions, I was able to examine the IvyDE console and gain insight into the problem. The issue turned out to be that several developers did not have an ivysettings.xml set in either the eclipse global or project IvyDE properties. IvyDE was attempting to use an internet resolver by default, which resulted in two subsequent issues including no public repo for products like worldwind, and blocking of certain files by my company network infrastructure. After correctly configuring the ivysettings.xml file, the custom file/url resolvers listed above were used and everything worked.

Thanks!