Я пытаюсь настроить Jenkins для моего Scala проекта. Я использую SBT для создания проекта. При сборке я получаю эту ошибку.
java.io.IOException: Cannot run program "javac" (in directory "/var/lib/jenkins/workspace/Production"): error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
at sbt.SimpleProcessBuilder.run(ProcessImpl.scala:349)
at sbt.AbstractProcessBuilder.run(ProcessImpl.scala:128)
at sbt.AbstractProcessBuilder$$anonfun$runBuffered$1.apply(ProcessImpl.scala:159)
at sbt.AbstractProcessBuilder$$anonfun$runBuffered$1.apply(ProcessImpl.scala:159)
at sbt.compiler.javac.JavacLogger.buffer(JavacProcessLogger.scala:31)
at sbt.AbstractProcessBuilder.runBuffered(ProcessImpl.scala:159)
at sbt.AbstractProcessBuilder.$bang(ProcessImpl.scala:156)
at sbt.compiler.javac.ForkedJava$$anonfun$launch$1.apply(ForkedJava.scala:24)
at sbt.compiler.javac.ForkedJava$$anonfun$launch$1.apply(ForkedJava.scala:17)
at sbt.compiler.javac.ForkedJava$$anonfun$withArgumentFile$1.apply(ForkedJava.scala:47)
at sbt.compiler.javac.ForkedJava$$anonfun$withArgumentFile$1.apply(ForkedJava.scala:44)
at sbt.IO$.withTemporaryDirectory(IO.scala:291)
at sbt.compiler.javac.ForkedJava$.withArgumentFile(ForkedJava.scala:44)
at sbt.compiler.javac.ForkedJava$.launch(ForkedJava.scala:17)
at sbt.compiler.javac.ForkedJavaCompiler.run(ForkedJava.scala:68)
at sbt.compiler.javac.JavaCompilerAdapter.compileWithReporter(JavaCompilerAdapter.scala:31)
at sbt.compiler.javac.AnalyzingJavaCompiler$$anonfun$compile$1.apply$mcV$sp(AnalyzingJavaCompiler.scala:65)
at sbt.compiler.javac.AnalyzingJavaCompiler$$anonfun$compile$1.apply(AnalyzingJavaCompiler.scala:65)
at sbt.compiler.javac.AnalyzingJavaCompiler$$anonfun$compile$1.apply(AnalyzingJavaCompiler.scala:65)
at sbt.compiler.javac.AnalyzingJavaCompiler.timed(AnalyzingJavaCompiler.scala:93)
at sbt.compiler.javac.AnalyzingJavaCompiler.compile(AnalyzingJavaCompiler.scala:64)
at sbt.compiler.MixedAnalyzingCompiler$$anonfun$compileJava$1$1.apply$mcV$sp(MixedAnalyzingCompiler.scala:61)
at sbt.compiler.MixedAnalyzingCompiler$$anonfun$compileJava$1$1.apply(MixedAnalyzingCompiler.scala:61)
at sbt.compiler.MixedAnalyzingCompiler$$anonfun$compileJava$1$1.apply(MixedAnalyzingCompiler.scala:61)
at sbt.compiler.MixedAnalyzingCompiler.timed(MixedAnalyzingCompiler.scala:75)
at sbt.compiler.MixedAnalyzingCompiler.compileJava$1(MixedAnalyzingCompiler.scala:60)
at sbt.compiler.MixedAnalyzingCompiler.compile(MixedAnalyzingCompiler.scala:65)
at sbt.compiler.IC$$anonfun$compileInternal$1.apply(IncrementalCompiler.scala:160)
at sbt.compiler.IC$$anonfun$compileInternal$1.apply(IncrementalCompiler.scala:160)
at sbt.inc.IncrementalCompile$$anonfun$doCompile$1.apply(Compile.scala:66)
at sbt.inc.IncrementalCompile$$anonfun$doCompile$1.apply(Compile.scala:64)
at sbt.inc.IncrementalCommon.cycle(IncrementalCommon.scala:31)
at sbt.inc.Incremental$$anonfun$1.apply(Incremental.scala:62)
at sbt.inc.Incremental$$anonfun$1.apply(Incremental.scala:61)
at sbt.inc.Incremental$.manageClassfiles(Incremental.scala:89)
at sbt.inc.Incremental$.compile(Incremental.scala:61)
at sbt.inc.IncrementalCompile$.apply(Compile.scala:54)
at sbt.compiler.IC$.compileInternal(IncrementalCompiler.scala:160)
at sbt.compiler.IC$.incrementalCompile(IncrementalCompiler.scala:138)
at sbt.Compiler$.compile(Compiler.scala:128)
at sbt.Compiler$.compile(Compiler.scala:114)
at sbt.Defaults$.sbt$Defaults$$compileIncrementalTaskImpl(Defaults.scala:814)
at sbt.Defaults$$anonfun$compileIncrementalTask$1.apply(Defaults.scala:805)
at sbt.Defaults$$anonfun$compileIncrementalTask$1.apply(Defaults.scala:803)
at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40)
at sbt.std.Transform$$anon$4.work(System.scala:63)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:226)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:226)
at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
at sbt.Execute.work(Execute.scala:235)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:226)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:226)
at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:159)
at sbt.CompletionService$$anon$2.call(CompletionService.scala:28)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:247)
at java.lang.ProcessImpl.start(ProcessImpl.java:134)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
at sbt.SimpleProcessBuilder.run(ProcessImpl.scala:349)
at sbt.AbstractProcessBuilder.run(ProcessImpl.scala:128)
at sbt.AbstractProcessBuilder$$anonfun$runBuffered$1.apply(ProcessImpl.scala:159)
at sbt.AbstractProcessBuilder$$anonfun$runBuffered$1.apply(ProcessImpl.scala:159)
at sbt.compiler.javac.JavacLogger.buffer(JavacProcessLogger.scala:31)
at sbt.AbstractProcessBuilder.runBuffered(ProcessImpl.scala:159)
at sbt.AbstractProcessBuilder.$bang(ProcessImpl.scala:156)
at sbt.compiler.javac.ForkedJava$$anonfun$launch$1.apply(ForkedJava.scala:24)
at sbt.compiler.javac.ForkedJava$$anonfun$launch$1.apply(ForkedJava.scala:17)
at sbt.compiler.javac.ForkedJava$$anonfun$withArgumentFile$1.apply(ForkedJava.scala:47)
at sbt.compiler.javac.ForkedJava$$anonfun$withArgumentFile$1.apply(ForkedJava.scala:44)
at sbt.IO$.withTemporaryDirectory(IO.scala:291)
at sbt.compiler.javac.ForkedJava$.withArgumentFile(ForkedJava.scala:44)
at sbt.compiler.javac.ForkedJava$.launch(ForkedJava.scala:17)
at sbt.compiler.javac.ForkedJavaCompiler.run(ForkedJava.scala:68)
at sbt.compiler.javac.JavaCompilerAdapter.compileWithReporter(JavaCompilerAdapter.scala:31)
at sbt.compiler.javac.AnalyzingJavaCompiler$$anonfun$compile$1.apply$mcV$sp(AnalyzingJavaCompiler.scala:65)
at sbt.compiler.javac.AnalyzingJavaCompiler$$anonfun$compile$1.apply(AnalyzingJavaCompiler.scala:65)
at sbt.compiler.javac.AnalyzingJavaCompiler$$anonfun$compile$1.apply(AnalyzingJavaCompiler.scala:65)
at sbt.compiler.javac.AnalyzingJavaCompiler.timed(AnalyzingJavaCompiler.scala:93)
at sbt.compiler.javac.AnalyzingJavaCompiler.compile(AnalyzingJavaCompiler.scala:64)
at sbt.compiler.MixedAnalyzingCompiler$$anonfun$compileJava$1$1.apply$mcV$sp(MixedAnalyzingCompiler.scala:61)
at sbt.compiler.MixedAnalyzingCompiler$$anonfun$compileJava$1$1.apply(MixedAnalyzingCompiler.scala:61)
at sbt.compiler.MixedAnalyzingCompiler$$anonfun$compileJava$1$1.apply(MixedAnalyzingCompiler.scala:61)
at sbt.compiler.MixedAnalyzingCompiler.timed(MixedAnalyzingCompiler.scala:75)
at sbt.compiler.MixedAnalyzingCompiler.compileJava$1(MixedAnalyzingCompiler.scala:60)
at sbt.compiler.MixedAnalyzingCompiler.compile(MixedAnalyzingCompiler.scala:65)
at sbt.compiler.IC$$anonfun$compileInternal$1.apply(IncrementalCompiler.scala:160)
at sbt.compiler.IC$$anonfun$compileInternal$1.apply(IncrementalCompiler.scala:160)
at sbt.inc.IncrementalCompile$$anonfun$doCompile$1.apply(Compile.scala:66)
at sbt.inc.IncrementalCompile$$anonfun$doCompile$1.apply(Compile.scala:64)
at sbt.inc.IncrementalCommon.cycle(IncrementalCommon.scala:31)
at sbt.inc.Incremental$$anonfun$1.apply(Incremental.scala:62)
at sbt.inc.Incremental$$anonfun$1.apply(Incremental.scala:61)
at sbt.inc.Incremental$.manageClassfiles(Incremental.scala:89)
at sbt.inc.Incremental$.compile(Incremental.scala:61)
at sbt.inc.IncrementalCompile$.apply(Compile.scala:54)
at sbt.compiler.IC$.compileInternal(IncrementalCompiler.scala:160)
at sbt.compiler.IC$.incrementalCompile(IncrementalCompiler.scala:138)
at sbt.Compiler$.compile(Compiler.scala:128)
at sbt.Compiler$.compile(Compiler.scala:114)
at sbt.Defaults$.sbt$Defaults$$compileIncrementalTaskImpl(Defaults.scala:814)
at sbt.Defaults$$anonfun$compileIncrementalTask$1.apply(Defaults.scala:805)
at sbt.Defaults$$anonfun$compileIncrementalTask$1.apply(Defaults.scala:803)
at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40)
at sbt.std.Transform$$anon$4.work(System.scala:63)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:226)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:226)
at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
at sbt.Execute.work(Execute.scala:235)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:226)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:226)
at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:159)
at sbt.CompletionService$$anon$2.call(CompletionService.scala:28)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
[error] (compile:compileIncremental) java.io.IOException: Cannot run program "javac" (in directory "/var/lib/jenkins/workspace/Production"): error=2, No such file or directory
Я уже установил JAVA_HOME и PATH в среде. Ниже приведен вывод -
echo $JAVA_HOME
/usr/lib/jvm/java-8-openjdk-amd64/jre
echo $PATH
/usr/lib/jvm/java-8-openjdk-amd64/jre/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
Я также установил путь JVM в разделе «Конфигурация глобального инструмента Jenkins».
Пожалуйста, помогите мне определить, что я могу делать неправильно. Дайте мне знать, если вам, ребята, нужна дополнительная информация об этом.
FYI - путь существует.