Expected and Results
Publishing should work as expected (as with versions prior to 8.3.2) OR some guidelines should be provided how to handle publishing after #956 was introduced (so chances are this is not a bug but rather expected behavior).
Related environment and versions
Enviroment: Linux with JDK 17 and Gradle 8.10.2:
dejan@dejan-HP-ProBook-450-G7:~/kafka$ uname -r
6.8.0-51-generic
dejan@dejan-HP-ProBook-450-G7:~/kafka$ java -version
openjdk version "17.0.13" 2024-10-15
OpenJDK Runtime Environment (build 17.0.13+11-Ubuntu-2ubuntu124.04)
OpenJDK 64-Bit Server VM (build 17.0.13+11-Ubuntu-2ubuntu124.04, mixed mode, sharing)
dejan@dejan-HP-ProBook-450-G7:~/kafka$
Plugin version 8.3.1 -->> publishing works as expected ✅
Plugin versions >= 8.3.2 -->> publishing fails ❌ (see error stack trace below):
dejan@dejan-HP-ProBook-450-G7:~/kafka$ git log -4 --oneline
4d56697d20 (HEAD -> KAFKA-18142-shadow-9.0.0-beta4, origin/KAFKA-18142-shadow-9.0.0-beta4) shadow plugin version 9.0.0-beta4
691510d8ee (origin/KAFKA-18142-shadow-8.3.5, KAFKA-18142-shadow-8.3.5) shadow plugin version 8.3.5
2787b89d0b (origin/KAFKA-18142, KAFKA-18142) KAFKA-18142 switch Kafka's Gradle build shadow plugin to `com.gradleup.shadow`
b4be178599 (upstream/trunk, origin/trunk, origin/HEAD, trunk) KAFKA-17393: Remove log.message.format.version/message.format.version (KIP-724) (#18267)
dejan@dejan-HP-ProBook-450-G7:~/kafka$ ./gradlew releaseTarGz publishToMavenLocal
> Configure project :
Starting build with version 4.1.0-SNAPSHOT (commit id 4d56697d) using Gradle 8.10.2, Java 17 and Scala 2.13.15
Build properties: ignoreFailures=false, maxParallelForks=8, maxScalacThreads=8, maxTestRetries=0
> Task :clients:generatePomFileForMavenJavaPublication FAILED
FAILURE: Build failed with an exception.
* Where:
Build file '/home/dejan/kafka/build.gradle' line: 367
* What went wrong:
Execution failed for task ':clients:generatePomFileForMavenJavaPublication'.
> Could not apply withXml() to generated POM
> Index 0 out of bounds for length 0
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Get more help at https://help.gradle.org.
BUILD FAILED in 6s
45 actionable tasks: 16 executed, 29 up-to-date
dejan@dejan-HP-ProBook-450-G7:~/kafka$ git checkout KAFKA-18142-shadow-8.3.5
Switched to branch 'KAFKA-18142-shadow-8.3.5'
Your branch is up-to-date with 'origin/KAFKA-18142-shadow-8.3.5'.
dejan@dejan-HP-ProBook-450-G7:~/kafka$ ./gradlew releaseTarGz publishToMavenLocal
> Configure project :
Starting build with version 4.1.0-SNAPSHOT (commit id 691510d8) using Gradle 8.10.2, Java 17 and Scala 2.13.15
Build properties: ignoreFailures=false, maxParallelForks=8, maxScalacThreads=8, maxTestRetries=0
> Task :clients:generatePomFileForMavenJavaPublication FAILED
FAILURE: Build failed with an exception.
* Where:
Build file '/home/dejan/kafka/build.gradle' line: 367
* What went wrong:
Execution failed for task ':clients:generatePomFileForMavenJavaPublication'.
> Could not apply withXml() to generated POM
> Index 0 out of bounds for length 0
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Get more help at https://help.gradle.org.
BUILD FAILED in 6s
56 actionable tasks: 19 executed, 37 up-to-date
dejan@dejan-HP-ProBook-450-G7:~/kafka$ git checkout KAFKA-18142
Switched to branch 'KAFKA-18142'
Your branch is up-to-date with 'origin/KAFKA-18142'.
dejan@dejan-HP-ProBook-450-G7:~/kafka$ ./gradlew releaseTarGz publishToMavenLocal
> Configure project :
Starting build with version 4.1.0-SNAPSHOT (commit id 2787b89d) using Gradle 8.10.2, Java 17 and Scala 2.13.15
Build properties: ignoreFailures=false, maxParallelForks=8, maxScalacThreads=8, maxTestRetries=0
> Task :streams:genStreamsConfigDocs
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
> Task :core:genAdminClientConfigDocs
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
> Task :core:genConsumerConfigDocs
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
> Task :core:genKafkaConfigDocs
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
> Task :core:genProducerConfigDocs
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
> Task :core:genProtocolErrorDocs
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
> Task :core:genTopicConfigDocs
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
For more on this, please refer to https://docs.gradle.org/8.10.2/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
BUILD SUCCESSFUL in 31s
677 actionable tasks: 215 executed, 462 up-to-date
dejan@dejan-HP-ProBook-450-G7:~/kafka$ date
Sun 22 Dec 11:31:36 CET 2024
dejan@dejan-HP-ProBook-450-G7:~/kafka$
Reproduction steps
How to reproduce:
- git clone https://github.com/dejan2609/kafka
- cd kafka
- git checkout KAFKA-18142
- ./gradlew releaseTarGz publishToMavenLocal
- result: BUILD SUCCESSFUL ✅
- git checkout KAFKA-18142-shadow-8.3.5
- ./gradlew releaseTarGz publishToMavenLocal
- build fails: ❌
> Configure project :
Starting build with version 4.1.0-SNAPSHOT (commit id 691510d8) using Gradle 8.10.2, Java 17 and Scala 2.13.15
Build properties: ignoreFailures=false, maxParallelForks=8, maxScalacThreads=8, maxTestRetries=0
> Task :clients:generatePomFileForMavenJavaPublication FAILED
FAILURE: Build failed with an exception.
* Where:
Build file '/home/dejan/kafka/build.gradle' line: 367
* What went wrong:
Execution failed for task ':clients:generatePomFileForMavenJavaPublication'.
> Could not apply withXml() to generated POM
> Index 0 out of bounds for length 0
- git checkout KAFKA-18142-shadow-9.0.0-beta4
- ./gradlew releaseTarGz publishToMavenLocal
- build fails: ❌ (same error as with version 8.3.5):
> Configure project :
Starting build with version 4.1.0-SNAPSHOT (commit id 4d56697d) using Gradle 8.10.2, Java 17 and Scala 2.13.15
Build properties: ignoreFailures=false, maxParallelForks=8, maxScalacThreads=8, maxTestRetries=0
> Task :clients:generatePomFileForMavenJavaPublication FAILED
FAILURE: Build failed with an exception.
* Where:
Build file '/home/dejan/kafka/build.gradle' line: 367
* What went wrong:
Execution failed for task ':clients:generatePomFileForMavenJavaPublication'.
> Could not apply withXml() to generated POM
> Index 0 out of bounds for length 0
Anything else?
Probably related to this:
Expected and Results
Publishing should work as expected (as with versions prior to 8.3.2) OR some guidelines should be provided how to handle publishing after #956 was introduced (so chances are this is not a bug but rather expected behavior).
Related environment and versions
Enviroment: Linux with JDK 17 and Gradle 8.10.2:
Plugin version 8.3.1 -->> publishing works as expected ✅
Plugin versions >= 8.3.2 -->> publishing fails ❌ (see error stack trace below):
Reproduction steps
How to reproduce:
Anything else?
Probably related to this: