0

我尝试使用 jaxws maven 插件最终生成 wsdl 文件:“成功构建”但我的 wsdl 文件没有生成,它通常在文件夹 \target\surefire-reports 中,但我在构建后没有它

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building BSCSwebservices Maven Webapp 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for com.sun.xml.stream.buffer:streambuffer:jar:0.4 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
 [WARNING] The POM for org.jvnet.staxex:stax-ex:jar:1.0 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[INFO] 
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ BSCSwebservices ---
[debug] execute contextualize
[WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent!
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 6 resources
[INFO] 
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ BSCSwebservices ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] --- maven-resources-plugin:2.5:testResources (default-testResources) @ BSCSwebservices ---
[debug] execute contextualize
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory C:\Users\sayed\workspace\BSCSwebservices\src\test\resources
[INFO] 
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ BSCSwebservices ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] --- maven-surefire-plugin:2.10:test (default-test) @ BSCSwebservices ---
[INFO] Surefire report directory: C:\Users\sayed\workspace\BSCSwebservices\target\surefire-reports

T E S T S

Results :

Tests run: 0, Failures: 0, Errors: 0, Skipped: 0

[INFO] 
[INFO] --- maven-war-plugin:2.1.1:war (default-war) @ BSCSwebservices ---
[INFO] Packaging webapp
[INFO] Assembling webapp [BSCSwebservices] in [C:\Users\sayed\workspace\BSCSwebservices\target\BSCSwebservices]
[INFO] Processing war project
[INFO] Copying webapp resources [C:\Users\sayed\workspace\BSCSwebservices\src\main\webapp]
[INFO] Webapp assembled in [1042 msecs]
[INFO] Building war: C:\Users\sayed\workspace\BSCSwebservices\target\BSCSwebservices.war
[WARNING] Warning: selected war files include a WEB-INF/web.xml which will be ignored 
(webxml attribute is missing from war task, or ignoreWebxml attribute is specified as 'true')
[INFO] 
[INFO] --- jaxws-maven-plugin:1.11:wsgen (default) @ BSCSwebservices ---

warning: The apt tool and its associated API are planned to be
removed in the next major JDK release.  These features have been
superseded by javac and the standardized annotation processing API,
javax.annotation.processing and javax.lang.model.  Users are
recommended to migrate to the annotation processing features of
javac; see the javac man page for more information.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1:30.437s
[INFO] Finished at: Fri Aug 02 23:00:03 WAT 2013
[INFO] Final Memory: 16M/40M
[INFO] ------------------------------------------------------------------------

这是 pom.xml 的一部分

<plugins>
    <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>jaxws-maven-plugin</artifactId>
        <version>1.11</version>
        <executions>
                <execution>
                <configuration>
                <sei>com.ws.BillingAccountRead</sei>
                <genwsdl>true</genwsdl>  
                 <keep>true</keep>

        </configuration>
                <phase>package</phase>      
                        <goals>
                        <goal>wsgen</goal>
                        </goals>


                </execution>

        </executions>


    </plugin>
    </plugins>
    </build>
  </project>

当我使用 mvn clean package -X

<configuration>
 <destDir default-value="${project.build.outputDirectory}"/>
 <extension default-value="false"/>
 <genWsdl default-value="false"/>
 <keep default-value="false">true</keep>
 <pluginArtifactMap>${plugin.artifactMap}</pluginArtifactMap>
 <pluginArtifacts>${plugin.artifacts}</pluginArtifacts>
 <project>${project}</project>
 <resourceDestDir default-value="${project.build.directory}/jaxws/wsgen/wsdl"/>

 <sei>com.ws.BillingAccountRead</sei>
 <verbose default-value="false">true</verbose>
</configuration>
4

3 回答 3

0

我认为您可能希望在“生成资源”阶段或“生成资源”而不是“包”阶段构建 wsdl

于 2013-08-02T22:14:28.880 回答
0

它应该${resourceDestDir} 像下面那样使用verbose = true生成 wsdl,并使用-X标志执行 mvn 命令,然后仔细查看 maven 日志。

<executions>
                <execution>
                <configuration>
                <sei>com.ws.BillingAccountRead</sei>
                <genwsdl>true</genwsdl>  
                 <keep>true</keep>
                <verbose>true</verbose>
        </configuration>
                <phase>package</phase>      
                        <goals>
                        <goal>wsgen</goal>
                        </goals>


                </execution>

        </executions>
于 2013-08-03T02:59:17.567 回答
-1

尝试使用 -X 或 -e 构建以从日志中获取更多信息

于 2013-08-04T13:27:43.253 回答