在詹金斯编译SBT项目的问题

时间:2016-08-31 07:52:15

标签: java jenkins playframework sbt jenkins-plugins

我正在尝试为(Java Play)SBT项目实施CICD。我正在使用Play2 Framework。出于示例目的,我刚刚创建了一个play项目,并尝试使用SBT插件从Jenkins编译和构建。

我使用以下配置创建了一个Jenkins自由式项目。

SBT Build Configuration

我在构建作业时在控制台输出中遇到以下错误。

[info] Compiling 6 Scala sources and 10 Java sources to D:\CheckSbt\target\scala-2.11\classes...
java.util.UnknownFormatConversionException: Conversion = '0'
    at java.util.Formatter.checkText(Unknown Source)
    at java.util.Formatter.parse(Unknown Source)
    at java.util.Formatter.format(Unknown Source)
    at java.util.Formatter.format(Unknown Source)
    at java.lang.String.format(Unknown Source)
    at scala.collection.immutable.StringLike$class.format(StringLike.scala:266)
    at scala.collection.immutable.StringOps.format(StringOps.scala:31)
    at sbt.inc.TextAnalysisFormat$$anonfun$35.apply(TextAnalysisFormat.scala:367)
    at sbt.inc.TextAnalysisFormat$$anonfun$35.apply(TextAnalysisFormat.scala:367)
    at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
    at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
    at scala.collection.immutable.List.foreach(List.scala:318)
    at scala.collection.TraversableLike$class.map(TraversableLike.scala:244)
    at scala.collection.AbstractTraversable.map(Traversable.scala:105)
    at sbt.inc.TextAnalysisFormat$.sbt$inc$TextAnalysisFormat$$writeSeq(TextAnalysisFormat.scala:367)
    at sbt.inc.TextAnalysisFormat$CompileSetupF$.write(TextAnalysisFormat.scala:280)
    at sbt.inc.TextAnalysisFormat$$anonfun$write$1.apply$mcV$sp(TextAnalysisFormat.scala:59)
    at sbt.inc.TextAnalysisFormat$$anonfun$write$1.apply(TextAnalysisFormat.scala:59)
    at sbt.inc.TextAnalysisFormat$$anonfun$write$1.apply(TextAnalysisFormat.scala:59)
    at sbt.inc.FormatTimer$.aggregate(TextAnalysisFormat.scala:18)
    at sbt.inc.FormatTimer$.time(TextAnalysisFormat.scala:25)
    at sbt.inc.TextAnalysisFormat$.write(TextAnalysisFormat.scala:59)
    at sbt.inc.FileBasedStore$$anon$1$$anonfun$set$1.apply(FileBasedStore.scala:12)
    at sbt.inc.FileBasedStore$$anon$1$$anonfun$set$1.apply(FileBasedStore.scala:12)
    at sbt.Using.apply(Using.scala:24)
    at sbt.inc.FileBasedStore$$anon$1.set(FileBasedStore.scala:12)
    at sbt.inc.AnalysisStore$$anon$1.set(AnalysisStore.scala:16)
    at sbt.inc.AnalysisStore$$anon$2.set(AnalysisStore.scala:27)
    at sbt.Defaults$$anonfun$compileTask$1.apply(Defaults.scala:845)
    at sbt.Defaults$$anonfun$compileTask$1.apply(Defaults.scala:839)
    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:228)
    at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228)
    at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
    at sbt.Execute.work(Execute.scala:237)
    at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
    at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
    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(Unknown Source)
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
[error] (compile:compile) java.util.UnknownFormatConversionException: Conversion = '0'
[error] Total time: 30 s, completed ?? ?????, ???? ??:??:?? ?????????
Build step 'Build using sbt' changed build result to FAILURE
Build step 'Build using sbt' marked build as failure
Finished: FAILURE

我可以从命令提示符本地清理和编译项目,它工作正常。

我被误导了这个错误超过3天,我在谷歌搜索了这个问题,但我没有得到任何解决方案。有什么想法吗?

0 个答案:

没有答案