我正在尝试使用在maven构建中声明的wsimport
目标来使用webservice。但我面临着m2e connectors
的问题。我的POM中有一个错误,它说适用于JAX-WS的Eclipse m2e连接器org.codehaus.mojo
Plugin execution not covered by lifecycle configuration: org.codehaus.mojo:jaxws-maven-
plugin:1.10:wsimport (execution: default, phase: generate-sources)
我一直在试图安装m2e连接器,但没有在市场上获得它们。还有其他的m2e连接器,但不是我需要的JAX-WS。
我遵循并尝试几乎所有提到的解决方案here但都是徒劳的。
尽管在生成资源方面没有问题。这些资源是在构建时成功生成的,但是这个POM错误不允许我的项目与我的tomcat同步,并且每次我必须手动部署战争来测试我所做的小改动。
这一切都很烦人,我需要找出解决方案。我在这里使用eclipse juno。 下面是我使用
<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>
啊互联网我是多么爱你 - 我已经走过了一年后,寻找这个问题的答案,这里是答案,虽然增加M2E支持还没有发生。 – Bae