Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/maven/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Axis2数据绑定jaxbri+;Maven:JAX-BRI JAR不在类路径上_Maven_Jaxb_Axis2_Maven Plugin_Maven 3 - Fatal编程技术网

Axis2数据绑定jaxbri+;Maven:JAX-BRI JAR不在类路径上

Axis2数据绑定jaxbri+;Maven:JAX-BRI JAR不在类路径上,maven,jaxb,axis2,maven-plugin,maven-3,Maven,Jaxb,Axis2,Maven Plugin,Maven 3,从2天开始尝试让Maven 3.0.3+axis2-wsdl2code-Maven-plugin 1.5.4和JAXPRI数据绑定正常工作。错误消息: java.lang.RuntimeException: JAX-B RI JARs not on classpath at org.apache.axis2.wsdl.codegen.extension.JAXBRIExtension.engage(JAXBRIExtension.java:78) at org.apache.ax

从2天开始尝试让Maven 3.0.3+axis2-wsdl2code-Maven-plugin 1.5.4和JAXPRI数据绑定正常工作。错误消息:

java.lang.RuntimeException: JAX-B RI JARs not on classpath
    at org.apache.axis2.wsdl.codegen.extension.JAXBRIExtension.engage(JAXBRIExtension.java:78)
    at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:224)
POM:

。。。
1.5.4
1.2.7
1.0M8
org.apache.axis2
axis2
${axis2ReleaseVersion}
org.apache.ws.commons.axiom
axiom api
${AXIOM ReleaseVersion}
org.apache.ws.commons.axiom
简化公理
${AXIOM ReleaseVersion}
org.apache.ws.commons.axiom
公理dom
${AXIOM ReleaseVersion}
org.apache.axis2
axis2-wsdl2code-maven-plugin
1.5.4
真的
真的
真的
wsdl2code
xyz
${basedir}/src/main/resources/wsdl/Service.wsdl
贾克斯布里
甚至将jaxb ri JAR设置为依赖项也不起作用:

<dependency>
    <groupId>org.apache.axis2</groupId>
    <artifactId>axis2-jaxbri</artifactId>
    <version>1.5.4</version>
</dependency>

<dependency>
    <groupId>javax.xml.bind</groupId>
    <artifactId>jaxb-api</artifactId>
    <version>2.1</version>
    <scope>system</scope>
    <systemPath>${basedir}/src/main/resources/lib/jaxb-api-2.1.jar</systemPath>
</dependency>

<dependency>
    <groupId>com.sun.xml.bind</groupId>
    <artifactId>jaxb-impl</artifactId>
    <version>2.1.7</version>
    <scope>system</scope>
    <systemPath>${basedir}/src/main/resources/lib/jaxb-impl-2.1.7.jar</systemPath>
</dependency>

<dependency>
    <groupId>com.sun.tools</groupId>
    <artifactId>jaxb1-xjc</artifactId>
    <version>2.1.7</version>
    <scope>system</scope>
    <systemPath>${basedir}/src/main/resources/lib/jaxb-xjc-2.1.7.jar</systemPath>
</dependency>

org.apache.axis2
axis2 jaxbri
1.5.4
javax.xml.bind
jaxb api
2.1
系统
${basedir}/src/main/resources/lib/jaxb-api-2.1.jar
com.sun.xml.bind
jaxb impl
2.1.7
系统
${basedir}/src/main/resources/lib/jaxb-impl-2.1.7.jar
com.sun.tools
jaxb1 xjc
2.1.7
系统
${basedir}/src/main/resources/lib/jaxb-xjc-2.1.7.jar

提前感谢您的帮助。

插件不使用project的依赖项。您还需要添加axis2 jaxbri作为wsdl2code插件的依赖项

        <plugin>
            <groupId>org.apache.axis2</groupId>
            <artifactId>axis2-wsdl2code-maven-plugin</artifactId>
            <version>1.5.4</version>
            <executions>
                <execution>
                    <goals>
                        <goal>wsdl2code</goal>
                    </goals>
                </execution>
            </executions>
            <configuration>
                <packageName>.....</packageName>
                <wsdlFile>.....</wsdlFile>
                <databindingName>jaxbri</databindingName>
                <syncMode>sync</syncMode>
                <generateTestcase>false</generateTestcase>
            </configuration>
            <dependencies>
                <dependency>
                    <groupId>org.apache.axis2</groupId>
                    <artifactId>axis2-jaxbri</artifactId>
                    <version>1.5.4</version>
                </dependency>
            </dependencies>
        </plugin>

org.apache.axis2
axis2-wsdl2code-maven-plugin
1.5.4
wsdl2code
.....
.....
贾克斯布里
同步
假的
org.apache.axis2
axis2 jaxbri
1.5.4

你成就了我的一天,这就是解决方案。
        <plugin>
            <groupId>org.apache.axis2</groupId>
            <artifactId>axis2-wsdl2code-maven-plugin</artifactId>
            <version>1.5.4</version>
            <executions>
                <execution>
                    <goals>
                        <goal>wsdl2code</goal>
                    </goals>
                </execution>
            </executions>
            <configuration>
                <packageName>.....</packageName>
                <wsdlFile>.....</wsdlFile>
                <databindingName>jaxbri</databindingName>
                <syncMode>sync</syncMode>
                <generateTestcase>false</generateTestcase>
            </configuration>
            <dependencies>
                <dependency>
                    <groupId>org.apache.axis2</groupId>
                    <artifactId>axis2-jaxbri</artifactId>
                    <version>1.5.4</version>
                </dependency>
            </dependencies>
        </plugin>