具体答案可参考github:https://github.com/scala/scala-module-dependency-sample/
原因分析:
scala-xml、scala-parser-combinators、scala-swing三种库自2.11版本后被隔离出来,基于Maven打包方式修改pom.xml的文件如下:
代码语言:javascript复制<dependency>
<groupId>org.scala-lang.modules</groupId>
<artifactId>scala-xml_${scala.compat.version}</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>org.scala-lang.modules</groupId>
<artifactId>scala-parser-combinators_${scala.compat.version}</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>org.scala-lang.modules</groupId>
<artifactId>scala-swing_${scala.compat.version}</artifactId>
<version>2.0.3</version>
</dependency>