gpt4 book ai didi

jaxb annox 插件不工作

转载 作者:行者123 更新时间:2023-12-04 18:21:33 27 4
gpt4 key购买 nike

我在用于 jaxb 生成的 annox 插件上收到以下错误

[ERROR] file:/Users/dhiller/Space/ifp-core/framework/src/main/resources/schemas/common_2012_04.xsd[5,136]
org.xml.sax.SAXParseException: Unsupported binding namespace "http://annox.dev.java.net". Perhaps you meant "http://java.sun.com/xml/ns/jaxb/xjc"?

这是我的代码。版本必须以某种方式搞砸?任何人都有一些包含所有版本号的工作示例
            <plugin>
<groupId>org.jvnet.jaxb2.maven2</groupId>
<artifactId>maven-jaxb21-plugin</artifactId>
<version>0.8.1</version>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
<configuration>
<args>
<arg>-XtoString</arg>
<arg>-Xequals</arg>
<arg>-XhashCode</arg>
<arg>-Xcopyable</arg>
</args>
<plugins>
<plugin>
<groupId>org.jvnet.jaxb2_commons</groupId>
<artifactId>jaxb2-basics</artifactId>
<version>0.6.3</version>
</plugin>
</plugins>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxb2-maven-plugin</artifactId>
<version>1.3.1</version>
<executions>
<execution>
<goals>
<goal>xjc</goal>
</goals>
</execution>
</executions>
<configuration>
<clearOutputDir>false</clearOutputDir>
<schemaDirectory>${basedir}/src/main/resources/schemas</schemaDirectory>
<schemaFiles>externalaction_2012_03.xsd,common_2012_04.xsd,utilities_2012_03.xsd</schemaFiles>
<outputDirectory>${project.build.directory}/generated-sources</outputDirectory>
<bindingDirectory>${basedir}/src/main/xjb</bindingDirectory>
<bindingFiles>bindings.xjb.xml</bindingFiles>
<extension>true</extension>
</configuration>
</plugin>

最佳答案

我认为您缺少来自 <plugin> 的一些依赖项.试试这个代码:

<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxb2-maven-plugin</artifactId>
<version>1.5</version>
<executions>
<execution>
<id>xjc</id>
<goals>
<goal>xjc</goal>
</goals>
<configuration>
<extension>true</extension>
<arguments>-Xannotate</arguments>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.jvnet.jaxb2_commons</groupId>
<artifactId>jaxb2-basics-annotate</artifactId>
<version>0.6.4</version>
</dependency>
<dependency>
<groupId>com.sun.codemodel</groupId>
<artifactId>codemodel</artifactId>
<version>2.6</version>
</dependency>
</dependencies>
</plugin>

关于jaxb annox 插件不工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10565360/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com