有关此错误的帮助:sbt 执行期间出错:java.lang.NoClassDefFoundError:scala/ScalaObject

发布于 2024-11-14 06:51:35 字数 5034 浏览 1 评论 0原文

您好,我尝试从 http://liftweb.net/download 下载 lift 2.4 。我完全按照以下步骤操作但我有以下错误

C:>cd lift

C:\lift>cd scala_28

C:\lift\scala_28>cd lift_basic

C:\lift\scala_28\lift_basic>sbt update ~jetty-run

C:\lift\scala_28\lift_basic>set SCRIPT_DIR=C:\lift\scala_28\lift_basic\

C:\lift\scala_28\lift_basic>java -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=2 56m -Xmx512M -Xss2M -jar“C:\lift\scala_28\lift_basic\sbt-launcher.jar”更新 〜码头运行 java.lang.NoClassDefFoundError:scala/ScalaObject 在 java.lang.ClassLoader.defineClass1(本机方法) 在 java.lang.ClassLoader.defineClassCond(ClassLoader.java:632) 在 java.lang.ClassLoader.defineClass(ClassLoader.java:616) 在 java.security.SecureClassLoader.defineClass(SecureClassLoader.java:14 1) 在 java.net.URLClassLoader.defineClass(URLClassLoader.java:283) 在 java.net.URLClassLoader.access$000(URLClassLoader.java:58) 在 java.net.URLClassLoader$1.run(URLClassLoader.java:197) 在 java.security.AccessController.doPrivileged(本机方法) 在 java.net.URLClassLoader.findClass(URLClassLoader.java:190) 在 java.lang.ClassLoader.loadClass(ClassLoader.java:307) 在 java.lang.ClassLoader.loadClass(ClassLoader.java:248) 在 java.lang.ClassLoader.defineClass1(本机方法) 在 java.lang.ClassLoader.defineClassCond(ClassLoader.java:632) 在 java.lang.ClassLoader.defineClass(ClassLoader.java:616) 在 java.security.SecureClassLoader.defineClass(SecureClassLoader.java:14 1) 在 java.net.URLClassLoader.defineClass(URLClassLoader.java:283) 在 java.net.URLClassLoader.access$000(URLClassLoader.java:58) 在 java.net.URLClassLoader$1.run(URLClassLoader.java:197) 在 java.security.AccessController.doPrivileged(本机方法) 在 java.net.URLClassLoader.findClass(URLClassLoader.java:190) 在 java.lang.ClassLoader.loadClass(ClassLoader.java:307) 在 java.lang.ClassLoader.loadClass(ClassLoader.java:248) 在 java.lang.Class.forName0(本机方法) 在 java.lang.Class.forName(Class.java:247) 在 xsbt.boot.Provider$.classMissing$1(Provider.scala:71) 在 xsbt.boot.Provider$$anonfun$getMissing$1.apply(Provider.scala:72) 在 xsbt.boot.Provider$$anonfun$getMissing$1.apply(Provider.scala:72) 在 scala.List.filter(List.scala:859) 在 xsbt.boot.Provider$.getMissing(Provider.scala:72) 在 xsbt.boot.Provider$initialize.call(Provider.scala:37) 在 xsbt.boot.Provider$initialize.call(Provider.scala:32) 在 xsbt.boot.Locks$GlobalLock.withChannel$1(Locks.scala:63) 在 xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala: 67) 在 xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala: 67) 在 xsbt.boot.Using$.withResource(Using.scala:11) 在 xsbt.boot.Using$.apply(Using.scala:10) 在 xsbt.boot.Locks$GlobalLock.withFileLock(Locks.scala:67) 在 xsbt.boot.Locks$GlobalLock.liftedTree1$1(Locks.scala:45) 在 xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:45) 在 xsbt.boot.Locks$.apply(Locks.scala:31) 在 xsbt.boot.Provider$class.$init$(Provider.scala:31) 在 xsbt.boot.Launch$ScalaProvider 处。(Launch.scala:80) 在 xsbt.boot.Launch$$anonfun$1.apply(Launch.scala:72) 在 xsbt.boot.Launch$$anonfun$1.apply(Launch.scala:72) 在 xsbt.boot.Cache.newEntry(Cache.scala:17) 在 xsbt.boot.Cache.getFromReference(Cache.scala:13) 在 xsbt.boot.Cache.apply(Cache.scala:12) 在 xsbt.boot.Launch.getScala(Launch.scala:73) 在 xsbt.boot.Launch$.run(Launch.scala:48) 在 xsbt.boot.Launch$$anonfun$explicit$1.apply(Launch.scala:42) 在 xsbt.boot.Launch$$anonfun$explicit$1.apply(Launch.scala:42) 在 xsbt.boot.Launch$.launch(Launch.scala:57) 在 xsbt.boot.Launch$.explicit(Launch.scala:42) 在 xsbt.boot.Launch$.initialized(Launch.scala:38) 在 xsbt.boot.Launch$.parsed(Launch.scala:31) 在 xsbt.boot.Launch$.configured(Launch.scala:21) 在 xsbt.boot.Launch$.apply(Launch.scala:16) 在 xsbt.boot.Launch$.apply(Launch.scala:13) 在 xsbt.boot.Boot$.runImpl(Boot.scala:24) 在 xsbt.boot.Boot$.run(Boot.scala:19) 在 xsbt.boot.Boot$.main(Boot.scala:15) 在 xsbt.boot.Boot.main(Boot.scala) 引起原因:java.lang.ClassNotFoundException:scala.ScalaObject 在 java.net.URLClassLoader$1.run(URLClassLoader.java:202) 在 java.security.AccessController.doPrivileged(本机方法) 在 java.net.URLClassLoader.findClass(URLClassLoader.java:190) 在 java.lang.ClassLoader.loadClass(ClassLoader.java:307) 在 java.lang.ClassLoader.loadClass(ClassLoader.java:248)

    ... 62 more

