使用sbt docker时java.util.regex.PatternSyntaxException:publishLocal

时间:2015-06-01 04:03:58

标签: scala docker sbt sbt-native-packager

我创建了一个包含子项目的新项目,并为每个子项目启用了dockerPlugin。 但是,当我执行sbt docker:publishLocal时,我遇到了以下异常:

[info] Wrote D:\ProgrammingStyle\code\milkyway\frontend\target\scala-2.11\frontend_2.11-1.0-SNAPSHOT.pom
java.util.regex.PatternSyntaxException: Unexpected internal error near index 1
\
^
    at java.util.regex.Pattern.error(Pattern.java:1955)
    at java.util.regex.Pattern.compile(Pattern.java:1702)
    at java.util.regex.Pattern.<init>(Pattern.java:1351)
    at java.util.regex.Pattern.compile(Pattern.java:1028)
    at java.lang.String.split(String.java:2368)
    at java.lang.String.split(String.java:2410)
    at com.typesafe.sbt.packager.docker.DockerPlugin$.com$typesafe$sbt$packager$docker$DockerPlugin$$makeAdd(DockerPlugin.scala:152)
    at com.typesafe.sbt.packager.docker.DockerPlugin$$anonfun$projectSettings$8.apply(DockerPlugin.scala:79)
    at com.typesafe.sbt.packager.docker.DockerPlugin$$anonfun$projectSettings$8.apply(DockerPlugin.scala:70)
    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:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
[error] (frontend/*:dockerCommands) java.util.regex.PatternSyntaxException: Unexpected internal error near index 1
[error] \
[error]  ^

我想知道这个问题是否有解决方案,或者我需要改变我的项目结构?

我的build.sbt如下:

name in ThisBuild := "milkyWay"

// TODO Set your version here
version in ThisBuild := "1.0-SNAPSHOT"

scalaVersion in ThisBuild := "2.11.6"

lazy val `frontend` = (project in file("frontend")).
  enablePlugins(PlayScala).
  enablePlugins(DockerPlugin)

lazy val `backend` = (project in file("backend")).
  enablePlugins(JavaAppPackaging).
  enablePlugins(DockerPlugin)

这些都是空的项目。我只有前端的基本文件。我正在使用sbt-native-packager 1.0.2。我执行的任务是sbt "project frontend" docker:publishLocal

0 个答案:

没有答案