[ 
https://issues.apache.org/jira/browse/KAFKA-21011?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18110369#comment-18110369
 ] 

Chia-Ping Tsai commented on KAFKA-21011:
----------------------------------------

Thanks for the report. We are gradually modularizing {{core}} by moving its 
code into separate modules (e.g. {{{}server{}}}). I recommend declaring 
{{org.apache.kafka:kafka-server}} as a compile dependency explicitly :)

> kafka_2.13 marks kafka-server as a runtime rather than compile dependency 
> which upsets kotlinc
> ----------------------------------------------------------------------------------------------
>
>                 Key: KAFKA-21011
>                 URL: https://issues.apache.org/jira/browse/KAFKA-21011
>             Project: Kafka
>          Issue Type: Bug
>          Components: build
>    Affects Versions: 4.3.1
>            Reporter: Robert Elliot
>            Priority: Major
>
> The pom for {{org.apache.kafka:kafka_2.13:4.1.3}} lists 
> {{org.apache.kafka:kafka-server:4.1.3}} as a runtime dependency. However, the 
> kotlin compiler produces a warning when compiling code that instantiates a 
> {{KafkaConfig}} because kotlinc is in the process of requiring supertypes to 
> be on the compile time classpath:
> {noformat}
> > Task :compileKotlin
> w: file:///dev/src/main/kotlin/myapp/kafka/EmbeddedKafkaBroker.kt:61:18 
> Cannot access 'org.apache.kafka.server.config.AbstractKafkaConfig' which is a 
> supertype of 'KafkaConfig'. This may be forbidden soon. Check the module 
> classpath for missing or conflicting dependencies.
> {noformat}
> If it were changed to {{<scope>compile</scope>}} that would fix the problem.
> Diagnosed in 
> [https://github.com/autonomousapps/dependency-analysis-gradle-plugin/issues/1828]



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to