Results 1 to 8 of 8

Thread: Compiling SpringSecurity sources: compile error

  1. #1
    Join Date
    May 2009
    Location
    Rus
    Posts
    87

    Default Compiling SpringSecurity sources: compile error

    I just grabbed the sources and run 'gradle build'. What can be the reason of error:
    Code:
    * What went wrong:Could not resolve all dependencies for configuration ':itest-web:testRuntime'.
    > Artifact 'bouncycastle:bcprov-jdk15:140@jar' not found.
    
    
    * Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
    
    
    BUILD FAILED
    PS: sorry, it's not a compilation error, but I can't change the title
    Last edited by ctapobep; Jul 8th, 2012 at 03:03 AM.

  2. #2
    Join Date
    May 2009
    Location
    Rus
    Posts
    87

    Default

    I removed that dependency from the local repo and then rerun the task and now it's hooked up.
    But now the problem is with language level, it's not compiling because of annotations and says that annotations are supported only starting from Java5. I took a look at the build.gradle and I didn't find there explicit property that sets the sourceCompatibility and targetCompatibility. Should that be set explicitly in build.gradle?


  3. #3
    Join Date
    Oct 2008
    Location
    Santa Fe, NM
    Posts
    18

    Default

    I got similar error when building:
    ~/git/spring-security $ ./gradlew build
    FAILURE: Build failed with an exception.

    * What went wrong:
    Failed to notify build listener.
    > Failed to notify build listener.
    > Could not resolve all dependencies for configuration ':runtime'.
    > Artifact 'xalan:xalan:2.6.0@jar' not found.

  4. #4
    Join Date
    May 2009
    Location
    Rus
    Posts
    87

    Default

    Did you try to remove this dependency from your local maven repo?

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

    Default

    Quote Originally Posted by ctapobep View Post
    I removed that dependency from the local repo and then rerun the task and now it's hooked up.
    But now the problem is with language level, it's not compiling because of annotations and says that annotations are supported only starting from Java5. I took a look at the build.gradle and I didn't find there explicit property that sets the sourceCompatibility and targetCompatibility. Should that be set explicitly in build.gradle?

    Are you using the wrapper? What command are you running? What is the output of "./gradlew --version"? If the sourceCompatibility and targetCompatibility are not set it defaults to the current JDK. If you checkout master the sourceCompatibility has been explicitly set as part of SEC-1994 however this will only work if the JDK you are using is 1.5+
    Last edited by Rob Winch; Jul 8th, 2012 at 11:01 PM. Reason: format link
    Rob Winch - @rob_winch
    Spring Security Lead
    Pivotal

  6. #6
    Join Date
    Oct 2008
    Location
    Santa Fe, NM
    Posts
    18

    Default

    ./gradlew -version
    ------------------------------------------------------------
    Gradle 1.0
    ------------------------------------------------------------

    Gradle build time: Tuesday, June 12, 2012 12:56:21 AM UTC
    Groovy: 1.8.6
    Ant: Apache Ant(TM) version 1.8.2 compiled on December 20 2010
    Ivy: 2.2.0
    JVM: 1.7.0_03 (Oracle Corporation 22.1-b02)
    OS: Linux 3.2.0-25-generic amd64

    I removed xalan from maven repo, now getting:

    ./gradlew build
    :buildSrc:compileJava UP-TO-DATE
    :buildSrc:compileGroovy
    :buildSrcrocessResources UP-TO-DATE
    :buildSrc:classes
    :buildSrc:jar
    :buildSrc:assemble
    :buildSrc:compileTestJava UP-TO-DATE
    :buildSrc:compileTestGroovy UP-TO-DATE
    :buildSrcrocessTestResources UP-TO-DATE
    :buildSrc:testClasses UP-TO-DATE
    :buildSrc:test
    :buildSrc:check
    :buildSrc:build

    FAILURE: Build failed with an exception.

    * Where:
    Build file '~/git/spring-security/docs/docs.gradle' line: 115

    * What went wrong:
    A problem occurred evaluating project ':docs'.
    > Could not create task of type 'TarUpload'.

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

    Default

    What version of the code are you trying to compile? The current master build fine with JDK 1.7 for me. Can you try renaming your local maven repository? Can you run again with --stacktrace?
    Rob Winch - @rob_winch
    Spring Security Lead
    Pivotal

  8. #8
    Join Date
    Oct 2008
    Location
    Santa Fe, NM
    Posts
    18

    Default

    Okay, renaming my local maven repository worked. Thanks, Rob.

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
  •