sbt 执行期间出错:java.lang.NoClassDefFoundError: scala/ScalaObject

你知道最后一行出了什么问题吗?也许我的 PATH 中有什么问题?

我的路径是 C:\Java\scala;%JAVA_HOME%\bin

JAVA_HOME C:\Java\jdk1.6.0_22

在“scala”中我有 scala 2.8.0 Final。

Hi I tried to download lift 2.4 from http://liftweb.net/download .I'm following exactly the steps but I have the following error

C:>cd lift

C:\lift>cd scala_28

C:\lift\scala_28>cd lift_basic

C:\lift\scala_28\lift_basic>sbt update ~jetty-run

C:\lift\scala_28\lift_basic>set SCRIPT_DIR=C:\lift\scala_28\lift_basic\

C:\lift\scala_28\lift_basic>java -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=2
56m -Xmx512M -Xss2M -jar "C:\lift\scala_28\lift_basic\sbt-launcher.jar" update
~jetty-run
java.lang.NoClassDefFoundError: scala/ScalaObject
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:14
1)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:14
1)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at xsbt.boot.Provider$.classMissing$1(Provider.scala:71)
at xsbt.boot.Provider$$anonfun$getMissing$1.apply(Provider.scala:72)
at xsbt.boot.Provider$$anonfun$getMissing$1.apply(Provider.scala:72)
at scala.List.filter(List.scala:859)
at xsbt.boot.Provider$.getMissing(Provider.scala:72)
at xsbt.boot.Provider$initialize.call(Provider.scala:37)
at xsbt.boot.Provider$initialize.call(Provider.scala:32)
at xsbt.boot.Locks$GlobalLock.withChannel$1(Locks.scala:63)
at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:
67)
at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:
67)
at xsbt.boot.Using$.withResource(Using.scala:11)
at xsbt.boot.Using$.apply(Using.scala:10)
at xsbt.boot.Locks$GlobalLock.withFileLock(Locks.scala:67)
at xsbt.boot.Locks$GlobalLock.liftedTree1$1(Locks.scala:45)
at xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:45)
at xsbt.boot.Locks$.apply(Locks.scala:31)
at xsbt.boot.Provider$class.$init$(Provider.scala:31)
at xsbt.boot.Launch$ScalaProvider.(Launch.scala:80)
at xsbt.boot.Launch$$anonfun$1.apply(Launch.scala:72)
at xsbt.boot.Launch$$anonfun$1.apply(Launch.scala:72)
at xsbt.boot.Cache.newEntry(Cache.scala:17)
at xsbt.boot.Cache.getFromReference(Cache.scala:13)
at xsbt.boot.Cache.apply(Cache.scala:12)
at xsbt.boot.Launch.getScala(Launch.scala:73)
at xsbt.boot.Launch$.run(Launch.scala:48)
at xsbt.boot.Launch$$anonfun$explicit$1.apply(Launch.scala:42)
at xsbt.boot.Launch$$anonfun$explicit$1.apply(Launch.scala:42)
at xsbt.boot.Launch$.launch(Launch.scala:57)
at xsbt.boot.Launch$.explicit(Launch.scala:42)
at xsbt.boot.Launch$.initialized(Launch.scala:38)
at xsbt.boot.Launch$.parsed(Launch.scala:31)
at xsbt.boot.Launch$.configured(Launch.scala:21)
at xsbt.boot.Launch$.apply(Launch.scala:16)
at xsbt.boot.Launch$.apply(Launch.scala:13)
at xsbt.boot.Boot$.runImpl(Boot.scala:24)
at xsbt.boot.Boot$.run(Boot.scala:19)
at xsbt.boot.Boot$.main(Boot.scala:15)
at xsbt.boot.Boot.main(Boot.scala)
Caused by: java.lang.ClassNotFoundException: scala.ScalaObject
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)

    ... 62 more

