我已經導入我的項目到Eclipse(赫利俄斯+ m2eclipse的),並且還到NetBeans(7.0)和兩個IDE中的煩惱之一就是:我有麻煩編譯Maven項目
這是當我嘗試構建時,我在Netbeans中獲得了什麼。
項目com.miCompany:myProject的:1.0(.....)有1個錯誤
Unresolveable build extension: Plugin org.apache.axis2:axis2-wsdl2code-maven-plugin:1.3 or one of its dependencies could not be resolved: Failed to collect dependencies for org.apache.axis2:axis2-wsdl2code-maven-plugin:jar:1.3 (): Failed to read artifact descriptor for org.apache.woden:woden:jar:1.0-incubating-M7b: Could not transfer artifact org.apache.woden:woden:pom:1.0-incubating-M7b from/to jibx (http://jibx.sourceforge.net/maven): No connector available to access repository jibx (http://jibx.sourceforge.net/maven) of type legacy using the available factories WagonRepositoryConnectorFactory -> [Help 2]
這是我得到在Eclipse:
Project build error: Unresolveable build extension: Plugin org.apache.axis2:axis2-wsdl2code-maven-plugin:1.3 or one of its dependencies could not be resolved: Failed to collect dependencies for org.apache.axis2:axis2-wsdl2code-maven-plugin:jar:1.3 () pom.xml /myProject line 1 Maven Problem
在Eclipse中我已經下載這個:http://www.apache.org/dyn/mirrors/mirrors.cgi/axis/axis2/java/core/1.5.4/axis2-eclipse-service-plugin-1.5.4.zip解壓縮並將文件:「org.apache.axis2.eclipse.codegen.plugin_1.5.4.jar」複製到我的Eclipse安裝目錄「插件」中。而且我仍然遇到同樣的錯誤。
我在運行Win XP和Eclipse的Netbeans上運行Win XP以及在Mac上運行,總是出現同樣的錯誤。
有人知道我能做什麼嗎?
這裏去我的pom.xml
<?xml version="1.0"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>MyParent</artifactId>
<groupId>com.mycompany</groupId>
<version>1.0</version>
</parent>
<groupId>com.mycompany</groupId>
<artifactId>myModule</artifactId>
<version>1.0</version>
<name>myModule</name>
<url>http://maven.apache.org</url>
<build>
<plugins>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<configuration>
<filesets>
<fileset>
<directory>src/main/java</directory>
<includes>
<include>com/mycompany/client/*.java</include>
</includes>
</fileset>
</filesets>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-wsdl2code-maven-plugin</artifactId>
<version>1.3</version>
<extensions>true</extensions>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>wsdl2code</goal>
</goals>
</execution>
</executions>
<configuration>
<packageName>com.mycompany.client</packageName>
<wsdlFile>src/main/axis2/MyWsdl.wsdl</wsdlFile>
<outputDirectory>.</outputDirectory>
<targetResourcesFolderLocation>target/main/axis2</targetResourcesFolderLocation>
<targetSourceFolderLocation>src/main/java</targetSourceFolderLocation>
<namespaceURIs>
<namespaceURI>
<uri>http://schema.mycompany.com/Esb</uri>
<packageName>com.mycompany.services.Esbsrv.schema</packageName>
</namespaceURI>
<namespaceURI>
<uri>http://wsdl.mycompany.com/Esb</uri>
<packageName>com.mycompany.services.Esbsrv.schema</packageName>
</namespaceURI>
<namespaceURI>
<uri>http://schema.mycompany.com/Global/WSException</uri>
<packageName>com.mycompany.schema.global.wsexception</packageName>
</namespaceURI>
</namespaceURIs>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<!--
<dependency>
<groupId>wsdl4j</groupId>
<artifactId>wsdl4j</artifactId>
<version>1.6.2</version>
<scope>compile</scope>
</dependency>
-->
<dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-adb</artifactId>
<version>1.3</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-kernel</artifactId>
<version>1.3</version>
<scope>compile</scope>
</dependency>
<!--
<dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-xmlbeans</artifactId>
<version>1.3</version>
<scope>compile</scope>
</dependency>
-->
</dependencies>
</project>
請問您能否提供您的pom.xml文件。 – Tnem 2011-05-18 23:30:21
如果您直接從maven構建項目,是否可以構建?只要到pom.xml所在的路徑,執行'mvn clean package'並查看你得到了什麼(mvn.bat或mvn.sh需要在PATH中)。 – 2011-05-24 12:18:06