参数'文件名'缺失或无效:使用axistools的java2wsdl

时间:2016-03-09 13:17:08

标签: maven axis

axistools无法创建文件并且抛出错误参数namefile缺失或无效。是我的配置错了?我在互联网上搜索但无法找到确切的配置。任何人都可以建议我一个工作配置?

<plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>axistools-maven-plugin</artifactId>
    <version>1.4</version>
    <executions>
        <execution>
            <phase>process-classes</phase>
            <goals>
                <goal>java2wsdl</goal>
            </goals>
            <configuration>
                <useEmitter>true</useEmitter>
                <classesDirectory>${basedir}/target/classes</classesDirectory>
                <outputDirectory>${basedir}/target/generated-sources/axistools/java2wsdl/webapp/wsdl</outputDirectory>
                 <fileName>${basedir}/target/generated-sources/axistools/java2wsdl/webapp/wsdl/WebService.wsdl</fileName>
                <location>http://xxx:xxxx/xxx/WebService</location>
                <namespace>urn:xxxx</namespace>
                <useinheritedmethods>true</useinheritedmethod>
                <style>WRAPPED</style>  
            </configuration>
        </execution>  
    </executions>
</plugin>

1 个答案:

答案 0 :(得分:0)

您在配置中使用fileName,而正确的配置元素是filename

配置条目区分大小写,因此您的驼峰式配置与预期的小写配置不匹配。

请注意,在这种情况下,错误消息非常有用,实际上它正在寻找filename并且无法找到它。

然而,这个插件的真正误导性是,user propertyfileName。我认为应该检查匹配,并且用户属性应该以一些与插件相关的名称作为前缀,以避免与其他插件发生冲突,但这对插件本身是一个更通用的考虑,无论你的问题是什么