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

As a developer, I would like to be able to import Spring Security using Gradle Integration

    Details

    • Type: Improvement Improvement
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Complete
    • Affects Version/s: 2.7.0.M2
    • Fix Version/s: 2.9.0.M1
    • Component/s: GRADLE
    • Labels:
      None

      Description

      First I would like to say that the Gradle integration is coming along great and I hope that it continues to progress so quickly. Thank you for all your hard work!

      I am one of the Spring Security committers and would love to be able to use STS Gradle integration to import Spring Security. Below are a list of things I would like to be able to 'just do'. Please note that all of these things are done when using standard Gradle (i.e. running gradle eclipse) which might be useful for helping understand what I am looking for.

      • Everything should compile. One of the things I noticed is that spring-security-core's src/test/java is normally added to other project's (i.e. spring-security-web) classpath. However, when running with STS Gradle integration I get this error:

        The container 'Gradle Dependencies' references non existing library '/home/rwinch/spring-security/core/build/classes/test'

      • All tests should pass
      • AspectJ integration should work (this is necessary for the tests to pass)
      • All the war sample projects should be able to be ran using WTP (i.e. WTP integration)
        • It would be nice if the context root of the application could be specified. Currently we configure WTP context root using the context root configured for the Jetty plugin.
      • It would be nice if the eclipse projects were renamed as they are in the standard build. For example when importing the project using STS I get the project name spring-security.spring-security-crypto, but when using standard Gradle the name is spring-security-crypto
      • Use EGit to clone the project. Then support Import project...->Use the new projects wizard to invoke Import -> Gradle project

      Bonus Features:

      Thanks again for all the hard work and let me know if there is anything I can do to assist.

      Rob Winch

        Activity

        Hide
        Rob Winch (c) added a comment -

        Thanks Kris. It appears it has already built (I happened to get the updates just prior to validating the dependencies that needed to be excluded as requested in STS-2063). This worked for me as well.

        Show
        Rob Winch (c) added a comment - Thanks Kris. It appears it has already built (I happened to get the updates just prior to validating the dependencies that needed to be excluded as requested in STS-2063 ). This worked for me as well.
        Hide
        Kris De Volder (c) added a comment - - edited

        Hey Rob,

        I'm closing this issue. I'm sure I didn't yet do all that you were asking for and there are still improvements possible.

        I think however a basic 'import' of spring-security should work now and things such as compiling, deploying the samples etc. should work.

        Things will probably work a little better with more recent version of Gradle also, but I think the spring-security build-script is still requiring M3 so your build script itself may need some work to make that possible.

        Main reason why it will work better is that in more recent Gradle it is possible for STS to reliably determine whether eclipse tasks are available for a project which means that it can turn on running those tasks by default.

        This is important for spring-security because of aspectj natures, WTP natures etc. Right now the only way to get support for those is running the eclipse task.

        Anyhow, I would appreciate very much that if you are trying the tools, you could raise more issues for your most pressing pain points and problems based on the current state of the tools.

        I will also open some separate issues myself based on what I think is still left to do based on your original list.

        Show
        Kris De Volder (c) added a comment - - edited Hey Rob, I'm closing this issue. I'm sure I didn't yet do all that you were asking for and there are still improvements possible. I think however a basic 'import' of spring-security should work now and things such as compiling, deploying the samples etc. should work. Things will probably work a little better with more recent version of Gradle also, but I think the spring-security build-script is still requiring M3 so your build script itself may need some work to make that possible. Main reason why it will work better is that in more recent Gradle it is possible for STS to reliably determine whether eclipse tasks are available for a project which means that it can turn on running those tasks by default. This is important for spring-security because of aspectj natures, WTP natures etc. Right now the only way to get support for those is running the eclipse task. Anyhow, I would appreciate very much that if you are trying the tools, you could raise more issues for your most pressing pain points and problems based on the current state of the tools. I will also open some separate issues myself based on what I think is still left to do based on your original list.
        Hide
        Kris De Volder (c) added a comment - - edited

        Issue raised: https://issuetracker.springsource.com/browse/STS-2342 (maven index integration)
        Existing issue: https://issuetracker.springsource.com/browse/STS-2088 (DSLD support)
        Issue raised: https://issuetracker.springsource.com/browse/STS-1856 (EGit integration)

        Show
        Kris De Volder (c) added a comment - - edited Issue raised: https://issuetracker.springsource.com/browse/STS-2342 (maven index integration) Existing issue: https://issuetracker.springsource.com/browse/STS-2088 (DSLD support) Issue raised: https://issuetracker.springsource.com/browse/STS-1856 (EGit integration)
        Hide
        Rob Winch (c) added a comment -

        Kris,

        Thank you for following up on this. I agree that a majority of my concerns have been addressed. Hopefully I can get some time to update to the latest gradle soon. At that time I will be certain to provide new JIRA's for issues I encounter. Thanks for the excellent support.

        Show
        Rob Winch (c) added a comment - Kris, Thank you for following up on this. I agree that a majority of my concerns have been addressed. Hopefully I can get some time to update to the latest gradle soon. At that time I will be certain to provide new JIRA's for issues I encounter. Thanks for the excellent support.
        Hide
        Kris De Volder (c) added a comment -

        Great... thanks! It is a big help to get feedback like this. Working with spring-security as a 'test project' has been quite helpful to me in figuring out what needs fixing

        Show
        Kris De Volder (c) added a comment - Great... thanks! It is a big help to get feedback like this. Working with spring-security as a 'test project' has been quite helpful to me in figuring out what needs fixing

          People

          • Assignee:
            Kris De Volder (c)
            Reporter:
            Rob Winch (c)
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              First Response Date: