简体   繁体   中英

Need some assistance with compiling Spark in Netbeans

I have been downloading all the .JAR file i need to compile Spark in Netbeans. But I am stuck at a point now and do not know how to continue.

Here is my output when I try to build 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;

I have tried to download the packages but I can't seem to find them. Also when I try to use the SVN in NetBeans i keep getting the following error:

==[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.

If anyone can give me some clues on how to continue with the build that would be great.

Thank you very much. Paul

I used Maven to build Spark on Netbeans. As follows:

  • Install NetBeans greater than 7.4 (8 is great) from netbeans website
  • Install Scala plugin for Netbeans from Netbeans plugins website .
  • follow these directions to install it in netbeans.
  • create a Maven project: New Project -> Maven -> Project From Archetype -> choose "scala-archetype-simple" -> "Next" -> "Finish" .
  • Open the POM file and replace the content with the following:

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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