簡體   English   中英

在NetBeans中編譯Spark需要一些幫助

[英]Need some assistance with compiling Spark in Netbeans

我一直在下載在Netbeans中編譯Spark所需的所有.JAR文件。 但是我現在停留在某個時刻,不知道如何繼續。

這是我嘗試構建spark時的輸出:

C:\Users\pstonge\Desktop\Workspace\Spark Source 2.6.3\src\java\org\jivesoftware\SparkStartupListener.java:31: error: package com.install4j.api.launcher.StartupNotification does not exist
public class SparkStartupListener implements com.install4j.api.launcher.StartupNotification.Listener {
C:\Users\pstonge\Desktop\Workspace\Spark Source 2.6.3\src\java\org\jivesoftware\launcher\Installer.java:23: error: package com.install4j.api.actions does not exist
import com.install4j.api.actions.InstallAction;
C:\Users\pstonge\Desktop\Workspace\Spark Source 2.6.3\src\java\org\jivesoftware\launcher\Installer.java:24: error: package com.install4j.api.context does not exist
import com.install4j.api.context.Context;
C:\Users\pstonge\Desktop\Workspace\Spark Source 2.6.3\src\java\org\jivesoftware\launcher\Installer.java:25: error: package com.install4j.api.context does not exist
import com.install4j.api.context.InstallerContext;
C:\Users\pstonge\Desktop\Workspace\Spark Source 2.6.3\src\java\org\jivesoftware\launcher\Installer.java:26: error: package com.install4j.api.context does not exist
import com.install4j.api.context.UserCanceledException;
C:\Users\pstonge\Desktop\Workspace\Spark Source 2.6.3\src\java\org\jivesoftware\launcher\Installer.java:27: error: package com.install4j.api.windows does not exist
import com.install4j.api.windows.RegistryRoot;
C:\Users\pstonge\Desktop\Workspace\Spark Source 2.6.3\src\java\org\jivesoftware\launcher\Installer.java:28: error: package com.install4j.api.windows does not exist
import com.install4j.api.windows.WinRegistry;

我曾嘗試下載軟件包,但似乎找不到它們。 另外,當我嘗試在NetBeans中使用SVN時,我仍然收到以下錯誤:

==[IDE]== May 6, 2014 9:23:21 AM Updating "SpellcheckChatRoomDecorator.java" to HEAD
update C:/Users/pstonge/Desktop/Workspace/Spark Source 2.6.3/src/plugins/spelling/src/java/org/jivesoftware/spellchecker/SpellcheckChatRoomDecorator.java -r HEAD --force
svn: E175002: timed out waiting for server
svn: E175002: OPTIONS request failed on '/svn/repos/spark/trunk/src/plugins/spelling/src/java/org/jivesoftware/spellchecker'
svn: E175002: timed out waiting for server
svn: E175002: OPTIONS request failed on '/svn/repos/spark/trunk/src/plugins/spelling/src/java/org/jivesoftware/spellchecker'
Connect timed out
==[IDE]== May 6, 2014 9:24:30 AM Updating "SpellcheckChatRoomDecorator.java" to HEAD finished.

如果有人可以給我一些有關如何繼續進行構建的線索,那將是很棒的。

非常感謝你。 保羅

我使用Maven在Netbeans上構建Spark。 如下:

  • netbeans網站安裝大於7.4的NetBeans(8很棒)
  • Netbeans插件網站安裝適用於Netbeans的 Scala插件。
  • 請按照以下說明在netbeans中安裝它。
  • 創建一個Maven項目:New Project-> Maven-> Project from Archetype->選擇“ scala-archetype-simple”->“ Next”->“ Finish”。
  • 打開POM文件,並將內容替換為以下內容:

<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
  <groupId>group.programming</groupId>
  <artifactId>myproject</artifactId>
  <version>1.0-SNAPSHOT</version>
  <name>myproject</name>
  <description>My wonderfull scala app</description>
  <inceptionYear>2014</inceptionYear>
  <licenses>
    <license>
      <name>My License</name>
      <distribution>repo</distribution>
    </license>
  </licenses>

<properties>
    <maven.compiler.source>3.1</maven.compiler.source>
    <maven.compiler.target>3.1</maven.compiler.target>
    <encoding>UTF-8</encoding>
    <!--<scala.version>2.10.3</scala.version>-->
    <scalaCompatVersion>2.10</scalaCompatVersion>
    <maven.scala.checkConsistency>false</maven.scala.checkConsistency>
  </properties>


  <dependencies>
<!--    <dependency>
      <groupId>org.scala-lang</groupId>
      <artifactId>scala-library</artifactId>
      <version>${scala.version}</version>
    </dependency>-->

<dependency>
    <groupId>org.apache.spark</groupId>
    <artifactId>spark-core_2.10</artifactId>
    <version>1.0.1</version>
</dependency>

    <!-- Test -->
<!--    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.11</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.scala-tools.testing</groupId>
      <artifactId>specs</artifactId>
      <version>1.6.2.2_1.5.0</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.scalatest</groupId>
      <artifactId>scalatest_2.10</artifactId>
      <version>2.2.0</version>
      <scope>test</scope>
    </dependency>-->
  </dependencies>

  <build>
    <sourceDirectory>src/main/scala</sourceDirectory>
    <testSourceDirectory>src/test/scala</testSourceDirectory>
    <plugins>
      <plugin>
        <groupId>net.alchim31.maven</groupId>
        <artifactId>scala-maven-plugin</artifactId>
        <version>3.1.6</version>
        <executions>
          <execution>
            <goals>
              <goal>compile</goal>
              <!--<goal>testCompile</goal>-->
            </goals>
            <configuration>
              <args>
<!--                <arg>-make:transitive</arg>-->
                <arg>-dependencyfile</arg>
                <arg>${project.build.directory}/.scala_dependencies</arg>
              </args>
            </configuration>
          </execution>
        </executions>
<configuration>
  <launchers>
    <launcher>
      <id>sample</id>
      <!-- This is to set the main to App.scala-->
      <mainClass>myproject.App</mainClass>
      <args>
        <arg>${basedir}</arg>
      </args>
    </launcher>
  </launchers>
</configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.6</version>
        <configuration>
          <useFile>false</useFile>
          <disableXmlReport>true</disableXmlReport>
          <!-- If you have classpath issue like NoDefClassError,... -->
          <!-- useManifestOnlyJar>false</useManifestOnlyJar -->
          <includes>
<!--            <include>**/*Test.*</include> -->
            <include>**/*Suite.*</include>
          </includes>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM