我的 Eclipse 似乎遇到了 Maven 问题。我的 Juno eclipse 版本中有 eclipse 插件 m2e 和 Egit,它们是最新的。顺便说一句,它确实可以在 eclipse 和 DOS mvn 中编译良好 - 但 eclipse 仍在记录该问题。
有问题的 pom.xml 部分
<plugin>
<groupId>org.jvnet.jaxb2.maven2</groupId>
<artifactId>maven-jaxb2-plugin</artifactId>
<version>0.8.3</version>
<configuration>
<catalog>src/main/resources/my-model.cat</catalog>
</configuration>
<executions>
<execution> //This is being highlighted as an error
<id>generate-sources</id>
<phase>generate-sources</phase>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<schemaDirectory>src/main/resources</schemaDirectory>
<schemaIncludes>
<!-- <include>a.xsd b.xsd c.xsd</include> -->
<include>*.xsd</include>
</schemaIncludes>
<forceRegenerate>true</forceRegenerate>
<writeCode>true</writeCode>
<episode>true</episode>
<episodeFile>${project.build.directory}/generate-sources/xjc/META-INF/my-model.episode</episodeFile>
</configuration>
</execution>
</executions>
</plugin>
但是我遇到了一个问题:
Failed to compile input schema(s)! Error messages should have been provided.
(org.jvnet.jaxb2.maven2:maven-jaxb2-plugin:0.8.3:generate:generate-sources:generate-sources) pom.xml /myProj line 56 Maven Build Problem
这就是我得到的全部 - 只是一个红色恼人的问题,浏览器中突出显示的注释和 pom 文件中的一条波浪线。没有标记架构或其他任何内容。我知道它不会阻止我工作和运行 Maven,但是为什么 Eclipse 和/或 m2e 这样做呢?
谢谢, 凯文
编辑: my-model.cat 文件
PUBLIC "urn:com:myCom:myProj:model" "a.xsd"
PUBLIC "urn:com:myCom:myProj:operations" "b.xsd"
PUBLIC "urn:com:myCom:myProj:class" "c.xsd"
没有什么太多的。
最佳答案
好的 - 解决了这个问题。看来 m2e 有一些连接器问题。找到这个link这是来自 eclipse 实验室的 m2e-jaxb2-connectors 的 google 代码站点。
将此添加到“安装新软件”区域,此问题和其他问题(其他人不断构建)都消失了。我想这是jaxb开发者必备的插件。
凯文
关于java - Eclipse Maven 构建问题 : Failed to compile input schema(s)!,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22106164/