Announcement Announcement Module
Collapse
No announcement yet.
Compiling SpringSecurity sources: compile error Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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, 04:03 AM.

  • #2
    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?

    Comment


    • #3
      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.

      Comment


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

        Comment


        • #5
          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 9th, 2012, 12:01 AM. Reason: format link

          Comment


          • #6
            ./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'.

            Comment


            • #7
              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?

              Comment


              • #8
                Okay, renaming my local maven repository worked. Thanks, Rob.

                Comment

                Working...
                X