2016-04-08 21 views
6

Scala projemde SuperSafe Community Edition daha özel olarak ScalaTest kullanmak istiyorum. Kurulum talimatlarını takip ettim ve sbt 0.13 ve scala 2.11.8 kullanıyorum. Ben scala 2.11.8 etmekten başka şans ile ilgili diğer eserler kullanmaya çalıştıkScala SuperSafe Topluluğu Eklenti öğesi, sbt 0.13, scala 2.11.8 çözülmez

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

:

aşağıdaki hatayı alıyorum.

SuperSafe Community Edition'ı sbt 0.3 ve scala 2.11.8 ile kullanabilir miyim?

+1

ScalaVersion'ımı 2.11.8'den 2.11.7'ye değiştirdim. http://repo.artima.com/releases/com/artima/supersafe/supersafe_2.11.8/, 1.1.0-RC6'ya sahip değil. Ama 2.11.7 klasöründe. – robor78

cevap

0

İç nedenlerden dolayı Maven POM tabanlı bir projeye geçtim. İşte kullanılan bağımlılıkları şunlardır:

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

Ayrıca, sizin bağımlılığından scoverage-plugin ve scoverage-runtime eserler çıkarmak gerekir. Gerektiğinde kapsama eklentisi bunları ekleyecektir.

+0

Bahşiş için teşekkürler! – ozOli

2

Ben aynı scalatest ile başlarken aynı sorunla karşı karşıya. Benim için hatayı çözerken 1.0.6-M2 sürümünü kullandım. Plugins.sbt dosyasındaki aşağıdaki 2 satır hile