Uploaded image for project: 'SLF4J'
  1. SLF4J
  2. SLF4J-539

Gradle build fails with SLF4J 1.7.34

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 1.7.35
    • 1.7.34
    • None
    • None

    Description

      > Task :copyLibraries FAILED
      
      FAILURE: Build failed with an exception.
      
      * What went wrong:
      Execution failed for task ':copyLibraries'.
      > Could not resolve all files for configuration ':api'.
         > Could not find org.slf4j:slf4j-reload4j:${project.version}.
           Required by:
               project : > org.slf4j:slf4j-log4j12:1.7.34
      

      build.gradle to reproduce the error:

      plugins {
          id 'java-library'
      }
      
      repositories {
          mavenCentral()
      }
      
      configurations.api.setCanBeResolved(true)
      
      dependencies {
          api group: 'org.slf4j', name: 'slf4j-api',      version: '1.7.+'
          api group: 'org.slf4j', name: 'slf4j-log4j12',  version: '1.7.+'
          api group: 'org.slf4j', name: 'jcl-over-slf4j', version: '1.7.+'
          api group: 'org.slf4j', name: 'jul-to-slf4j',   version: '1.7.+'
      }
      
      clean {
          delete "${rootDir}/lib"
      }
      
      task copyLibraries(type: Copy) {
          group = 'build'
          description = 'Copies libraries to the project\'s lib directory'
          from configurations.api + configurations.testCompileClasspath
          into 'lib'
      }
      

      Command:

      gradle clean copyLibraries --refresh-dependencies --warning-mode all
      

      The new dependency org.slf4j:slf4j-reload4j that causes the problem is new for 1.7.34 and as far as I can tell from the SLF4J website we actually don't need it.

      Attachments

        Activity

          People

            ceki Ceki Gülcü
            Veit Alexander Veit
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: