繁体   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