Error during sbt execution: java.lang.NoClassDefFoundError: scala/ScalaObject

Do you know what's going wrong with the last line?Maybe something in my PATH?

My path is C:\Java\scala;%JAVA_HOME%\bin

JAVA_HOME C:\Java\jdk1.6.0_22

Where in 'scala' I have scala 2.8.0 final.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

九厘米的零° 2024-11-21 06:51:35

尝试使用 Scala 2.9.0-1 提升 2.4-M1。

项目目录中的文件 .../project/build.properties 可能包含下一个配置

project.organization=Home
project.name=scala-lift
sbt.version=0.7.7
project.version=1.0
build.scala.versions=2.9.0-1
project.initialize=false

运行

sbt update

我已经工作了 Scala 2.9.0-1、SBT 0.7.7、Lift 2.4-M1(Maven 对依赖项有很大帮助)

我的 maven文件 pom.xml (可能很冗长,但对我有用):

<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>by.degree</groupId>
<artifactId>scala-sbt-lift</artifactId>
<version>1.0</version>
<packaging>war</packaging>
<name>Scala-Sbt-Lift</name>
<inceptionYear>2010</inceptionYear>
<properties>
    <scala.version>2.9.0-1</scala.version>
    <jetty.version>6.1.26</jetty.version>
    <net.liftweb.version>2.4-M1</net.liftweb.version>
    <scala.specs.version>1.6.8</scala.specs.version>
    <!-- Common plugin settings -->
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>${project.build.sourceEncoding}</project.reporting.outputEncoding>
    <!-- vscaladoc settings -->
    <maven.scaladoc.vscaladocVersion>1.2-m1</maven.scaladoc.vscaladocVersion>
    <vscaladoc.links.liftweb.pathsufix>scaladocs/</vscaladoc.links.liftweb.pathsufix>
    <vscaladoc.links.liftweb.baseurl>http://scala-tools.org/mvnsites/liftweb</vscaladoc.links.liftweb.baseurl>
</properties>

<repositories>
    <repository>
        <id>scala-tools.org</id>
        <name>Scala-Tools Maven2 Repository</name>
        <url>http://scala-tools.org/repo-releases</url>
    </repository>
    <repository>
        <id>scala-tools.releases</id>
        <name>Scala-Tools Dependencies Repository for Releases</name>
        <url>http://scala-tools.org/repo-releases</url>
    </repository>
</repositories>

<pluginRepositories>
    <pluginRepository>
        <id>scala-tools.org</id>
        <name>Scala-Tools Maven2 Repository</name>
        <url>http://scala-tools.org/repo-releases</url>
    </pluginRepository>
    <pluginRepository>
        <id>scala-tools.releases</id>
        <name>Scala-Tools Plugins Repository for Releases</name>
        <url>http://scala-tools.org/repo-releases</url>
    </pluginRepository>
