简体   繁体   English

什么是org.eclipse.wst.common.component以及如何将它用于ant

[英]what is org.eclipse.wst.common.component and how to use it for ant

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. 我有一个eclipse工作区(用于工作),它有一个ear项目,我用它来“导出”/部署一个ear文件到JBoss服务器。

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. 但是,他们最近要我创建一个可以构建工作区并创建耳朵的ant脚本,我已经成功完成了这项工作。 The problem arises when I try to run my program with this ear that was built using the ant script; 当我尝试用这个使用ant脚本构建的耳朵运行我的程序时出现问题; for deploying I'm simply copying the resulting ear file and pasting it into the JBoss/standalone/deployments folder and running the application. 用于部署我只是复制生成的ear文件并将其粘贴到JBoss / standalone / deployments文件夹中并运行应用程序。

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. JBoss AS开始很好,但后来我得到了一些例外,这些异常会停止我在通过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. 当使用7zip查看两个ear文件时,两个ear文件是相同的,但是我在eclipse工作区中看到,在ear项目中,有一个.settings文件夹,其中有4个文件,其中一个是org.eclipse.wst.common。我猜这个组件(如果不是全部4个文件)在某种程度上部署时是必要的。

Does ecplise use this .settings folder and the files inside when deploying an ear? ecplise在部署耳朵时是否使用此.settings文件夹和文件? 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? 如何在ant脚本中复制它,以便我的应用程序从ant或eclipse构建中运行相同?

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 我只想补充说.settings文件夹中的所有文件都没有打包到ear文件中,所以我猜他们在eclipse进行构建/部署时会以某种方式使用,但它并没有放在最终产品中

thank you 谢谢

Eclipse uses the data in org.eclipse.wst.common.component to figure out the dependencies needed for deployment. Eclipse使用org.eclipse.wst.common.component的数据来确定部署所需的依赖项。 The file corresponds to the settings found in Eclipse when Right-clicking on an EAR project > Properties > Deployment Assembly . Right-clicking on an EAR project > Properties > Deployment Assembly时,该文件对应于Eclipse中的设置。

Eg 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 例如,如果您的EAR项目依赖于WAR项目,则Eclipse会在部署时知道包含WAR,因为部署程序集设置存储在org.eclipse.wst.common.component

When building the EAR using Ant you need to add these dependencies manually (without relying on Eclipse metadata) 使用Ant构建EAR时,需要手动添加这些依赖项(不依赖于Eclipse元数据)

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

相关问题 Eclipse M2E更改org.eclipse.wst.common.component - Eclipse M2E changing org.eclipse.wst.common.component 使用Eclipse IDE编辑.settings / org.eclipse.wst.common.component - Edit .settings/org.eclipse.wst.common.component using Eclipse IDE Eclipse无法解析插件org.eclipse.wst.server.ui - Eclipse unable to resolve plugin org.eclipse.wst.server.ui 在 SWT 对话框中嵌入 org.eclipse.wst.sse.ui.StructuredTextEditor - embed org.eclipse.wst.sse.ui.StructuredTextEditor in SWT Dialog 如何扩展org.eclipse.wst.jsdt.internal.ui.javaeditor并使用cutom javaScript标签创建我们自己的Java脚本编辑器 - how to extends org.eclipse.wst.jsdt.internal.ui.javaeditor and create our own Java Script Editor with cutom javaScript tags 如何在Eclipse中使用Ant源? - How to use Ant sources with Eclipse? 如何在日食中使用ant进行预处理 - how to use ant in eclipse for preprocessing 如何增加org.eclipse.ant.core.antRunner的内存 - How increase memory of org.eclipse.ant.core.antRunner 访问工作空间\\.metadata\\.plugins\\org.eclipse.wst.server.core\\tmp0\\wtpwebapps\\中的文件 - Access files inside workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\ 找不到org.eclipse.wst.server.core.serverTypes扩展点的架构 - No schema found for the org.eclipse.wst.server.core.serverTypes extension point
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM