简体   繁体   English

在Eclipse上为Apache Spark建立依赖关系

[英]building dependencies for Apache Spark on Eclipse

I would like to use eclipse for an Apache Spark project, but building dependencies appears not to work. 我想将eclipse用于Apache Spark项目,但是构建依赖项似乎无法正常工作。 I keep getting 我不断

"Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-plugin-plugin:3.2:descriptor (execution: default-descriptor, phase: generate-resources)" “生命周期配置未涵盖插件执行:org.apache.maven.plugins:maven-plugin-plugin:3.2:descriptor(执行:default-descriptor,阶段:generate-resources)”

Following the directions on the Apache spark site, https://spark.apache.org/docs/latest/programming-guide.html I am running CDH5 cluster. 按照Apache Spark网站上的指示进行操作, https ://spark.apache.org/docs/latest/programming-guide.html我正在运行CDH5集群。 using maven. 使用Maven。 Here is my generated pom.xml 这是我生成的pom.xml

<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">
 <modelVersion>4.0.0</modelVersion>

 <groupId>org.apache.spark</groupId>
<artifactId>spark-core_2.10</artifactId>
<version>1.1.0</version>
<packaging>jar</packaging>

  <name>spark-core_2.10</name>
   <url>http://maven.apache.org</url>

<properties>
  <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

  <dependency>
  <groupId>junit</groupId>
  <artifactId>junit</artifactId>
  <version>3.8.1</version>
  <scope>test</scope>
</dependency>
    <dependency>
    <groupId>org.apache.spark</groupId>
    <artifactId>spark-core_2.10</artifactId>
</dependency>

   <repositories>
 <repository>
     <id>Cloudera repository</id>
      <url>https://repository.cloudera.com/artifactory/cloudera-repos/</url>
   </repository>
   </repositories>



  <dependencyManagement>
 <dependencies>
    <dependency>
        <groupId>org.apache.spark</groupId>
        <artifactId>spark-core_2.10</artifactId>
        <version>1.1.0</version>
    </dependency>
</dependencies>

I am a new Maven/POM user. 我是Maven / POM的新用户。 How do i solve this issue and stop getting errors in my java code? 我该如何解决此问题并停止在我的Java代码中出现错误?

The error message seems to be related to m2e plugin. 错误消息似乎与m2e插件有关。 Take a look https://www.eclipse.org/m2e/documentation/m2e-execution-not-covered.html. 看看https://www.eclipse.org/m2e/documentation/m2e-execution-not-covered.html。 However the pom you expose is strange, the groupId and artifactId should be related to the path and name of your project, and not to the dependency that you try to use (in this case, spark-core_2.10). 但是,您公开的pom很奇怪,groupId和artifactId应该与项目的路径和名称相关,而不与您尝试使用的依赖项相关(在本例中为spark-core_2.10)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM