简体   繁体   English

Scala SuperSafe社区插件工件,sbt 0.13,scala 2.11.8无法解析

[英]Scala SuperSafe Community Plugin artifact, sbt 0.13, scala 2.11.8 not resolving

I want to use ScalaTest in my Scala project more specially the SuperSafe Community Edition . 我想在我的Scala项目中使用ScalaTest ,特别是SuperSafe Community Edition I followed the installation instructions and I am using sbt 0.13 and scala 2.11.8. 我按照安装说明操作,我使用的是sbt 0.13和scala 2.11.8。

I get the following error: 我收到以下错误:

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

I have tried to use the other artifacts related to the scala 2.11.8 but with no luck. 我试图使用与scala 2.11.8相关的其他工件,但没有运气。

Can I use the SuperSafe Community Edition with sbt 0.3 and scala 2.11.8? 我可以使用带有sbt 0.3和scala 2.11.8的SuperSafe社区版吗?

I was facing the same issue while I was getting started with scalatest. 当我开始使用scalatest时,我遇到了同样的问题。 I used version 1.0.6-M2 while resolved the error for me. 我使用版本1.0.6-M2为我解决了错误。 The below 2 lines in plugins.sbt did the trick plugins.sbt中的以下2行完成了这一操作

resolvers += "Artima Maven Repository" at " http://repo.artima.com/releases " 解析器+ =“Artima Maven存储库”在“ http://repo.artima.com/releases

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

Additionally, you should remove scoverage-plugin and scoverage-runtime artifacts from your dependencies. 此外,您应该从依赖项中删除scoverage-pluginscoverage-runtime工件。 Scoverage plugin will add them, when needed. Scoverage插件会在需要时添加它们。

I switched over to a Maven POM based project for internal reasons. 出于内部原因,我切换到基于Maven POM的项目。 Here are the dependencies I used: 以下是我使用的依赖项:

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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