首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用sorm依赖项生成maven项目时出错

使用sorm依赖项生成maven项目时出错
EN

Stack Overflow用户
提问于 2015-07-22 21:01:21
回答 1查看 631关注 0票数 0

在尝试SORM时,我一直得到这个错误。

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

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

代码语言:javascript
复制
<?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) ),但结果相同。

谢谢

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2015-07-24 12:03:07

我尝试了相同的pom.xml (也是一个使用sbt的版本),它只是起作用了。

另外,sorm 0.3.8是一个非常老的版本。

你真的需要那个吗?

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/31573902

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档