IvyDE
  1. IvyDE
  2. IVYDE-247

Project variables not resolving when using Show In Reverse Dependency Explorer

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.1.0
    • Fix Version/s: 2.2.0.beta1
    • Component/s: workspace resolver
    • Labels:
      None
    • Environment:

      Windows 7, Eclipse 3.5.2

      Description

      1- At workspace level (window->Preferences->Ivy->Settings), set "Ivy Settings Path" and "Property Files" as follows:
      Ivy Settings path: $

      {project_loc}/ivysettings.xml
      Property Files: ${project_loc}

      /build.properties

      2- Have a project with dependencies

      3- Right click on the project and resolve to make sure that it results properly

      4- Right-click on this project and try "Show In Reverse Dependency Tree" - an exception happens:

      Unable to find a module descriptor associated with D:/workspace/project/ivy.xml

      Error while resolving the ivy instance for ivy.xml in
      'project':
      Unrecognized variables in the Ivy settings file $

      {project_loc}/ivysettings.xml

      Underlying error (org.eclipse.core.runtime.CoreException): Variable
      references empty selection: ${project_loc}

        Issue Links

          Activity

          Hide
          Nicolas Lalevée added a comment -

          The root of the issue is that $

          {project_loc} depends of the current selection in the workspace. Eclipse's message is about that: "Underlying error (org.eclipse.core.runtime.CoreException): Variable references empty selection: ${project_loc}

          "

          If you launch an Ivy resolve by selecting the project, it will effectively resolve correctly. Try on IvyDE's container, you will see that it fails just like the reverse dependency explorer.

          I googled and I found that: http://blog.samratdhillon.com/archives/473

          I understand though your usecase. I haven't found a way to properly do it with just Eclipse variables. If you do I would be glad to hear about.
          Maybe IvyDE could do the substitution itself has it does know in which project the resolve does happen. But I would be worried about overriding Eclipse standard behavior about variables.

          Show
          Nicolas Lalevée added a comment - The root of the issue is that $ {project_loc} depends of the current selection in the workspace. Eclipse's message is about that: "Underlying error (org.eclipse.core.runtime.CoreException): Variable references empty selection: ${project_loc} " If you launch an Ivy resolve by selecting the project, it will effectively resolve correctly. Try on IvyDE's container, you will see that it fails just like the reverse dependency explorer. I googled and I found that: http://blog.samratdhillon.com/archives/473 I understand though your usecase. I haven't found a way to properly do it with just Eclipse variables. If you do I would be glad to hear about. Maybe IvyDE could do the substitution itself has it does know in which project the resolve does happen. But I would be worried about overriding Eclipse standard behavior about variables.
          Hide
          Nicolas Lalevée added a comment -

          Finally I have make IvyDE support a variable named {{$

          {ivyproject_loc}

          }} which is the location of the project containing the IvyDE classpath container currently being resolved.

          Show
          Nicolas Lalevée added a comment - Finally I have make IvyDE support a variable named {{$ {ivyproject_loc} }} which is the location of the project containing the IvyDE classpath container currently being resolved.
          Hide
          Marc Batchelor added a comment -

          Nicolas - that's terrific news! What build will I find this in? The next CI? When do you think it will be generally available?

          Show
          Marc Batchelor added a comment - Nicolas - that's terrific news! What build will I find this in? The next CI? When do you think it will be generally available?
          Hide
          Nicolas Lalevée added a comment -

          The Hudson hosted by the ASF is waiting to build it:
          https://hudson.apache.org/hudson/job/IvyDE/
          https://hudson.apache.org/hudson/job/IvyDE-updatesite/

          It should be build soon, probably within the hour.

          Show
          Nicolas Lalevée added a comment - The Hudson hosted by the ASF is waiting to build it: https://hudson.apache.org/hudson/job/IvyDE/ https://hudson.apache.org/hudson/job/IvyDE-updatesite/ It should be build soon, probably within the hour.

            People

            • Assignee:
              Nicolas Lalevée
              Reporter:
              Marc Batchelor
            • Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development