Results 1 to 4 of 4

Thread: Trying to run the sample code of Spring Security 3.1

  1. #1
    Join Date
    Dec 2011
    Posts
    11

    Default Trying to run the sample code of Spring Security 3.1

    I'm trying to run the Spring Security 3.1 sample code. I got the sources, and as explained, I typed:

    Code:
    $ ./gradlew build
    $ ./gradlew install
    I'm on Linux Ubuntu 11.10 (Oneiric Ocelot), and I've Gradle 1.0-milestone-6 installed, however, when I typed the code above it downloaded a copy of Gradle 1.0-milestone-3, apart from that, the build worked. After that, I wrote:

    Code:
    $ cd samples/tutorial
    $ gradle jettyRun
    The difference here is that used my milestone 6 Gradle, and it failed. However, before I tried with the Ubuntu-supplied Gradle milestone-3 and it failed too. Here is what I get:

    Code:
    The SourceSet.getClasses() method is deprecated and will be removed in the next version of Gradle. You should use the getOutput() method instead.
    The SourceSet.getClassesDir() method is deprecated and will be removed in the next version of Gradle. You should use the getOutput().getClassesDir() method instead.
    The SourceSet.setClassesDir() method is deprecated and will be removed in the next version of Gradle. You should use the getOutput().setClassesDir() method instead.
    The MavenPluginConvention.getPomDirName() method is deprecated and will be removed in the next version of Gradle. You should use the getMavenPomDir() method instead.
    The MavenPluginConvention.getPomDir() method is deprecated and will be removed in the next version of Gradle. You should use the getMavenPomDir() method instead.
    <someIdeTask>.whenConfigured is deprecated! Replaced by whenMerged() method placed on the relevant model object of eclipse/idea.
    As a starting point, refer to the dsl guide for IdeaProject or EclipseProject.
    For example, ideaProject.whenConfigured was changed to idea.project.ipr.whenMerged
    Trying to override old definition of datatype scp
    Trying to override old definition of datatype sshexec
    The ideaModule.downloadJavadoc method is deprecated and will be removed in the next version of Gradle. You should use the idea.module.downloadJavadoc method instead.
    The ideaModule.outputDir method is deprecated and will be removed in the next version of Gradle. You should use the idea.module.outputDir method instead.
    The ideaModule.testOutputDir method is deprecated and will be removed in the next version of Gradle. You should use the idea.module.testOutputDir method instead.
    The ideaProject.javaVersion method is deprecated and will be removed in the next version of Gradle. You should use the idea.project.jdkName method instead.
    ideaProject.subprojects doesn't do anything at this moment. Please use idea.project.modules instead.
    <someIdeTask>.withXml is deprecated! Moved to the relevant model object of eclipse/idea.
    As a starting point, refer to the dsl guide for IdeaProject or EclipseProject.
    For example, ideaProject.withXml was changed to idea.project.ipr.withXml
    
    FAILURE: Build failed with an exception.
    
    * Where:
    Build file '/home/stefano/workspace/security/spring-security/core/core.gradle' line: 52
    
    * What went wrong:
    A problem occurred evaluating project ':spring-security-core'.
    Cause: Could not find property 'dependencies' on org.gradle.plugins.ide.idea.model.IdeaModule_Decorated@fc912.
    I've found a similar problem in Gradle JIRA 1874, but didn't receive any reply. I was thinking to post this in Gradle forums, but I thought that maybe here I'm more likely to be suggested a workaround. I guess that at least someone was able to run the samples, isn't?

    My workaround for now will be to ditch Gradle, and try to do a Maven project for the samples. Waiting to hear from you guys with better ideas though!

    Thanks in advance
    Last edited by stivlo; Dec 19th, 2011 at 06:26 AM.

  2. #2
    Join Date
    Dec 2011
    Posts
    11

    Default

    Until now I had over 60 views, but nobody answered, so for now, I will share my Git Repository with the Basic Spring Security Tutorial Mavenized.
    Last edited by stivlo; Dec 19th, 2011 at 11:02 AM.

  3. #3

    Default Thanks alot I- had the same problem

    This should be done by default

    Quote Originally Posted by stivlo View Post
    Until now I had over 60 views, but nobody answered, so for now, I will share my Git Repository with the Basic Spring Security Tutorial Mavenized.
    mmmm, I think I will order a cup of coffee in this beautiful spring day

  4. #4
    Join Date
    Jan 2008
    Posts
    1,826

    Default

    Quote Originally Posted by stivlo View Post

    Code:
    $ cd samples/tutorial
    $ gradle jettyRun
    You should not use gradle to build you should always use ./gradlew (this ensures that the correct version of gradle is being used). In this instance you would use ../../gradlew jettyRun. If you want you can use the find-gradle script which ensures that you are always using the gradle wrapper if it is present...otherwise it uses the system default.
    Rob Winch - @rob_winch
    Spring Security Lead
    Pivotal

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •