Ivy
  1. Ivy
  2. IVY-1268

Valid Path does not work for Filesystem Resolver

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.2.0
    • Fix Version/s: None
    • Component/s: Core
    • Labels:
      None
    • Environment:

      CentOS5

      Description

      I'm using Ivy 2.2.0 in my current project. I've specified a filesystem resolver and I was playing around with how the root directory to look under for the ivy and artifact patterns is derived. Through playing around with the path, I encountered some odd/buggy behavior where I could specify a valid path but would fail to resolve the file.

      <ivysettings>
      <properties file="../../properties/path.properties"/>
      <property name="repo.dir" value="$

      {filesystem.repo.root}"/>

      <resolvers>
      <filesystem name="local" m2compatible="true">
      <ivy pattern="${repo.dir}/[organisation]/[module]/ivy.xml"/>
      <artifact pattern="${repo.dir}/[organisation]/[module]/[artifact].[ext]"/>
      </filesystem>
      </resolvers>
      </ivysettings>

      path.properties is a file generated by a script prior to building. Originally I was hardcoding the value for ${filesystem.repo.root}

      in the generating script, but I wanted to start deriving the path. When I generated the path, the resolve suddenly started failing. However, at the command line, I was able to copy the jar and ivy file from the repo manually using 'cp' and the output of the failed call to ivy:retrieve, meaning the path was valid, but the resolve was failing.

      module not found: org.slf4j#slf4j;1.6.1
      [ivy:retrieve] ==== local: tried
      [ivy:retrieve] /opt/workspace/ums/UMS/main/build/developer/../.cache/../../../lib/org/slf4j/slf4j/1.6.1/ivy.xml
      [ivy:retrieve] – artifact org.slf4j#slf4j;1.6.1!slf4j.jar:
      [ivy:retrieve] /opt/workspace/ums/UMS/main/build/developer/../.cache/../../../lib/org/slf4j/slf4j/1.6.1/slf4j-1.6.1-jar.jar

      However, a path like /opt/workspace/ums/UMS/main/build/developer/../../../lib/org/slf4j/slf4j/1.6.1/ivy.xml resolves just fine and my build works.

      The same behavior holds true if I specify the path directly in the ivy and artifact pattern, so it isn't an issue with the path.properties file.

        Issue Links

          Activity

          Hide
          Maarten Coene added a comment -

          Jonathan,

          could you confirm that the "/opt/workspace/ums/UMS/main/build/developer/../.cache" directory does exist?

          thanks,
          Maarten

          Show
          Maarten Coene added a comment - Jonathan, could you confirm that the "/opt/workspace/ums/UMS/main/build/developer/../.cache" directory does exist? thanks, Maarten
          Hide
          Jonathan Williams added a comment - - edited

          Hi Maarten,

          Yes, this directory is created by my build prior any ivy ant tasks being called.

          In fact, a local repository of internal artifacts (to the build) are published under build/.cache/elib, and one is successfully downloaded to the ivy cache from that location before it chokes on the paths I mentioned above.

          -Jonathan

          Show
          Jonathan Williams added a comment - - edited Hi Maarten, Yes, this directory is created by my build prior any ivy ant tasks being called. In fact, a local repository of internal artifacts (to the build) are published under build/.cache/elib, and one is successfully downloaded to the ivy cache from that location before it chokes on the paths I mentioned above. -Jonathan
          Hide
          Maarten Coene added a comment -

          And do you see a stracktrace when running Ant in verbose mode (-v) ?

          Show
          Maarten Coene added a comment - And do you see a stracktrace when running Ant in verbose mode (-v) ?
          Hide
          Jonathan Williams added a comment -

          resolve failed - see output for details
          at org.apache.ivy.ant.IvyResolve.doExecute(IvyResolve.java:251)
          at org.apache.ivy.ant.IvyTask.execute(IvyTask.java:277)
          at org.apache.ivy.ant.IvyPostResolveTask.ensureResolved(IvyPostResolveTask.java:217)
          at org.apache.ivy.ant.IvyPostResolveTask.prepareAndCheck(IvyPostResolveTask.java:164)
          at org.apache.ivy.ant.IvyRetrieve.doExecute(IvyRetrieve.java:57)
          at org.apache.ivy.ant.IvyTask.execute(IvyTask.java:277)
          at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
          at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:597)
          at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
          at org.apache.tools.ant.Task.perform(Task.java:348)
          at org.apache.tools.ant.Target.execute(Target.java:390)
          at org.apache.tools.ant.Target.performTasks(Target.java:411)
          at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1397)
          at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
          at org.apache.tools.ant.Project.executeTargets(Project.java:1249)
          at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442)
          at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
          at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:597)
          at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
          at org.apache.tools.ant.Task.perform(Task.java:348)
          at org.apache.tools.ant.Target.execute(Target.java:390)
          at org.apache.tools.ant.Target.performTasks(Target.java:411)
          at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1397)
          at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
          at org.apache.tools.ant.Project.executeTargets(Project.java:1249)
          at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442)
          at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105)
          at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
          at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:597)
          at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
          at org.apache.tools.ant.Task.perform(Task.java:348)
          at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68)
          at net.sf.antcontrib.logic.IfTask.execute(IfTask.java:197)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:597)
          at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
          at org.apache.tools.ant.TaskAdapter.execute(TaskAdapter.java:154)
          at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
          at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:597)
          at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
          at org.apache.tools.ant.Task.perform(Task.java:348)
          at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68)
          at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
          at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:597)
          at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
          at org.apache.tools.ant.Task.perform(Task.java:348)
          at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:398)
          at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
          at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:597)
          at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
          at org.apache.tools.ant.Task.perform(Task.java:348)
          at org.apache.tools.ant.Target.execute(Target.java:390)
          at org.apache.tools.ant.Target.performTasks(Target.java:411)
          at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1397)
          at org.apache.tools.ant.Project.executeTarget(Project.java:1366)
          at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
          at org.apache.tools.ant.Project.executeTargets(Project.java:1249)
          at org.apache.tools.ant.Main.runBuild(Main.java:801)
          at org.apache.tools.ant.Main.startAnt(Main.java:218)
          at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
          at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)

          Total time: 5 seconds

          Show
          Jonathan Williams added a comment - resolve failed - see output for details at org.apache.ivy.ant.IvyResolve.doExecute(IvyResolve.java:251) at org.apache.ivy.ant.IvyTask.execute(IvyTask.java:277) at org.apache.ivy.ant.IvyPostResolveTask.ensureResolved(IvyPostResolveTask.java:217) at org.apache.ivy.ant.IvyPostResolveTask.prepareAndCheck(IvyPostResolveTask.java:164) at org.apache.ivy.ant.IvyRetrieve.doExecute(IvyRetrieve.java:57) at org.apache.ivy.ant.IvyTask.execute(IvyTask.java:277) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.Target.execute(Target.java:390) at org.apache.tools.ant.Target.performTasks(Target.java:411) at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1397) at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38) at org.apache.tools.ant.Project.executeTargets(Project.java:1249) at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.Target.execute(Target.java:390) at org.apache.tools.ant.Target.performTasks(Target.java:411) at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1397) at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38) at org.apache.tools.ant.Project.executeTargets(Project.java:1249) at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442) at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68) at net.sf.antcontrib.logic.IfTask.execute(IfTask.java:197) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) at org.apache.tools.ant.TaskAdapter.execute(TaskAdapter.java:154) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:398) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.Target.execute(Target.java:390) at org.apache.tools.ant.Target.performTasks(Target.java:411) at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1397) at org.apache.tools.ant.Project.executeTarget(Project.java:1366) at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) at org.apache.tools.ant.Project.executeTargets(Project.java:1249) at org.apache.tools.ant.Main.runBuild(Main.java:801) at org.apache.tools.ant.Main.startAnt(Main.java:218) at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280) at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109) Total time: 5 seconds
          Hide
          Maarten Coene added a comment -

          I had a similar issue last week on solaris which I couldn't reproduce on Windows. I was able to submit a patch in SVN trunk that fixes that specific problem. But I think it will also solve yours. Could you try it out in your environment?

          thanks,
          Maarten

          Show
          Maarten Coene added a comment - I had a similar issue last week on solaris which I couldn't reproduce on Windows. I was able to submit a patch in SVN trunk that fixes that specific problem. But I think it will also solve yours. Could you try it out in your environment? thanks, Maarten

            People

            • Assignee:
              Maarten Coene
              Reporter:
              Jonathan Williams
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development