ezhux commented on a change in pull request #1109: [HUDI-238] - Migrating to
Scala 2.12
URL: https://github.com/apache/incubator-hudi/pull/1109#discussion_r365604775
##########
File path: hudi-utilities/pom.xml
##########
@@ -28,14 +28,52 @@
<properties>
<main.basedir>${project.parent.basedir}</main.basedir>
+ <kafka.version>2.0.0</kafka.version>
+ <scala.binary.version>2.12</scala.binary.version>
</properties>
<build>
+
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>net.alchim31.maven</groupId>
+ <artifactId>scala-maven-plugin</artifactId>
+ <version>${scala-maven-plugin.version}</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
</plugin>
+ <plugin>
+ <groupId>net.alchim31.maven</groupId>
+ <artifactId>scala-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>scala-compile-first</id>
+ <phase>process-resources</phase>
+ <goals>
+ <goal>add-source</goal>
+ <goal>compile</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>scala-test-compile</id>
+ <phase>process-test-resources</phase>
+ <goals>
+ <goal>testCompile</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
Review comment:
hi @zhedoubushishi, I couldn't find a way to use
`spark-streaming-kafka-0-10_2.12`, because this jar does not include test
classes. This is the reason why I copied and adapted those 3 Scala files
(`KafkaTestUtils.scala`, `ShutdownHookManager.scala` and `Utils.scala`). As far
as my maven knowledge goes, the only way to use
`https://github.com/apache/spark/blob/master/external/kafka-0-10/src/test/scala/org/apache/spark/streaming/kafka010/KafkaTestUtils.scala`
would be to build a test-jar as described here:
https://maven.apache.org/plugins/maven-jar-plugin/examples/create-test-jar.html.
I can't find such jar anywhere.
Do you have other suggestions or maybe I'm missing something?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services