用于JAX-WS org.codehaus.mojo的Eclipse m2e连接器

rog*_*hat 3 eclipse wsimport maven m2e eclipse-juno

我正在尝试使用wsimportmaven build中声明的目标来使用web服务.但我正面临着这个问题m2e connectors.我的POM中有一个错误

Plugin execution not covered by lifecycle configuration: org.codehaus.mojo:jaxws-maven-
          plugin:1.10:wsimport (execution: default, phase: generate-sources)
Run Code Online (Sandbox Code Playgroud)

我一直在尝试安装m2e连接器,但即使在市场上也没有.还有其他m2e连接器,但不是我需要的JAX-WS.

我已经关注并尝试了几乎所有这里提到的解决方案,但都是徒劳的.

虽然生成资源没有问题.资源是在构建时成功生成的,但是这个POM错误不允许我的项目与我的tomcat同步,每次我必须手动部署war来测试我做的一些小改动.

这一切真的很烦人,我需要找到解决方案.我在这里使用eclipse juno.下面是我正在使用的POM文件

<build>
    <finalName>home</finalName>
    <plugins>       
        <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>jaxws-maven-plugin</artifactId>
            <version>1.10</version>
            <executions>
                <execution>
                    <phase>post-clean</phase>
                    <goals>
                        <goal>wsimport</goal>
                    </goals>
                </execution>
            </executions>
            <!-- -->
            <configuration>
                <wsdlUrls>
                    <wsdlUrl>http://localhost:8080/email-service/services/EmailService?wsdl</wsdlUrl>
                </wsdlUrls>
                <sourceDestDir>${project.build.directory}/generated</sourceDestDir>
                <verbose>true</verbose>
            </configuration>
        </plugin>
        <plugin>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>2.3.2</version>
            <configuration>
                <source>1.6</source>
                <target>1.6</target>
            </configuration>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>2.3.1</version>
            <configuration>
                <source>1.6</source>
                <target>1.6</target>
            </configuration>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-resources-plugin</artifactId>
            <version>2.6</version>
            <executions>
                <execution>
                    <id>additional-resources</id>
                    <phase>process-resources</phase>
                    <goals>
                        <goal>copy-resources</goal>
                    </goals>
                    <configuration>
                        <outputDirectory>${project.build.directory}/home/WEB-INF/classes</outputDirectory>
                        <resources>
                            <resource>
                                <directory>${project.basedir}/src/main/webapp/resources/props</directory>
                            </resource>
                        </resources>
                    </configuration>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>
Run Code Online (Sandbox Code Playgroud)

Mic*_*och 6

有一个M2E jaxws-maven-connector GitHub项目:https://github.com/trajano/jaxws-maven-connector.它适用于Eclipse Kepler和org.codehaus.mojo:jaxws-maven-plugin:1.12.

  1. 从" 帮助"菜单中选择" 安装新软件 " .
  2. 添加存储库https://raw.github.com/trajano/jaxws-maven-connector/master/jaxws-connector-update-site/(参见项目)
  3. 为jaxws安装m2e连接器并重新启动.
  4. 导入Maven项目或更新Eclipse Maven项目配置.


Bae*_*Bae 5

投票给https://github.com/javaee/metro-jaxws-commons/issues/124并在插件中修复此问题.然后你不需要连接器.

与此同时,你可以按照Archimedes Trajano的帖子来破解这个