IvyDE
  1. IvyDE
  2. IVYDE-186

Resolve in Workspace fails to find projects under certain conditions

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0.final
    • Fix Version/s: 2.1.0
    • Component/s: workspace resolver
    • Labels:
      None

      Description

      Under certain conditions the resolve in workspace resolver fails to find the appropriate project to add into the classpath container. After stepping through the code I found a few potential problems.
      1 - The workspace project may have a revision with the pattern "working@WORKSTATION_NAME". At the same time the revision specified in the ivy.xml may have an explicit revision. In this case I would want my working copy to take precedence. When this is the case the default chain resolver falls through each of its child resolver checks since the specified revision is not dynamic for any of them. In effect, this makes the resolver only use "exact" which will fail. I have some doubts as to why the chain resolver does not use the "accept" method for each of its child resolvers but that is outside the scope of ivyde so my solution avoids the problem by wrapping whatever the default resolver is in a new chain resolver which falls through to a new abstract resolver looking specifically for "workstation@".

      2 - If the project had been resolved previously to a cache location the cached jar in my case was taking precedence over the project. I stepped through this code and found that there is a comparison for the "default" attribute of a revision. I did not see usage elsewhere in the project of the default attribute so I simply set it to false for the generated module descriptor.

        Activity

        Adam Karl created issue -
        Hide
        Adam Karl added a comment -

        Patch for 2.0.0-final branch

        Show
        Adam Karl added a comment - Patch for 2.0.0-final branch
        Adam Karl made changes -
        Field Original Value New Value
        Attachment IVYDE-186-2.0.0-final [ 12412266 ]
        Hide
        Adam Karl added a comment -

        There could probably also be a component added to Jira just for the workspace resolver. It is a critical feature for the way that many people use/would use IvyDE.

        Show
        Adam Karl added a comment - There could probably also be a component added to Jira just for the workspace resolver. It is a critical feature for the way that many people use/would use IvyDE.
        Hide
        Nicolas Lalevée added a comment -

        I have added a workspace resolver component as you suggested. For the fix version I have no time to look at your patch before the release of IvyDE 2.0.0-final so it will be postponed to the next one.

        Show
        Nicolas Lalevée added a comment - I have added a workspace resolver component as you suggested. For the fix version I have no time to look at your patch before the release of IvyDE 2.0.0-final so it will be postponed to the next one.
        Nicolas Lalevée made changes -
        Fix Version/s 2.0.0.final [ 12313533 ]
        Component/s workspace resolver [ 12312942 ]
        Component/s classpath container [ 12311720 ]
        Hide
        Nicolas Lalevée added a comment -

        Could you more specific about the "certain conditions" you are talking about ?
        I have tried different scenarios, and every of them works for me:

        • project1 with no revision in ivy.xml, project2 depending on project1 rev="1.2"
        • project1 with no revision in ivy.xml, project2 depending on project1 rev="latest.integration"
        • project1 with revision="1.2" in ivy.xml, project2 depending on project1 rev="latest.integration"
        • project1 with revision="1.2" in ivy.xml, project2 depending on project1 rev="1.2"
        • project1 with revision="1.2" in ivy.xml, project2 depending on project1 rev="[1.1,1.3]"
        Show
        Nicolas Lalevée added a comment - Could you more specific about the "certain conditions" you are talking about ? I have tried different scenarios, and every of them works for me: project1 with no revision in ivy.xml, project2 depending on project1 rev="1.2" project1 with no revision in ivy.xml, project2 depending on project1 rev="latest.integration" project1 with revision="1.2" in ivy.xml, project2 depending on project1 rev="latest.integration" project1 with revision="1.2" in ivy.xml, project2 depending on project1 rev="1.2" project1 with revision="1.2" in ivy.xml, project2 depending on project1 rev=" [1.1,1.3] "
        Hide
        Nicolas Lalevée added a comment -

        I didn't know why I wrote

        project1 with no revision in ivy.xml, project2 depending on project1 rev="1.2"

        worked, but effectively it doesn't.
        It is fixed in trunk, thanks for the patch.

        Show
        Nicolas Lalevée added a comment - I didn't know why I wrote project1 with no revision in ivy.xml, project2 depending on project1 rev="1.2" worked, but effectively it doesn't. It is fixed in trunk, thanks for the patch.
        Nicolas Lalevée made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Assignee Nicolas Lalevée [ hibou ]
        Fix Version/s 2.1.0 [ 12314066 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            Nicolas Lalevée
            Reporter:
            Adam Karl
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development