如何创建ear文件,并在其中包含war和jar文件 [英] how to create ear file, and include war and jar files inside that

查看:170
本文介绍了如何创建ear文件,并在其中包含war和jar文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试从命令提示符创建一个EAR文件。我用过

I am trying to create an EAR file from the command prompt. I have used

jar -cvf myServletWAR.ear . 

但我的问题是,如何让这个EAR文件在其中包含WAR文件和JAR文件?

But my question is, how can I get this EAR file to have WAR files and JAR files inside it?

我是否需要单独创建war文件并包含在ear文件中?

Do I need to create the war file separately and include in the ear file?

我可以'为此使用ANT文件,因为这个项目的限制很少。

I can't use the ANT file for this, as there are few restrictions on this project.

推荐答案

我的一个EAR文件的结构为如下:

One of my EAR files has structure as follows:

app.ear
  - APP-INF
    - lib
      // libraries (.jar) here
  - META-INF
    - MANIFEST.MF
    - weblogic-application.xml
  - module1.war
  - customlib.jar

此档案正在部署到WebLogic 10.3上。

This archive is being deployed onto WebLogic 10.3.

记住.ear只是一个ZIP文件,所以你总是可以用这种方式创建它,虽然看起来很乱。

Remeber .ear is just a ZIP file, so you can always create it this way, although it seems messy.

这篇关于如何创建ear文件,并在其中包含war和jar文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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