简体   繁体   English

Eclipse m2e,工作空间解析和JBoss部署问题

[英]Eclipse m2e, workspace resolution and JBoss deployment issues

I'm using eclipse to work on a number of Maven projects. 我正在使用eclipse处理多个Maven项目。 In particular one is a WAR project (let's call it project-a ) which has a dependency on a JAR project (let's call it project-b ). 特别是一个WAR项目(我们称其为project-a ),它依赖于JAR项目(我们称其为project-b )。

When I try to deploy to JBoss 7.1 the WAR project, the deployiment will fail, with JBoss complaining about project-bx.xxSNAPSHOT.jar being empty zip file. 当我尝试将WAR项目部署到JBoss 7.1时,部署将失败,JBoss抱怨project-bx.xxSNAPSHOT.jar是空的zip文件。

In fact if I open the generated war with an archiver, I can see that project-bx.xxSNAPSHOT.jar is not beign embedded as a zip file, but a folder. 实际上,如果我使用存档器打开生成的战争,我可以看到project-bx.xxSNAPSHOT.jar不是作为zip文件而是作为文件夹被良性嵌入的。

The issue is only present in this scenario. 仅在这种情况下存在此问题。

When I create the the WAR from command line, from Eclipse with project-b closed or workspace resolution disabled, the WAR will contain a zip as expected. 当我从命令行,关闭了project-b或禁用工作空间解析的Eclipse中创建WAR时,WAR将包含一个预期的zip。

If I deploy the WAR from Eclipse, with the JAR project closed, or workspace resolution disabled, the deployment will succeed. 如果我从Eclipse部署了WAR,而JAR项目已关闭,或者工作空间解析已禁用,则部署将成功。

Deployments to a Glassfish server will work, even in the former case. 即使在前一种情况下,也可以部署到Glassfish服务器。

I'm not even sure which one to blame, JBoss or Eclipse, but I'll be happy with any solution that either tells m2eclipse to always bundle the zip, or JBoss to be less picky about what I'm deploying on it. 我什至不知道应该归咎于JBoss还是Eclipse,但是我对任何一种告诉m2eclipse总是捆绑zip的解决方案感到满意,或者让JBoss对我在其上部署的内容不那么挑剔。

Edit: I'm using the following versions of the software 编辑:我正在使用以下版本的软件

Spring Tool Suite 3.4.0 (Not sure about which version of Eclipse it uses) m2e 1.3.1.20130219 JBoss 7.1.1.Final Spring Tool Suite 3.4.0(不确定使用的是哪个版本的Eclipse)m2e 1.3.1.20130219 JBoss 7.1.1.Final

It seems to be a bug of JBoss 7.1.1: 这似乎是JBoss 7.1.1的错误:

https://issues.jboss.org/browse/AS7-4704 https://issues.jboss.org/browse/AS7-4704

The issue has been resolved in version 7.1.3, which is not available as a download in binary form, so I'll have to either compile it by myself, or disable workspace integration when working with WARs 该问题已在版本7.1.3中解决,该版本不能以二进制形式下载,因此我必须自己编译,或者在使用WAR时禁用工作区集成。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM