2016-04-08 10 views
6

私はScalaプロジェクトのScalaTestをもっと具体的にはSuperSafe Community Editionに使います。私はインストール手順に従って、私はsbt 0.13とscala 2.11.8を使用しています。Scala SuperSafeコミュニティプラグインアーティファクト、sbt 0.13、scala 2.11.8解決しない

私は次のエラーを取得する:

[error] (*:update) sbt.ResolveException: unresolved dependency: com.artima.supersafe#sbtplugin;1.1.0-RC6: not found 

私はスカラ座2.11.8になく、運に関連する他の成果物を使用しようとしました。

sbt 0.3とscala 2.11.8でSuperSafe Community Editionを使用できますか?

+1

私はscalaVersionを2.11.8から2.11.7に変更しました。 http://repo.artima.com/releases/com/artima/supersafe/supersafe_2.11.8/には1.1.0-RC6がありません。しかし、それは2.11.7フォルダにあります。 – robor78

答えて

0

内部的な理由からMaven POMベースのプロジェクトに切り替えました。ここで私が使用し、依存関係は以下のとおりです。

<?xml version='1.0' encoding='UTF-8'?> 
    <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0   
       http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"> 
    <modelVersion>4.0.0</modelVersion> 
    <groupId>default</groupId> 
<artifactId>my-project</artifactId> 
<packaging>jar</packaging> 
<description>My Project</description> 
<version>1.0</version> 
<name>data-transformer</name> 

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

    <scala.binary.version>2.11</scala.binary.version> 
    <scala.version>2.11.8</scala.version> 
    <spark.version>1.6.1</spark.version> 

    <junit.version>4.12</junit.version> 

    <compiler.plugin.version>3.5</compiler.plugin.version> 
    <project-info-reports.plugin.version>2.9</project-info-reports.plugin.version> 
    <site.plugin.version>3.4</site.plugin.version> 
    <surefire.plugin.version>2.19.1</surefire.plugin.version> 

    <scala.plugin.version>3.2.2</scala.plugin.version> 
    <scoverage.plugin.version>1.1.0</scoverage.plugin.version> 
</properties> 

<build> 
    <sourceDirectory>${basedir}/src/main/scala</sourceDirectory> 
    <testSourceDirectory>${basedir}/src/test/scala</testSourceDirectory> 

    <plugins> 
     <plugin> 
      <groupId>org.apache.maven.plugins</groupId> 
      <artifactId>maven-compiler-plugin</artifactId> 
      <version>${compiler.plugin.version}</version> 
      <configuration> 
       <skipMain>true</skipMain> <!-- skip compile --> 
       <skip>true</skip> <!-- skip testCompile --> 
      </configuration> 
     </plugin> 

     <plugin> 
      <groupId>org.apache.maven.plugins</groupId> 
      <artifactId>maven-surefire-plugin</artifactId> 
      <version>${surefire.plugin.version}</version> 
     </plugin> 

     <plugin> 
      <groupId>net.alchim31.maven</groupId> 
      <artifactId>scala-maven-plugin</artifactId> 
      <version>${scala.plugin.version}</version> 
      <configuration> 
       <scalaCompatVersion>${scala.binary.version}</scalaCompatVersion> 
       <scalaVersion>${scala.version}</scalaVersion> 
      </configuration> 
      <executions> 
       <execution> 
        <id>default-sbt-compile</id> 
        <goals> 
         <goal>compile</goal> 
         <goal>testCompile</goal> 
        </goals> 
       </execution> 
      </executions> 
     </plugin> 

     <plugin> 
      <groupId>org.scoverage</groupId> 
      <artifactId>scoverage-maven-plugin</artifactId> 
      <version>${scoverage.plugin.version}</version> 
      <configuration> 
       <scalaVersion>2.11.8</scalaVersion> 
       <highlighting>true</highlighting> 
      </configuration> 
     </plugin> 
    </plugins> 

    <pluginManagement> 
     <plugins> 
      <plugin> 
       <groupId>org.apache.maven.plugins</groupId> 
       <artifactId>maven-site-plugin</artifactId> 
       <version>${site.plugin.version}</version> 
      </plugin> 
     </plugins> 
    </pluginManagement> 
</build> 

<dependencies> 
    <dependency> 
     <groupId>org.scala-lang</groupId> 
     <artifactId>scala-library</artifactId> 
     <version>2.11.8</version> 
    </dependency> 
    <dependency> 
     <groupId>org.apache.spark</groupId> 
     <artifactId>spark-core_2.11</artifactId> 
     <version>1.6.1</version> 
    </dependency> 
    <dependency> 
     <groupId>org.apache.spark</groupId> 
     <artifactId>spark-hive_2.11</artifactId> 
     <version>1.6.1</version> 
    </dependency> 
    <dependency> 
     <groupId>org.apache.spark</groupId> 
     <artifactId>spark-sql_2.11</artifactId> 
     <version>1.6.1</version> 
    </dependency> 
    <dependency> 
     <groupId>com.databricks</groupId> 
     <artifactId>spark-csv_2.11</artifactId> 
     <version>1.4.0</version> 
    </dependency> 
    <!-- Test Dependencies --> 
    <dependency> 
     <groupId>junit</groupId> 
     <artifactId>junit</artifactId> 
     <version>${junit.version}</version> 
     <scope>test</scope> 
    </dependency> 
    <dependency> 
     <groupId>org.scalacheck</groupId> 
     <artifactId>scalacheck_2.11</artifactId> 
     <version>1.12.0</version> 
     <scope>test</scope> 
    </dependency> 
    <dependency> 
     <groupId>org.scalatest</groupId> 
     <artifactId>scalatest_2.11</artifactId> 
     <version>2.2.6</version> 
     <scope>test</scope> 
    </dependency> 
    <dependency> 
     <groupId>com.holdenkarau</groupId> 
     <artifactId>spark-testing-base_2.11</artifactId> 
     <version>1.6.0_0.3.1</version> 
     <scope>test</scope> 
    </dependency> 
</dependencies> 

<repositories> 
    <repository> 
     <id>ArtimaMavenRepository</id> 
     <name>Artima Maven Repository</name> 
     <url>http://repo.artima.com/releases/</url> 
     <layout>default</layout> 
    </repository> 
</repositories> 

<reporting> 
    <plugins> 
     <plugin> 
      <groupId>org.apache.maven.plugins</groupId> 
      <artifactId>maven-project-info-reports-plugin</artifactId> 
      <reportSets> 
       <reportSet> 
        <reports> 
         <report>index</report> 
        </reports> 
       </reportSet> 
      </reportSets> 
     </plugin> 

     <plugin> 
      <groupId>org.scoverage</groupId> 
      <artifactId>scoverage-maven-plugin</artifactId> 
      <version>${scoverage.plugin.version}</version> 
      <reportSets> 
       <reportSet> 
        <reports> 
         <report>report</report> <!-- select only one report from: report, integration-report and report-only reporters --> 
        </reports> 
       </reportSet> 
      </reportSets> 
     </plugin> 
    </plugins> 
</reporting> 

1

また、あなたはあなたの依存関係からscoverage-pluginscoverage-runtimeアーティファクトを削除する必要があります。必要に応じてScoverageプラグインがそれらを追加します。

+0

チップのおかげで! – ozOli

2

私はスカートテストを始めているうちに同じ問題に直面していました。私はバージョン1.0.6-M2を使用している間に私のエラーを解決しました。 plugins.sbtの下の2行がトリックでした

resolvers += "Artima Maven Repository" at " http://repo.artima.com/releases "

addSbtPlugin("com.artima.supersafe" % "sbtplugin" % "1.0.6-M2")

関連する問題