我在Maven项目中发现了与Scala-maven-plugin
相关的错误。我有一个很长的功能序列(用于机器学习目的)我手工编码(74个元素)。
我在序列中添加了一个元素,它不再编译。如果我评论此序列的任何元素,元素的数量会减少并编译。
有关更多信息,请参阅我的编译的最终输出:
[ERROR] Failed to execute goal net.alchim31.maven:scala-maven-plugin:3.3.1:compile (default) on project SecretProject: wrap: org.apache.commons.exec.ExecuteException: Process exited with an error: 240 (Exit value: 240) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
加上StackTrace的开头:
[INFO] Compiling 13 source files to /home/belka/Bureau/SecretProject/target/classes at 1513759339071
[ERROR] error: java.lang.StackOverflowError
[INFO] at scala.reflect.internal.TreeInfo.isSelfConstrCall(TreeInfo.scala:296)
[INFO] at scala.reflect.internal.TreeInfo.isSelfOrSuperConstrCall(TreeInfo.scala:344)
[INFO] at scala.reflect.internal.Trees$UnderConstructionTransformer$class.transform(Trees.scala:1701)
[INFO] at scala.tools.nsc.transform.ExplicitOuter$OuterPathTransformer.transform(ExplicitOuter.scala:291)
[INFO] at scala.tools.nsc.transform.ExplicitOuter$ExplicitOuterTransformer.transform(ExplicitOuter.scala:457)
[INFO] at scala.tools.nsc.transform.ExplicitOuter$ExplicitOuterTransformer.transform(ExplicitOuter.scala:352)
[INFO] at scala.reflect.internal.Trees$class.itransform(Trees.scala:1345)
(修改后的项目名称)
Scala-maven-plugin
类似的问题?Scala-maven-plugin
解析器(在编译器中)是否对序列解析有任何硬限制?编辑:
我正在添加包含我的Scala-maven-plugin
片段的pom.xml片段:
<plugin>
<!-- see http://davidb.github.com/scala-maven-plugin -->
<groupId>net.alchim31.maven</groupId>
<artifactId>scala-maven-plugin</artifactId>
<version>3.3.1</version>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>testCompile</goal>
</goals>
<configuration>
<args>
<arg>-dependencyfile</arg>
<arg>${project.build.directory}/.scala_dependencies</arg>
</args>
<jvmArgs>
<jvmArg>-Xms512m</jvmArg>
<jvmArg>-Xmx4096m</jvmArg>
</jvmArgs>
</configuration>
</execution>
</executions>
</plugin>
答案 0 :(得分:1)
按顺序回答问题:
答案 1 :(得分:1)
你可以:
或通过-Xss
增加用于运行scalac的jvm的最大堆栈大小
<jvmArgs>
<jvmArg>-Xss4m</jvmArg>
<jvmArg>-Xms512m</jvmArg>
<jvmArg>-Xmx4096m</jvmArg>
</jvmArgs>
我猜IDEA已经增加了默认的最大堆栈大小(64位VM中的iirc 1024k)。