ANT 作业调用 JDeveloper 以使用指定的部署文件创建 EAR 文件 [英] ANT job to invoke JDeveloper to create EAR file with specified deploy file

查看:32
本文介绍了ANT 作业调用 JDeveloper 以使用指定的部署文件创建 EAR 文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人问我是否有可能创建一个 ANT 脚本,该脚本可用于复制属性文件(与目标环境相关联)、创建 EAR 文件(可能使用 JDeveloper 部署文件)并将该 EAR 文件部署到目标 OC4J 容器.

I was asked about the possibility of creating an ANT script that could be use to copy property files (associated to target environment), create an EAR file (perhaps using JDeveloper deploy file), and deploy that EAR file to target OC4J container.

我问是否有人曾经通过使用 ANT 使用指定的部署"文件自动调用 JDeveloper 来创建 EAR 文件?或者是否可以绕过调用 JDeveloper.是否有任何示例 ANT 代码片段可以这样做,或任何可能有用的信息/提示.

I am asking if anyone ever successfully invoking JDeveloper automatically to create the EAR file by using specified 'deploy' file by using ANT? OR is it possible to by pass invoking JDeveloper at all. Is there any sample ANT code snippet to do so, or any information/hint that could be useful.

谢谢.

推荐答案

我不建议使用 JDevelopers 创建 EAR 文件,因为我坚信构建过程必须是自动充足的(即尽可能少的外部依赖项).

I would advise against using JDevelopers for creating an EAR file because I strongly believe that a build process must be autosufficient (i.e. as few external dependencies as possible).

使用 Ant,您可以简单地使用 Ear 任务(请记住Ear 任务是 Zip 任务 的子任务,即您也可以使用zipfilesetear 任务中).

Using Ant, you can simply use the Ear task (remember that the Ear task is a subtask of the Zip task, i.e. you can also use zipfileset inside the ear task).

我从未使用过 OC4J,但通常部署 EAR 文件只是将文件复制到正确的目录中(因此一个简单的 copy 任务就足够了).

I've never used OC4J but usually the deployment of an EAR file is just a matter of copying the file into the right directory (so a simple copy task would suffice).

这篇关于ANT 作业调用 JDeveloper 以使用指定的部署文件创建 EAR 文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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