0

在尝试 SORM 时,我不断收到此错误

错误] 加载类文件“Logging.class”时检测到缺少或无效的依赖项。无法访问包 scala 中的 ScalaObject 类型,因为它(或其依赖项)丢失。检查您的构建定义是否存在缺失或冲突的依赖项。如果“Logging.class”是针对不兼容的 scala 版本编译的,则完全重建可能会有所帮助。

这是我的 pom 文件(由 sorm 本身使用的文件派生)

<?xml version="1.0" encoding="UTF-8"?> 
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>sorm-test</groupId>
<artifactId>sorm</artifactId>
<version>1.0-SNAPSHOT</version>
<dependencies>
    <dependency>
        <groupId>org.scala-lang</groupId>
        <artifactId>scala-reflect</artifactId>
        <version>[2.10,2.12)</version>
    </dependency>
    <dependency>
        <groupId>org.scala-lang</groupId>
        <artifactId>scala-library</artifactId>
        <version>[2.10,2.12)</version>
    </dependency>

    <dependency>
        <groupId>org.sorm-framework</groupId>
        <artifactId>sorm</artifactId>
        <version>0.3.8</version>
    </dependency>
    <dependency>
        <groupId>com.h2database</groupId>
        <artifactId>h2</artifactId>
        <version>1.3.168</version>
    </dependency>

</dependencies>

<build>
    <sourceDirectory>src/main/scala</sourceDirectory>
<plugins>
<plugin>
    <groupId>net.alchim31.maven</groupId>
    <artifactId>scala-maven-plugin</artifactId>
    <version>3.2.0</version>
    <configuration>
        <recompileMode>incremental</recompileMode>
        <useZincServer>true</useZincServer>
    </configuration>
    <executions>
        <execution>
            <id>compile</id>
            <goals>
                <goal>compile</goal>
                <goal>testCompile</goal>
            </goals>
        </execution>
    </executions>
</plugin>
</plugins>
</build>

我尝试了多个 scala 库版本(而不是间隔 [2.10,2.12) )但结果相同。

谢谢

4

1 回答 1

1

我尝试了您的相同pom.xml(以及使用的版本sbt)并且它可以正常工作。

Plussorm 0.3.8是一个非常旧的版本。

你真的需要那个吗?

于 2015-07-24T12:03:07.307 回答