1

pom.xmlファイルにあるapacheCXFcodegenプラグインを実行できません。ビルドを実行しているときに、次のエラーが発生します

<plugin>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-codegen-plugin</artifactId>
            <version>2.7.3</version>
            <executions>
                <execution>
                    <id>generate-sources</id>
                    <phase>generate-sources</phase>
                    <configuration>
                        <sourceRoot>${project.build.directory}/generated/cxf</sourceRoot>
                        <wsdlOptions>
                            <wsdlOption>
                                <wsdl>${basedir}/src/main/resources/wsdl/activateDevice.wsdl</wsdl>
                            </wsdlOption>
                        </wsdlOptions>
                    </configuration>
                    <goals>
                        <goal>wsdl2java</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>

次のエラーが発生します

Failed to execute goal org.apache.cxf:cxf-codegen-plugin:2.7.3:wsdl2java (generate-sources) on project dealer: org/apache/velocity/context/Context: org.apache.velocity.context.Context -> [Help 1]

助けてくれてありがとう

4

2 に答える 2

2

これを試してください:

<plugin>
    <groupId>org.apache.cxf</groupId>
    <artifactId>cxf-codegen-plugin</artifactId>
    <version>2.7.3</version>
    <dependencies>
        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-rt-bindings-soap</artifactId>
            <version>2.7.3</version>
        </dependency>
    </dependencies>
    <executions>
        <execution>
            <id>generate-jaxb</id>
            <phase>generate-sources</phase>
            <configuration>
                <additionalJvmArgs>-Dfile.encoding=UTF8</additionalJvmArgs>
                <wsdlOptions>
                    <wsdlOption>
                        <wsdl>${basedir}/src/main/resources/wsdl/activateDevice.wsdl</wsdl>
                    </wsdlOption>
                 </wsdlOptions>
            </configuration>
            <goals>
                <goal>wsdl2java</goal>
            </goals>
        </execution>
    </executions>
</plugin>
于 2013-03-13T21:31:30.130 に答える
0

これは私のために働いた

            <plugin>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-codegen-plugin</artifactId>
            <version>${cxf.version}</version>
            <executions>
                <execution>
                    <id>generate-sources</id>
                    <phase>generate-sources</phase>
                    <configuration>
                        <sourceRoot>${project.build.directory}/generated/cxf</sourceRoot>
                        <wsdlOptions>
                            <wsdlOption>
                                <wsdl>src/main/resources/wsdl/resourceservice1.wsdl</wsdl>
                                <bindingFiles>
                                    <bindingFile>src/main/resources/wsdl/binding.xml</bindingFile>
                                </bindingFiles>
                            </wsdlOption>
                        </wsdlOptions>
                    </configuration>
                    <goals>
                        <goal>wsdl2java</goal>
                    </goals>
                </execution>
            </executions>
            <dependencies>
                <dependency>
                    <groupId>com.sun.xml.bind</groupId>
                    <artifactId>jaxb-impl</artifactId>
                    <version>${jaxb.version}</version>
                </dependency>
                <dependency>
                    <groupId>com.sun.xml.bind</groupId>
                    <artifactId>jaxb-xjc</artifactId>
                    <version>${jaxb.version}</version>
                </dependency>
            </dependencies>
        </plugin>
于 2013-04-05T08:26:14.423 に答える