黑莓手机 - Ant脚本包括没有外部的依赖关系项目JAR [英] BlackBerry - Ant script to include JAR in project without external dependancies

查看:129
本文介绍了黑莓手机 - Ant脚本包括没有外部的依赖关系项目JAR的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是一个后续:<一href=\"http://stackoverflow.com/questions/9976940/blackberry-use-own-jar-file-in-own-project\">BlackBerry - 使用自己的工程自己的JAR文件&安培; <一href=\"http://stackoverflow.com/questions/8942230/blackberry-ant-build-script-for-more-complex-apps\">BlackBerry - 为更复杂的应用 Ant构建脚本。现在这个问题已经 解决以下

This is a follow-up to: BlackBerry - use own JAR file in own project & BlackBerry - Ant build script for more complex apps. This problem has now been solved below.

我想:


  1. 使用Ant( BB-ANT-工具)来构建我的图书馆到一个JAR文件

  2. 包括项目
  3. 的JAR文件
  4. 使用Ant 构建项目成COD,将在设备上运行(无外部COD文件)。

  1. use Ant (bb-ant-tools) to build my library into a JAR file
  2. include that JAR file in a project
  3. use Ant to build that project into a COD that will run on the device (without external COD files).

重要的部分是为使用Ant做构建的最后阶段

我已经找到了这个问题的所有文章使用Eclipse为最终建成阶段(细节处<一个href=\"http://stackoverflow.com/questions/9976940/blackberry-use-own-jar-file-in-own-project\">BlackBerry - 使用自己的项目自己的JAR文件)

All posts I have found for this problem use Eclipse for that final build stage (details at BlackBerry - use own JAR file in own project).


  1. 我可以建立库项目到使用Ant的JAR。

  2. 在Eclipse中,我可以在JAR文件添加到项目中,并构建它根据需要(单COD,没有外部的依赖关系)。它将在设备上运行。

  3. 在蚂蚁,我也可以做一个生成依赖于额外的COD库包含运行时code - 这是接近我所需要的

我可以建立与蚂蚁最终项目。但由此产生的COD文件的不包括任何运行code从我的库

Problem

I can build the final project with Ant. But the resulting COD file does not include any runtime code from my library.

很多帖子我看了节目如何可以用额外的COD文件库来完成。我想避免这种情况。

Many posts I have read show how this can be done using extra COD files for the library. I would like to avoid this.

我怎么能包括JAR到我的项目没有外部依赖,使用Ant?我相信这是可能的,因为我可以使用Eclipse做到这一点。

How can I include a JAR into my project without external dependencies, using Ant? I believe this is possible because I can do it using Eclipse.

我目前的解决方法是,包括我的SDK /库项目源$ C ​​$ C(按以下 esaj的回答),而不是作为一个JAR文件。这有在JAR的做法有一些缺点,但我在设备上运行成功构建。

My current workaround is to include my SDK / library project as source code (as per esaj's answer below), rather than as a JAR file. This has some disadvantages over the JAR approach, but I have a build that runs on the device successfully.

(我希望它能够交叉参照链接下面一长串这个问题好吗?)

(I hope its OK to cross-reference this question with the following long list of links?)

计算器链接:

  • Continuous Integration server for blackberry development? (and certificate signing) (I haven't had time to go through this one, but I think it looks promising)
  • Blackberry: Verificattion error when using Library project as External Jar
  • How to use External library jar file in Blackberry
  • Blackberry 5.0 - Add reference to a Java Library Project
  • How to add external jar or zip file in the Blackberry project
  • Blackberry Apps - Importing a code-signed jar into an application project
  • How to add library project with the current development project in blackberry

这人给其他环节 - 非常有用:

This one gives other links - quite useful:

  • Handling dependencies in blackberry development

这些不是那么有用:

  • In Blackberry, can we create common library that can be used by different applications?
  • BlackBerry Facebook SDK jar file
  • Adding and Testing Compatibility of External Jar to Blackberry Project
  • How to attach Jar in Blackberry
  • BlackBerry RIMAPPSA2 signing key required -- why?
  • Is there a list of classes, methods and API which will trigger RIMAPPSA2 permission when signing Blackberry application?

RIM:

  • javac -target parameter used by the rapc.exe tool
  • Add a .jar file dependency
  • Other jar added in BB project - using BB ant tools
  • Tutorial: How To Use 3rd Party Libraries in your Applications

推荐答案

你试过指向下RAPC在src部分图书馆吗?

Have you tried pointing to the library in the src section under rapc?

例如:

<rapc ...>
  <src>
    <fileset dir="${buildDirectory}">
      <include name="src/**/*.rrh" />
      <include name="src/**/*.rrc" />
      <include name="src/**/*.java" />
      <include name="res/**/*.*" />
      <!-- Libraries -->
      <include name="lib/**/*.*" />
    </fileset>
  </src>
</rapc>

这篇关于黑莓手机 - Ant脚本包括没有外部的依赖关系项目JAR的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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