2011-05-18 117 views
6

我已经导入我的项目到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> 
+0

请问您能否提供您的pom.xml文件。 – Tnem 2011-05-18 23:30:21

+0

如果您直接从maven构建项目,是否可以构建?只要到pom.xml所在的路径,执行'mvn clean package'并查看你得到了什么(mvn.bat或mvn.sh需要在PATH中)。 – 2011-05-24 12:18:06

回答

3

好吧,我只能提供建议,我“米没有太大的行家高手,但我只是有这个今天做的,它是非常简单的我 -

  • 建立Maven项目被蚀友好:mvn eclipse:eclipse

  • 确保Eclipse可以看到库这意味着要去页。在Eclipse中rojectsetup/buildpath/libraries编辑器,并添加变量M2_REPO以指向您的本地Maven存储库(例如,像/home/nacho3d/.m2/repository)

你的错误,其实,在我看来就像行家找不到轴的依赖。造成这种情况的具体细节应当轴线网站上,

+0

我不得不在我的本地回购库中放入由人员开发的几个库,以开发我正在开发的项目。 – FreelanceAr 2011-06-02 02:29:37

0

如果你有丢失的依赖,你可以的罐子:

1)它部署到你的Maven仓库,如果你有一个

2)用'system'的范围声明你的pom依赖:check this out

2

我想你使用的是maven 3.0+,对不对?

那个pom(org.apache.woden:woden:jar:1.0-incubating-M7b)与maven 3不兼容。 如果您使用maven 2.2.1构建ESB 4.3.0-03源代码,那么它将会成功。

+0

我正在使用maven2。我仍然无法运行...你有什么想法吗? 1.3版本可以继续使用吗? – FreelanceAr 2011-06-28 23:42:46

0

我也面临着同样的问题,并按照下面的步骤固定它...

  1. 在你的项目目录下执行命令:MVN日食:日食
  2. 在Eclipse项目中右点击 - >的Maven - >更新项目。
  3. 再次右键单击 - > Maven->禁用Maven自然
  4. 重新启动eclipse。
  5. 右键单击project-> Configure-> Convert to Maven Project。

完成。错误将消失。

谢谢