</pluginRepositories>

<dependencies>
    <dependency>
        <groupId>org.scala-lang</groupId>
        <artifactId>scala-library</artifactId>
        <version>${scala.version}</version>
    </dependency>
    <dependency>
        <groupId>net.liftweb</groupId>
        <artifactId>lift-mapper_${scala.version}</artifactId>
        <version>${net.liftweb.version}</version>
    </dependency>
    <dependency>
        <groupId>ch.qos.logback</groupId>
        <artifactId>logback-classic</artifactId>
        <version>0.9.26</version>
    </dependency>
    <dependency>
        <groupId>com.h2database</groupId>
        <artifactId>h2</artifactId>
        <version>1.2.138</version>
        <scope>runtime</scope>
    </dependency>
    <dependency>
        <groupId>javax.servlet</groupId>
        <artifactId>servlet-api</artifactId>
        <version>2.5</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.7</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.scala-tools.testing</groupId>
        <artifactId>specs_${scala.version}</artifactId>
        <version>${scala.specs.version}</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.mortbay.jetty</groupId>
        <artifactId>jetty</artifactId>
        <version>${jetty.version}</version>
        <scope>test</scope>
    </dependency>
    <!-- for LiftConsole -->
    <dependency>
        <groupId>org.scala-lang</groupId>
        <artifactId>scala-compiler</artifactId>
        <version>${scala.version}</version>
        <scope>test</scope>
    </dependency>
</dependencies>

<build>
    <sourceDirectory>src/main/scala</sourceDirectory>
    <testSourceDirectory>src/test/scala</testSourceDirectory>
    <plugins>
        <plugin>
            <groupId>org.scala-tools</groupId>
            <artifactId>maven-scala-plugin</artifactId>
            <version>2.14.3</version>
            <configuration>
                <charset>${project.build.sourceEncoding}</charset>
                <jvmArgs>
                    <jvmArg>-Xmx1024m</jvmArg>
                    <jvmArg>-DpackageLinkDefs=file://${project.build.directory}/packageLinkDefs.properties</jvmArg>
                </jvmArgs>
            </configuration>
            <executions>
                <execution>
                    <goals>
                        <goal>compile</goal>
                        <goal>testCompile</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-resources-plugin</artifactId>
            <version>2.4.2</version>
            <executions>
                <execution>
                    <id>default-copy-resources</id>
                    <phase>process-resources</phase>
                    <goals>
                        <goal>copy-resources</goal>
                    </goals>
                    <configuration>
                        <overwrite>true</overwrite>
                        <outputDirectory>${project.build.directory}</outputDirectory>
                        <resources>
                            <resource>
                                <directory>${project.basedir}/src</directory>
                                <includes>
                                    <include>packageLinkDefs.properties</include>
                                </includes>
                                <filtering>true</filtering>
                            </resource>
                        </resources>
                    </configuration>
                </execution>
            </executions>
        </plugin>
        <plugin>
            <groupId>org.mortbay.jetty</groupId>
            <artifactId>maven-jetty-plugin</artifactId>
            <version>${jetty.version}</version>
            <configuration>
                <contextPath>/</contextPath>
                <scanIntervalSeconds>5</scanIntervalSeconds>
            </configuration>
        </plugin>
        <plugin>
            <groupId>net.sf.alchim</groupId>
            <artifactId>yuicompressor-maven-plugin</artifactId>
            <version>0.7.1</version>
            <executions>
                <execution>
                    <goals>
                        <goal>compress</goal>
                    </goals>
                </execution>
            </executions>
            <configuration>
                <nosuffix>true</nosuffix>
            </configuration>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-idea-plugin</artifactId>
            <version>2.2</version>
            <configuration>
                <downloadSources>true</downloadSources>
            </configuration>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-eclipse-plugin</artifactId>
            <version>2.7</version>
            <configuration>
                <downloadSources>true</downloadSources>
                <additionalProjectnatures>
                    <projectnature>ch.epfl.lamp.sdt.core.scalanature</projectnature>
                </additionalProjectnatures>
                <additionalBuildcommands>
                    <buildcommand>ch.epfl.lamp.sdt.core.scalabuilder</buildcommand>
                </additionalBuildcommands>
                <classpathContainers>
                    <classpathContainer>ch.epfl.lamp.sdt.launching.SCALA_CONTAINER</classpathContainer>
                    <classpathContainer>org.eclipse.jdt.launching.JRE_CONTAINER</classpathContainer>
                </classpathContainers>
            </configuration>
        </plugin>
    </plugins>
