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

Details

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:

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

Rob Winch
added a comment - 30/Aug/11 8:37 PM 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.

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.

Kris De Volder
added a comment - 16/Dec/11 12:11 PM - 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.

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.

Rob Winch
added a comment - 16/Dec/11 12:22 PM 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.

Kris De Volder
added a comment - 16/Dec/11 12:31 PM 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