当我尝试编译项目中的任何类时,我得到以下错误:
Error scala: Output path .../eval/target/test-classes is shared between: Module 'eval' tests, Module 'eval' tests
Output path .../eval/target/classes is shared between: Module 'eval' production, Module 'eval' production
Please configure separate output paths to proceed with the compilation.
Run Code Online (Sandbox Code Playgroud)
我已经看过如何在IDEA中设置输出路径,我已经完成了.但由于错误声称它在同一模块之间共享,我无法解决它.
Obs.:使用Maven和IntelliJ IDEA.
拜托,有人可以帮忙吗?
运行类时,我有以下异常:
线程"main"中的异常java.lang.OutOfMemoryError:超出了GC开销限制
我试图从类包的maven pom.xml中增加jvmArg堆大小:
http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0
<parent>
(...)
</parent>
<artifactId>(...)</artifactId>
<name>(...)</name>
<properties>
<javaOpts.Xmx>4g</javaOpts.Xmx> <!-- default that can be adjusted on the command line with -DjavaOpts.Xmx=... -->
<(...).basedir>${project.basedir}/..</(...).basedir>
</properties>
<build>
<plugins>
<plugin>
<groupId>net.alchim31.maven</groupId>
<artifactId>scala-maven-plugin</artifactId>
<configuration>
<launchers>
<launcher>
<id>MyClassName</id>
<mainClass>(...)</mainClass>
<jvmArgs>
<jvmArg>-Xmx${javaOpts.Xmx}</jvmArg>
(...)
Run Code Online (Sandbox Code Playgroud)
我已经尝试了最后引用的行,其中包含许多值:
<jvmArg>-Xmx512m{javaOpts.Xmx}</jvmArg><jvmArg>-Xmx4096M{javaOpts.Xmx}</jvmArg><jvmArg>-Xmx10000000000M{javaOpts.Xmx}</jvmArg>但对于他们所有人我都有同样的错误.
有人可以帮帮我吗?观察:我正在从IntelliJ IDEA运行.