[ https://issues.apache.org/jira/browse/KAFKA-7491?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17519371#comment-17519371 ]
Robin Van Praet commented on KAFKA-7491: ---------------------------------------- What we did was using the shade-plugin to combine kafka-streams and kafka-streams-test-utils into a new artifact (we called it kafka-streams-testability-patch). And we use that one for our builds. You just need to make sure that you include the original one in your deliverable. {code:java} <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> ... <artifactId>kafka-streams-testability-patch</artifactId> <dependencies> <dependency> <groupId>org.apache.kafka</groupId> <artifactId>kafka-streams</artifactId> <version>2.6.2</version> <exclusions> <exclusion> <groupId>org.apache.kafka</groupId> <artifactId>connect-json</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>org.apache.kafka</groupId> <artifactId>kafka-streams-test-utils</artifactId> <version>2.6.2</version> </dependency> </dependencies> <build> <plugins> <plugin> <artifactId>maven-shade-plugin</artifactId> <version>3.2.0</version> <executions> <execution> <phase>package</phase> <goals> <goal>shade</goal> </goals> <configuration> <artifactSet> <includes>org.apache.kafka:kafka-streams*</includes> </artifactSet> <promoteTransitiveDependencies>true</promoteTransitiveDependencies> <transformers> <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> <manifestEntries> <Automatic-Module-Name>kafka.streams</Automatic-Module-Name> </manifestEntries> </transformer> </transformers> </configuration> </execution> </executions> </plugin> </plugins> </build> </project> {code} > Kafka streams and Kafka streams test utils have split packages > -------------------------------------------------------------- > > Key: KAFKA-7491 > URL: https://issues.apache.org/jira/browse/KAFKA-7491 > Project: Kafka > Issue Type: Bug > Components: streams > Reporter: Robin Van Praet > Priority: Major > > When trying to test a Kafka Streams application using JDK 9+, using the > module path, (test) compilation errors occur. > The TopologyTestDriver cannot be located in kafka-streams-test-utils because > package 'org.apache.kafka.streams' is already provided by module > kafka-streams. > Please make sure that packages are not re-used between production libraries > and test util libraries. -- This message was sent by Atlassian Jira (v8.20.1#820001)