我正在尝试使用jaxb2插件从工件(依赖项)编译模式,我遵循了以下主题:
http://confluence.highsource.org/display/MJIIP/User+Guide#UserGuide-UsingcustomJAXB2plugins
我的代码是
<plugin>
<groupId>org.jvnet.jaxb2.maven2</groupId>
<artifactId>maven-jaxb2-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
<configuration>
<forceRegenerate>true</forceRegenerate>
<generatePackage>com.xxx.it.esp.subscription.schema</generatePackage>
<generateDirectory>src/main/java/</generateDirectory>
<!--
<schemas>
<schema>
<dependencyResource>
<groupId>com.xxx.it.esp</groupId>
<artifactId>esp-schemas</artifactId>
<version>1.0-SNAPSHOT</version>
<resource>index.xsd</resource>
</dependencyResource>
</schema>
</schemas>
</configuration>
</plugin>由: java.io.FileNotFoundException: JAR条目快照未在jar中找到esp- index.xsd -1.0-SNAPSHOT
顺便说一句,index.xsd位于src/main/resources/schema/文件夹下,我也尝试给出了整个文件夹,但也出现了相同的错误
发布于 2011-09-30 18:01:26
请尝试<resource>schema/index.xsd</resource>。resource是JAR中XSD的路径。
https://stackoverflow.com/questions/7598127
复制相似问题