导入Kafka Streams时的Eclipse Maven错误示例

时间:2017-12-01 23:40:33

标签: java eclipse maven apache-kafka apache-kafka-streams

在macOS Sierra 10.12.6上使用Eclipse Oxygen.1a Release(4.7.1a)。还安装了Java 1.8和Scala 2.12.4。

来自Confluent的以下存储库的git克隆:

https://github.com/confluentinc/kafka-streams-examples

当在Eclipse中将其作为Maven项目导入时,出现以下错误:

Plugin execution not covered by lifecycle configuration: net.alchim31.maven:scala-maven-plugin:3.2.1:compile (execution: default, phase: compile)

Plugin execution not covered by lifecycle configuration: net.alchim31.maven:scala-maven-plugin:3.2.1:testCompile (execution: default, phase: test-compile)

Plugin execution not covered by lifecycle configuration: org.apache.avro:avro-maven-plugin:1.8.2:schema (execution: default, phase: generate-sources)

尝试使用此帖中建议的解决方案(安装Takari生命周期支持):

Maven pom error in eclipse with Scala

我一直都遇到同样的错误。

尝试在Eclipse中作为Maven项目导入时出现了这个对话框:

[Eclipse Error Dialog[1]

此外,在我的pom.xml文件中,Eclipse在此代码段内的<execution>标记下显示一条红色的红线:

 <executions>
     <execution>
         <goals>
             <goal>compile</goal>
             <goal>testCompile</goal>
         </goals>
     </execution>
</executions>

还有:

<plugin>
 <groupId>org.apache.avro</groupId>
 <artifactId>avro-maven-plugin</artifactId>
 <version>${avro.version}</version>
 <executions>
     <execution>
         <phase>generate-sources</phase>
         <goals>
             <goal>schema</goal>
         </goals>
         <configuration>
             <sourceDirectory>src/main/resources/avro/io/confluent/examples/streams</sourceDirectory>
             <outputDirectory>${project.build.directory}/generated-sources</outputDirectory>
              <stringType>String</stringType>
         </configuration>
     </execution>
 </executions>

有谁知道如何解决这个问题?

@AlexOtt - 是的,你提供的另一个SO帖子表示要包裹和围绕标签。

汇编代码并没有包围所有内容:

https://github.com/confluentinc/kafka-streams-examples/blob/3.3.0-post/pom.xml

现在,错误已从Eclipse问题视图中消失。这是一个新问题,但我会创建一个新帖子,因为它不属于这个问题的标题。非常感谢!

0 个答案:

没有答案