什么是org.eclipse.wst.common.component以及如何将其用于蚂蚁 [英] what is org.eclipse.wst.common.component and how to use it for ant

查看:1337
本文介绍了什么是org.eclipse.wst.common.component以及如何将其用于蚂蚁的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个eclipse工作区(工作),它有一个耳机项目,用于导出/将耳机部署到JBoss服务器。



然而,他们最近要求我创建一个可以构建工作区并创建耳朵的蚂蚁脚本,我已经成功完成了。当我尝试用这个使用蚂蚁脚本构建的耳朵来运行我的程序时出现问题;为了部署我只是复制所得的耳机文件并将其粘贴到JBoss / standalone / deployments文件夹并运行应用程序。



JBoss AS启动正常,但是当我做一个构建并通过eclipse部署时,我收到一些异常,阻止我的应用程序,我没有得到。当使用7zip查看两个耳朵文件时,两个耳朵文件是相同的,但是我在eclipse工作区中看到,在耳朵项目中,一个.settings文件夹有4个文件,其中一个是org.eclipse.wst.common。组件,我猜这个(如果不是全部4个文件)在部署时是必需的。



在部署耳朵时,ecplise使用这个.settings文件夹和里面的文件?在这个过程中会发生什么?并且如何在蚂蚁脚本中复制它,以便我的应用程序从ant或eclipse构建运行相同?



编辑 / strong>



只需添加一下.settings文件夹中的所有文件都不会被打包在ear文件中,所以我猜想他们是以某种方式使用的当eclipse做一个构建/部署,但它不会放在最后的耳朵产品中



谢谢

解决方案

Eclipse使用 org.eclipse.wst.common.component 中的数据来计算部署所需的依赖项。该文件对应于Eclipse中发现的设置,当右键单击EAR项目>属性>部署大会



例如。如果您的EAR项目对WAR项目有依赖关系,则Eclipse知道在部署时包含WAR,因为部署程序集设置存储在 org.eclipse.wst.common



使用Ant构建EAR时,需要手动添加这些依赖项(不依赖于Eclipse元数据)


I have an eclipse workspace (for work) that has an ear project that I use to "export"/deploy an ear file to a JBoss server.

However, they recently asked me to create an ant script that can build the workspace and create the ear, and I have done this successfully. The problem arises when I try to run my program with this ear that was built using the ant script; for deploying I'm simply copying the resulting ear file and pasting it into the JBoss/standalone/deployments folder and running the application.

The JBoss AS starts fine, but then I get a few exceptions that halt my application that I do not get when I do a build and deploy through eclipse. The two ear files are identical when viewing the two ear files using 7zip, however I see in the eclipse workspace, in the ear project, theres a .settings folder that has 4 files, one of them being org.eclipse.wst.common.component and I'm guessing this (if not all 4 files) is necessary when deploying somehow.

Does ecplise use this .settings folder and the files inside when deploying an ear? What happens during this process? and how can I replicate it in an ant script so that my application runs identically from either ant or eclipse builds?

EDIT

let me just add that none of the files in the .settings folder get packaged up in the ear file, so I'm guessing they're somehow used when eclipse does a build/deploy, but it doesnt get placed in the final ear product

thank you

解决方案

Eclipse uses the data in org.eclipse.wst.common.component to figure out the dependencies needed for deployment. The file corresponds to the settings found in Eclipse when Right-clicking on an EAR project > Properties > Deployment Assembly.

E.g. if your EAR project has a dependency on a WAR project then Eclipse knows to include the WAR when deploying because of the Deployment Assembly settings which get stored in org.eclipse.wst.common.component

When building the EAR using Ant you need to add these dependencies manually (without relying on Eclipse metadata)

这篇关于什么是org.eclipse.wst.common.component以及如何将其用于蚂蚁的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