【问题标题】:Execution basic of goal org.jvnet.jax-ws-commons:jaxws-maven-plugin:2.3:wsgen failed目标 org.jvnet.jax-ws-commons:jaxws-maven-plugin:2.3:wsgen 的执行基本失败
【发布时间】:2016-06-20 06:05:37
【问题描述】:

我正在将 Eclipse-Mars 用于 JAX-WS Web 服务,这是基于 Maven 的项目,位于 link

当我运行 ma​​ven install

            <plugin>
                <groupId>org.jvnet.jax-ws-commons</groupId>
                <artifactId>jaxws-maven-plugin</artifactId>
                <version>2.3</version>
                <executions>
                    <execution>
                        <id>basic</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>wsgen</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <keep>true</keep>
                    <sei>com.ibrahim.service.XXServiceImpl</sei>
                    <genWsdl>true</genWsdl>
                    <resourceDestDir>${basedir}\generated\resources\wsdl</resourceDestDir>
                    <sourceDestDir>${basedir}\generated\java\source</sourceDestDir>
                    <verbose>true</verbose>
                    <target>2.1</target>
                </configuration>
            </plugin>

这是控制台中显示的错误

[INFO] ------------------------------------------------------------------------
[INFO] Building Metro-JAX-WS-Bottom-UP 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for com.sun.xml.ws:jaxws-rt:jar:2.2.8 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[WARNING] The POM for org.glassfish.metro:webservices-rt:jar:2.3 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[INFO] 
[INFO] --- jaxws-maven-plugin:2.3:wsgen (basic) @ Metro-JAX-WS-Bottom-UP ---
[WARNING] The POM for com.sun.xml.ws:jaxws-tools:jar:2.2.8 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[INFO] Processing: com.jaxws.series.bottom.up.approach.service.BookServiceImpl
[INFO] jaxws:wsgen args: [-keep, -s, C:\Users\xxx\Downloads\Metro-JAX-WS-Bottom-UP\generated\java\source, -d, C:\Users\xxx\Downloads\Metro-JAX-WS-Bottom-UP\target\classes, -verbose, -encoding, UTF-8, -wsdl, -r, C:\Users\xxx\Downloads\Metro-JAX-WS-Bottom-UP\generated\resources\wsdl, com.jaxws.series.bottom.up.approach.service.BookServiceImpl]
[WARNING] Failed to build parent project for com.sun.xml.ws:project:pom:2.2.8
[WARNING] Failed to build parent project for com.sun.xml.ws:bundles:pom:2.2.8
[WARNING] Failed to build parent project for com.sun.xml.ws:jaxws-tools:pom:2.2.8
[WARNING] Invalid POM for com.sun.xml.ws:jaxws-tools:jar:2.2.8, transitive dependencies (if any) will not be available, enable debug logging for more details
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.710 s
[INFO] Finished at: 2016-06-22T15:50:16+05:30
[INFO] Final Memory: 7M/146M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.jvnet.jax-ws-commons:jaxws-maven-plugin:2.3:wsgen (basic) on project Metro-JAX-WS-Bottom-UP: Execution basic of goal org.jvnet.jax-ws-commons:jaxws-maven-plugin:2.3:wsgen failed: String index out of range: -1 -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException

非常感谢任何帮助

【问题讨论】:

  • 您能分享更多您的pom.xml 文件吗?它可能与插件所需的缺少依赖项有关
  • @Matteo 我已经添加了我从那里获得这个项目的链接。请帮忙

标签: java web-services maven soap wsgen


【解决方案1】:

我解决了

的依赖问题
[WARNING] Failed to build parent project for com.sun.xml.ws:project:pom:2.2.8
[WARNING] Failed to build parent project for com.sun.xml.ws:bundles:pom:2.2.8
[WARNING] Failed to build parent project for com.sun.xml.ws:jaxws-tools:pom:2.2.8

通过使用 JDK 而不是 JRE(com.sun.xml 包含在 JDK 中)。打开 Eclipse settings -> Java -> Installed JREs 并确保在此处选择 JDK(例如,C:\Program Files\Java\jdk1.8.0_151)。

【讨论】:

    猜你喜欢
    • 2017-07-18
    • 1970-01-01
    • 1970-01-01
    • 2018-10-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多