Spring Tool Suite
  1. Spring Tool Suite
  2. STS-2532

Maven support entries are showing up twice

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Complete
    • Affects Version/s: 2.9.1.RELEASE
    • Fix Version/s: 3.0.0.M2
    • Component/s: MAVEN
    • Labels:
      None

      Description

      At the moment, we have the Maven support in STS, focussed on m2e 1.0, and the legacy Maven support for people who are still using m2eclipse 0.12. The downside of this is that preference pages and context menu actions are showing up twice (because both plugins are installed ans their extensions are showing up). We should find a way to now show those useless parts, so that the user gets a clean UI experience with not both preference pages showing up (for example). And I think we could trigger that my the m2e version that is installed. So whenever there is no m2eclipse 0.12 installed, we don't need to show those extensions and vice versa.

        Issue Links

          Activity

          Hide
          Andrew Eisenberg (c) added a comment -

          Hmmm...I am not seeing maven entries twice in my STS (this is from the zip of 2.9.1). I know that in 2.8.1, when we did significant work in this area, that we would no typically get into a state where components of both versions of m2e were installed.

          What did you do to get into the state where you see the UI from both versions?

          Show
          Andrew Eisenberg (c) added a comment - Hmmm...I am not seeing maven entries twice in my STS (this is from the zip of 2.9.1). I know that in 2.8.1, when we did significant work in this area, that we would no typically get into a state where components of both versions of m2e were installed. What did you do to get into the state where you see the UI from both versions?
          Hide
          Martin Lippert (c) added a comment -

          No, this is not referring to the m2e components themselves, but to the extensions that we from STS contribute to the UI (like the "Dependency Management" preference page in the Spring section). And since the STS Maven feature has two plugins (sts.maven and sts.maven-legacy), you get both bundles installed (independent of the available m2e version).

          Show
          Martin Lippert (c) added a comment - No, this is not referring to the m2e components themselves, but to the extensions that we from STS contribute to the UI (like the "Dependency Management" preference page in the Spring section). And since the STS Maven feature has two plugins (sts.maven and sts.maven-legacy), you get both bundles installed (independent of the available m2e version).
          Hide
          Andrew Eisenberg (c) added a comment -

          OK. I didn't even know about the dependency management page(s).

          There are 2 possible solutions for this:

          1. Ensure only one dependency management page coming from the sts.maven plugin. Remove the other. And ensure the sts.maven.legacy plugin uses the dependency management page from the sts.maven plugin.
          2. Disable the page is the appropriate m2e version is not installed. There is an "enabledWhen" segment of the extension point. So, perhaps this is possible.

          For the context menu command "Update maven dependencies", there is another command "Update maven dependencies (legacy)". This is still confusing and we should try to do the same as we do with the preferences page.

          Have you seen any other places where a similar problem exists?

          Show
          Andrew Eisenberg (c) added a comment - OK. I didn't even know about the dependency management page(s). There are 2 possible solutions for this: Ensure only one dependency management page coming from the sts.maven plugin. Remove the other. And ensure the sts.maven.legacy plugin uses the dependency management page from the sts.maven plugin. Disable the page is the appropriate m2e version is not installed. There is an "enabledWhen" segment of the extension point. So, perhaps this is possible. For the context menu command "Update maven dependencies", there is another command "Update maven dependencies (legacy)". This is still confusing and we should try to do the same as we do with the preferences page. Have you seen any other places where a similar problem exists?
          Hide
          Andrew Eisenberg (c) added a comment -

          Here's my current thinking on this:

          1. For the dependency management page, there only needs to be one of these and both the maven plugin and the legacy maven plugin can share it. Also, this page should be disabled if not a spring project.
          2. For the Refresh dependencies action, we will probably need 2 actions, one for each version of the m2eclipse. We should ensure that only one is enabled/visible at a time.
          Show
          Andrew Eisenberg (c) added a comment - Here's my current thinking on this: For the dependency management page, there only needs to be one of these and both the maven plugin and the legacy maven plugin can share it. Also, this page should be disabled if not a spring project. For the Refresh dependencies action, we will probably need 2 actions, one for each version of the m2eclipse. We should ensure that only one is enabled/visible at a time.
          Hide
          Martin Lippert (c) added a comment -

          Sounds good to me!!!

          Show
          Martin Lippert (c) added a comment - Sounds good to me!!!
          Hide
          Andrew Eisenberg (c) added a comment -

          I have implemented a fix for this, but testing is quite complicated since there are many different configurations that need to be tried and STS does not support both versions of m2eclipse being installed at once. I hope to have this resolved for 3.0.0.M1, but only if I can get some time for testing.

          Show
          Andrew Eisenberg (c) added a comment - I have implemented a fix for this, but testing is quite complicated since there are many different configurations that need to be tried and STS does not support both versions of m2eclipse being installed at once. I hope to have this resolved for 3.0.0.M1, but only if I can get some time for testing.
          Hide
          Andrew Eisenberg (c) added a comment -

          I did some testing locally for m2eclipse v1.0 and things are holding together quite nicely. I pushed the changes to master and I am waiting for a build to complete. When it is ready, I will install on an Eclipse that has the legacy m2e in it.

          Show
          Andrew Eisenberg (c) added a comment - I did some testing locally for m2eclipse v1.0 and things are holding together quite nicely. I pushed the changes to master and I am waiting for a build to complete. When it is ready, I will install on an Eclipse that has the legacy m2e in it.
          Hide
          Andrew Eisenberg (c) added a comment -

          Completed for M2.

          Show
          Andrew Eisenberg (c) added a comment - Completed for M2.

            People

            • Assignee:
              Andrew Eisenberg (c)
              Reporter:
              Martin Lippert (c)
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                First Response Date: