Scala-maven-plugin
Maven プロジェクトに関連するバグを見つけました。非常に長い一連の機能 (機械学習用) を手作業でコーディングしました (74 要素)。
シーケンスに要素を 1 つ追加しましたが、コンパイルできなくなりました。このシーケンスの任意の要素をコメントすると、要素の数が減り、コンパイルされます。
詳細については、コンパイルの最終出力を次に示します。
[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
パーサー (コンパイラー内) には、シーケンスの解析に何らかのハード制限がありますか?- それを解決してプロジェクトをコンパイルするにはどうすればよいですか?
- IntelliJ コンパイル (「再生」ボタン) では機能するのに、Maven コンパイルでは機能しないのはなぜですか?
編集:
フラグメントを含む pom.xml フラグメントを追加していScala-maven-plugin
ます。
<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>