</build>
<reporting>
    <plugins>
        <plugin>
            <groupId>org.scala-tools</groupId>
            <artifactId>maven-scala-plugin</artifactId>
            <version>2.14.3</version>
            <configuration>
                <charset>${project.build.sourceEncoding}</charset>
                <jvmArgs>
                    <jvmArg>-Xmx1024m</jvmArg>
                    <jvmArg>-DpackageLinkDefs=file://${project.build.directory}/packageLinkDefs.properties</jvmArg>
                </jvmArgs>
            </configuration>
        </plugin>
    </plugins>
</reporting>

Try lift 2.4-M1 with Scala 2.9.0-1.

File in your project directory .../project/build.properties may contain next configuration

project.organization=Home
project.name=scala-lift
sbt.version=0.7.7
project.version=1.0
build.scala.versions=2.9.0-1
project.initialize=false

Run

sbt update

I've got working Scala 2.9.0-1, SBT 0.7.7, Lift 2.4-M1 (Maven helps a lot with dependencies)

My maven file pom.xml (maybe verbose but it works for me):

<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>by.degree</groupId>
<artifactId>scala-sbt-lift</artifactId>
<version>1.0</version>
<packaging>war</packaging>
<name>Scala-Sbt-Lift</name>
<inceptionYear>2010</inceptionYear>
<properties>
    <scala.version>2.9.0-1</scala.version>
    <jetty.version>6.1.26</jetty.version>
    <net.liftweb.version>2.4-M1</net.liftweb.version>
    <scala.specs.version>1.6.8</scala.specs.version>
    <!-- Common plugin settings -->
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>${project.build.sourceEncoding}</project.reporting.outputEncoding>
    <!-- vscaladoc settings -->
    <maven.scaladoc.vscaladocVersion>1.2-m1</maven.scaladoc.vscaladocVersion>
    <vscaladoc.links.liftweb.pathsufix>scaladocs/</vscaladoc.links.liftweb.pathsufix>
    <vscaladoc.links.liftweb.baseurl>http://scala-tools.org/mvnsites/liftweb</vscaladoc.links.liftweb.baseurl>
</properties>

<repositories>
    <repository>
        <id>scala-tools.org</id>
        <name>Scala-Tools Maven2 Repository</name>
        <url>http://scala-tools.org/repo-releases</url>
    </repository>
    <repository>
        <id>scala-tools.releases</id>
        <name>Scala-Tools Dependencies Repository for Releases</name>
        <url>http://scala-tools.org/repo-releases</url>
    </repository>
</repositories>

<pluginRepositories>
    <pluginRepository>
        <id>scala-tools.org</id>
        <name>Scala-Tools Maven2 Repository</name>
        <url>http://scala-tools.org/repo-releases</url>
    </pluginRepository>
    <pluginRepository>
        <id>scala-tools.releases</id>
        <name>Scala-Tools Plugins Repository for Releases</name>
        <url>http://scala-tools.org/repo-releases</url>
    </pluginRepository>
</pluginRepositories>

<dependencies>
    <dependency>
        <groupId>org.scala-lang</groupId>
        <artifactId>scala-library</artifactId>
        <version>${scala.version}</version>
    </dependency>
    <dependency>
        <groupId>net.liftweb</groupId>
        <artifactId>lift-mapper_${scala.version}</artifactId>
        <version>${net.liftweb.version}</version>
    </dependency>
    <dependency>
        <groupId>ch.qos.logback</groupId>
        <artifactId>logback-classic</artifactId>
        <version>0.9.26</version>
    </dependency>
    <dependency>
        <groupId>com.h2database</groupId>
        <artifactId>h2</artifactId>
        <version>1.2.138</version>
        <scope>runtime</scope>
    </dependency>
    <dependency>
        <groupId>javax.servlet</groupId>
        <artifactId>servlet-api</artifactId>
        <version>2.5</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.7</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.scala-tools.testing</groupId>
        <artifactId>specs_${scala.version}</artifactId>
        <version>${scala.specs.version}</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.mortbay.jetty</groupId>
        <artifactId>jetty</artifactId>
        <version>${jetty.version}</version>
        <scope>test</scope>
    </dependency>
    <!-- for LiftConsole -->
    <dependency>
        <groupId>org.scala-lang</groupId>
        <artifactId>scala-compiler</artifactId>
        <version>${scala.version}</version>
        <scope>test</scope>
    </dependency>
