【发布时间】:2011-08-28 10:54:59
【问题描述】:
我已将我的项目导入 Eclipse (Helios + m2eclipse),也导入 Netbeans (7.0),在这两个 IDE 中,问题之一是:
这是我在尝试构建时在 Netbeans 中得到的。
项目 com.miCompany:myProject:1.0 (.....) 有 1 个错误
无法解析的构建扩展:插件 org.apache.axis2:axis2-wsdl2code-maven-plugin:1.3 或者它的依赖项之一不能 已解决:采集失败 依赖项 org.apache.axis2:axis2-wsdl2code-maven-plugin:jar:1.3 (): 读取工件描述符失败 为了 org.apache.woden:woden:jar:1.0-incubating-M7b: 无法转移工件 org.apache.woden:woden:pom:1.0-incubating-M7b 从/到 jibx (http://jibx.sourceforge.net/maven): 没有可访问的连接器 存储库 jibx (http://jibx.sourceforge.net/maven) 的 使用可用的输入 legacy 工厂 WagonRepositoryConnectorFactory -> [帮助2]
这是我在 Eclipse 中得到的:
项目构建错误:无法解决的构建扩展:插件 org.apache.axis2:axis2-wsdl2code-maven-plugin:1.3 或者它的依赖项之一不能 已解决:采集失败 依赖项 org.apache.axis2:axis2-wsdl2code-maven-plugin:jar:1.3 () pom.xml /myProject 第 1 行 Maven 问题
在 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 安装的目录“plugins”中。我仍然遇到同样的错误。
我在 Win XP 上运行 Netbeans,在 Win XP 和 Mac 上运行 Eclipse,总是同样的错误。
有人知道我能做什么吗?
这是我的 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 文件。
-
如果你直接从maven构建项目,你能构建吗?只需转到 pom.xml 所在的路径,然后执行
mvn clean package并查看您得到的结果(mvn.bat 或 mvn.sh 需要在 PATH 中)。
标签: java eclipse netbeans maven