如何在 IBM RAD 中使用 ant 进行构建
全部, 我们有多个在 IBM RAD 7.5 中开发的应用程序。 由于 RAD 确实构建了所需的所有应用程序,因此我想知道如何使用 ant 文件实现相同的目标。
我想知道的是,除了我的应用程序特定库(我会知道它们在哪里等)之外,我的应用程序还应该指向哪些其他 jar 文件?
我正在谈论 IBM WAS 运行时库等,以便我的应用程序能够成功构建。 IBM 有这方面的标准指南吗?
谢谢。
All,
we have multiple applications that we develop in IBM RAD 7.5.
Since, RAD does build all the applications that are required, I was wondering how can I achieve the same using ant files.
What I wanted to know is apart from my application specific libraries (that I will know where they are etc), which other jar files should my application point to?
I am talking about IBM WAS runtime libraries etc, so that my application builds successfully.
Is there a standard guideline by IBM on this?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
WebSphere Application Server 7.0 及更高版本中的 WAS_HOME/dev/ 中提供的 JAR(例如 was_public.jar 或 j2ee.jar)专门用于此目的。
The JARs provided in WAS_HOME/dev/ in WebSphere Application Server 7.0 and later, such as was_public.jar or j2ee.jar, are intended specifically for this purpose.
@bkail 的答案可能就是您想要的如果您使用的是较新版本的 WAS 之一(我没有 v7 或 v8 安装需要验证)。
另一个选择是扩展已添加到 RAD Java 构建路径中的服务器运行时库,您将看到要包含在 Ant 构建中的 jar。
然而,如果您实际上在 RAD 中运行,您将指向一个完整的服务器运行时,其中包含的内容超出了您简单编译所需的内容。在这种情况下,您可以添加“WebSphere Application Server vX 存根”运行时之一来查看其中包含哪些 jar;它们是编译的最低限度。
该环境中的具体 jar 取决于您的 WAS 版本、任何已安装的功能包,甚至可能包括 Fixpack 级别。在许多情况下 - 取决于您使用的 API - 编译所需的只是
j2ee.jar
。(您可能已经意识到这一点,但请记住,您只需要类路径中的那些 jar 进行编译,您不想将它们部署在 WAR 中,因为它们已经是 WAS 的一部分。)
@bkail's answer is probably what you want if you're on one of those more recent versions of WAS (I don't have v7 or v8 installation to verify).
Another option is to expand the Server Runtime library that you have added to your RAD Java Build Path, you'll see the jars you want to include for your Ant build.
However, if you're actually running within RAD, you'll be pointing to a full server runtime which contains more than you need to simply compile. In that case, you can add one of the "WebSphere Application Server vX stub" runtimes just to see which jars those include; they are the minimum for compiling.
Which specific jars are in that environment will depend on your version of WAS, any installed Feature Packs, and probably even Fixpack levels. In many cases - depending on which APIs you're using - all that's needed to compile is
j2ee.jar
.(You probably already realize this, but remember that you only need those jars in your classpath to compile, you don't want to deploy them in your WAR since they're already part of WAS.)