</dependencies>

<build>
    <sourceDirectory>src/main/scala</sourceDirectory>
    <testSourceDirectory>src/test/scala</testSourceDirectory>
    <plugins>
        <plugin>
            <groupId>org.scala-tools</groupId>
            <artifactId>maven-scala-plugin</artifactId>
            <version>2.14.3</version>
            <configuration>
                <charset>${project.build.sourceEncoding}</charset>
                <jvmArgs>
                    <jvmArg>-Xmx1024m</jvmArg>
                    <jvmArg>-DpackageLinkDefs=file://${project.build.directory}/packageLinkDefs.properties</jvmArg>
                </jvmArgs>
            </configuration>
            <executions>
                <execution>
                    <goals>
                        <goal>compile</goal>
                        <goal>testCompile</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-resources-plugin</artifactId>
            <version>2.4.2</version>
            <executions>
                <execution>
                    <id>default-copy-resources</id>
                    <phase>process-resources</phase>
                    <goals>
                        <goal>copy-resources</goal>
                    </goals>
                    <configuration>
                        <overwrite>true</overwrite>
                        <outputDirectory>${project.build.directory}</outputDirectory>
                        <resources>
                            <resource>
                                <directory>${project.basedir}/src</directory>
                                <includes>
                                    <include>packageLinkDefs.properties</include>
                                </includes>
                                <filtering>true</filtering>
                            </resource>
                        </resources>
                    </configuration>
                </execution>
            </executions>
        </plugin>
        <plugin>
            <groupId>org.mortbay.jetty</groupId>
            <artifactId>maven-jetty-plugin</artifactId>
            <version>${jetty.version}</version>
            <configuration>
                <contextPath>/</contextPath>
                <scanIntervalSeconds>5</scanIntervalSeconds>
            </configuration>
        </plugin>
        <plugin>
            <groupId>net.sf.alchim</groupId>
            <artifactId>yuicompressor-maven-plugin</artifactId>
            <version>0.7.1</version>
            <executions>
                <execution>
                    <goals>
                        <goal>compress</goal>
                    </goals>
                </execution>
            </executions>
            <configuration>
                <nosuffix>true</nosuffix>
            </configuration>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-idea-plugin</artifactId>
            <version>2.2</version>
            <configuration>
                <downloadSources>true</downloadSources>
            </configuration>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-eclipse-plugin</artifactId>
            <version>2.7</version>
            <configuration>
                <downloadSources>true</downloadSources>
                <additionalProjectnatures>
                    <projectnature>ch.epfl.lamp.sdt.core.scalanature</projectnature>
                </additionalProjectnatures>
                <additionalBuildcommands>
                    <buildcommand>ch.epfl.lamp.sdt.core.scalabuilder</buildcommand>
                </additionalBuildcommands>
                <classpathContainers>
                    <classpathContainer>ch.epfl.lamp.sdt.launching.SCALA_CONTAINER</classpathContainer>
                    <classpathContainer>org.eclipse.jdt.launching.JRE_CONTAINER</classpathContainer>
                </classpathContainers>
            </configuration>
        </plugin>
    </plugins>
</build>
<reporting>
    <plugins>
        <plugin>
            <groupId>org.scala-tools</groupId>
            <artifactId>maven-scala-plugin</artifactId>
            <version>2.14.3</version>
            <configuration>
                <charset>${project.build.sourceEncoding}</charset>
                <jvmArgs>
                    <jvmArg>-Xmx1024m</jvmArg>
                    <jvmArg>-DpackageLinkDefs=file://${project.build.directory}/packageLinkDefs.properties</jvmArg>
                </jvmArgs>
            </configuration>
        </plugin>
    </plugins>
</reporting>

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文