IvyDE
  1. IvyDE
  2. IVYDE-153

Better support the resolve in workspace feature

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0.beta1
    • Fix Version/s: 2.0.0.final
    • Component/s: None
    • Labels:
      None

      Description

      Today the "resolve in workspace" feature is quite a work around: the resolve process run against the real artifacts in the real repositories, and only after that the resolved artifacts are maybe replaced by the project.
      Drawbacks:

      • the resolve can fail if the artifact is not build but the project exist
      • we have no control of when a project is included or not

      So what we need here is a specific implementation of Ivy's DependencyResolver managed by IvyDE.

      1. IVYDE-153-r736034.patch
        53 kB
        Nicolas Lalevée

        Activity

        Hide
        Matt Goldspink added a comment -

        Just thought I'd update and say I've been using this for over month now and had no issues. It's been working great for us. Thanks

        Show
        Matt Goldspink added a comment - Just thought I'd update and say I've been using this for over month now and had no issues. It's been working great for us. Thanks
        Hide
        Matt Goldspink added a comment -

        HI Nicolas,

        I'd be happy to test this feature. Our team uses the current resolve in workspace heavily across 15 projects in a workspace so we're heavily dependent on it and wouldn't want to see it break in future versions of the plugin. I'll try it myself this week and see how it works out and see if I can get some of the others in the team to try it too.

        Show
        Matt Goldspink added a comment - HI Nicolas, I'd be happy to test this feature. Our team uses the current resolve in workspace heavily across 15 projects in a workspace so we're heavily dependent on it and wouldn't want to see it break in future versions of the plugin. I'll try it myself this week and see how it works out and see if I can get some of the others in the team to try it too.
        Hide
        Nicolas Lalevée added a comment -

        I have finally been able to have a working implementation.
        As a first working version, and the complexity of the feature, it needs to be tested in a daily use.

        Show
        Nicolas Lalevée added a comment - I have finally been able to have a working implementation. As a first working version, and the complexity of the feature, it needs to be tested in a daily use.
        Hide
        Nicolas Lalevée added a comment -

        Here is a patch that use most of the work done by Eugene Goldfarb (IVYDE-43). To avoid changing user's ivysettings, I made IvyDE use this IvySettings:

            private class WorkspaceIvySettings extends IvySettings {
                public DependencyResolver getResolver(String resolverName) {
                    DependencyResolver resolver = super.getResolver(resolverName);
                    if (resolver == null) {
                        Message.error("unknown resolver " + resolverName);
                        return null;
                    }
                    ChainResolver chain = new ChainResolver();
                    chain.setName(javaProject.getElementName() + "-ivyde-workspace-chain-resolver");
                    chain.setSettings(this);
                    chain.setReturnFirst(true);
                    chain.add(new WorkspaceResolver(javaProject, this));
                    chain.add(resolver);
                    return chain;
                }
            }
        

        But apprently this is making some of my project failing to resolve existing artifacts. In the Ivy console I see logged some:

        ==== sandbox-local: tried
        
        /home/nicolasl/dev/tools/ivy/repo-sandbox/com.oracle/ojdbc5/11.1.0.6.0/ivy.xml
        

        But actually that file does exist... And if I remove the resolve in workspace option in that project, so IvyDE will use normal IvySettings implementation, IvyDE successfully resolve the dependencies, even the ojdbc5.
        Some strange side effect is happening here...

        Show
        Nicolas Lalevée added a comment - Here is a patch that use most of the work done by Eugene Goldfarb ( IVYDE-43 ). To avoid changing user's ivysettings, I made IvyDE use this IvySettings: private class WorkspaceIvySettings extends IvySettings { public DependencyResolver getResolver( String resolverName) { DependencyResolver resolver = super .getResolver(resolverName); if (resolver == null ) { Message.error( "unknown resolver " + resolverName); return null ; } ChainResolver chain = new ChainResolver(); chain.setName(javaProject.getElementName() + "-ivyde-workspace-chain-resolver" ); chain.setSettings( this ); chain.setReturnFirst( true ); chain.add( new WorkspaceResolver(javaProject, this )); chain.add(resolver); return chain; } } But apprently this is making some of my project failing to resolve existing artifacts. In the Ivy console I see logged some: ==== sandbox-local: tried /home/nicolasl/dev/tools/ivy/repo-sandbox/com.oracle/ojdbc5/11.1.0.6.0/ivy.xml But actually that file does exist... And if I remove the resolve in workspace option in that project, so IvyDE will use normal IvySettings implementation, IvyDE successfully resolve the dependencies, even the ojdbc5. Some strange side effect is happening here...

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development