java – Maven 2.2.1无法使用m2eclipse构建EAR项目
发布时间:2020-12-15 02:24:33 所属栏目:Java 来源:网络整理
导读:我在使用m2 eclipse项目构建器在 Eclipse 3.6中使用Maven构建EJB EAR时遇到了问题.奇怪的是,手动构建(在命令行上或“运行为 – Maven构建”)工作正常.我已经设置Eclipse以使用外部Maven 2.2.1安装. 错误消息如下: Build errors for my-app; org.apache.mave
我在使用m2
eclipse项目构建器在
Eclipse 3.6中使用Maven构建EJB EAR时遇到了问题.奇怪的是,手动构建(在命令行上或“运行为 – > Maven构建”)工作正常.我已经设置Eclipse以使用外部Maven 2.2.1安装.
错误消息如下: Build errors for my-app; org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-ear-plugin:2.4.2:generate-application-xml (default-generate-application-xml) on project my-app: Failed to initialize ear modules 显然,application.xml描述符的生成由于某些我无法确定的原因而失败. 在错误日志视图中,我有以下消息: Unknown artifact type[test-jar] 我在一个论坛中读过,可能是由于“测试罐”依赖导致的“测试”范围缺失;但是,我对此进行了双重和三重检查,并且在我的pom.xml文件中找不到任何未编译的“test-jar”依赖项. 我在mvn help中找到了以下条目:effective-pom虽然: <dependency> <groupId>org.jboss.test</groupId> <artifactId>jboss-test</artifactId> <version>1.1.4.GA</version> <exclusions> <exclusion> <artifactId>log4j</artifactId> <groupId>apache-log4j</groupId> </exclusion> </exclusions> </dependency> <!-- ... ---> <dependency> <groupId>jboss.jms-integration-tests</groupId> <artifactId>integration-mdb20</artifactId> <version>1.0.1.GA</version> </dependency> <dependency> <groupId>jboss.jms-integration-tests</groupId> <artifactId>integration-mdb20-durable</artifactId> <version>1.0.1.GA</version> </dependency> <dependency> <groupId>jboss.jms-integration-tests</groupId> <artifactId>integration-mdb20-selector</artifactId> <version>1.0.1.GA</version> </dependency> <dependency> <groupId>jboss.jms-integration-tests</groupId> <artifactId>integration-mdb20-userTransaction</artifactId> <version>1.0.1.GA</version> </dependency> <dependency> <groupId>jboss.jms-integration-tests</groupId> <artifactId>integration-mdb20-userTransactionDups</artifactId> <version>1.0.1.GA</version> </dependency> <dependency> <groupId>jboss.jms-integration-tests</groupId> <artifactId>jms-integration-tests</artifactId> <version>1.0.1.GA</version> </dependency> 我不知道这些依赖关系来自哪里,或者它们是否相关. 有什么建议? 解决方法
要找到依赖项的来源,请在m2eclipse的Maven POM编辑器中打开您的pom.在“依赖关系层次结构”选项卡的右侧,是已解析的依赖关系列表.这与有效pom依赖列表同义.选择右侧的任何依赖项以及依赖项的来源将显示在左侧.
HTH (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |