长时间监听第一次调用者。 :-)scala maven插件编译失败,随着“版本不能为空”随机依赖
我试图慢慢地将我们的java webapp工作到scala,第一小步就是获得一些scala代码来编译我们的项目。我已经添加了斯卡拉,Maven的插件来我们的web应用特定的POM像这样:
...
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-library</artifactId>
<!--version>2.10.3</version-->
<version>2.7.2</version>
</dependency>
....
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>add-source</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>src/main/scala</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>net.alchim31.maven</groupId>
<artifactId>scala-maven-plugin</artifactId>
<executions>
<execution>
<id>scala-compile-first</id>
<phase>process-resources</phase>
<goals>
<goal>add-source</goal>
<goal>compile</goal>
</goals>
</execution>
<execution>
<id>scala-test-compile</id>
<phase>process-test-resources</phase>
<goals>
<goal>testCompile</goal>
</goals>
</execution>
</executions>
</plugin>
等的改变,但是这是我最新的。
现在,这是为web应用程序的POM,我们有另一个POM为包含我们与其他应用程序共享的一些常见代码的jar。这两个项目都依赖于其他内部罐子。
我的scala类是位于src/main/scala中的一个小小的控制器。
当我运行一个Maven包或任何Maven的命令确实是我得到的错误:
[INFO] --- scala-maven-plugin:3.1.6:compile (scala-compile-first) @ producttool-webapp ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.663s
[INFO] Finished at: Thu Jan 16 15:34:09 PST 2014
[INFO] Final Memory: 16M/213M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal net.alchim31.maven:scala-maven-plugin:3.1.6:compile (scala-compile-fi
rst) on project producttool-webapp: Execution scala-compile-first of goal net.alchim31.maven:scala-m
aven-plugin:3.1.6:compile failed: For artifact {company.com:vine-xml:null:jar}: The version cannot be em
pty. -> [Help 1]
我看到一个警告/错误,当我调试这个版本,但它并没有什么意义我:
[WARNING] The POM for company.com:vine-xml:jar:1.11.1 is invalid, transitive dependencies (if any) will
not be available: 2 problems were encountered while building the effective model for company.com:vine-xm
l:
[ERROR] 'modelVersion' is missing. @ company.com:vine-xml:[unknown-version]
[ERROR] 'version' is missing. @ company.com:vine-xml:[unknown-version]
我们依靠的孩子罐子项目是依赖于罐子,并在他们的pom.xml指定,它的到来通过调试,以及像这样:
[DEBUG] company.com:vine-xml:jar:1.12.2:compile
...
[DEBUG] testArtifact: artifact=company.com:vine-xml:jar:1.12.2:compile
[DEBUG] includeArtifact: artifact=company.com:vine-xml:jar:1.12.2:compile
[DEBUG] startProcessChildren: artifact=company.com:vine-xml:jar:1.12.2:compile
[DEBUG] testArtifact: artifact=javax.xml.bind:jaxb-api:jar:2.1:compile
[DEBUG] omitForNearer: omitted=javax.xml.bind:jaxb-api:jar:2.1:compile kept=javax.xml.bind:jax
我想知道如果也许我的scala-maven插件没有看到任何依赖关系,并问我如何解决这个问题。或者可能有一种方法可以忽略这些我可以在scala-maven-plugin中打开的错误。
感谢您的帮助。