问题
I am trying to use BBM in my application,I want to make the ant build for it
Bascially there is an implementationBBM a library project,and it in it i am adding the JAR file,and i want to make the ant build for this library application from my main CLDC application ant build file,
<?xml version="1.0" encoding="UTF-8"?>
<project name="Building project" default="build" basedir=".">
<property name="jde.home" value="D:\Eclipse3.6\plugins\net.rim.ejde.componentpack5.0.0_5.0.0.25\components" />
<property name="sigtool.jde" value="D:\Eclipse3.6\plugins\net.rim.ejde.componentpack5.0.0_5.0.0.25\components" />
<taskdef resource="bb-ant-defs.xml" classpath="lib/bb-ant-tools.jar" />
<property name="src.dir" value="src" />
<property name="lib.dir" value="lib" />
<property name="signingpassword" value="Test123#"/>
<target name="clean">
<delete>
<fileset dir="release\5.0" />
</delete>
</target>
<target name = "build-Interface" depends="clean" >
<rapc destdir="release\5.0" output="BBMInterface" >
<jdp title="BBM Implementation"
vendor="MySample App"
version="1.0"
type="library"
systemmodule = "true"
description="BBMImpl" runonstartup="true" startuptier="6"
/>
<src>
<fileset dir="../BBMInterface/src">
<include name="**/*.java" />
</fileset>
</src>
</rapc>
</target>
<target name = "build-Impl" depends="build-Interface" >
<rapc destdir="release\5.0" output="BBMImpl" >
<jdp title="BBM Implementation"
vendor="MainBBMApp"
version="1.0"
type="library"
systemmodule = "true"
description="BBMImpl" runonstartup="true" startuptier="6"
/>
<src>
<fileset dir=".">
<include name="lib/net_rim_bb_qm_platform.jar" />
</fileset>
<fileset dir="../BBMImpl/src">
<include name="**/*.java" />
</fileset>
</src>
</rapc>
</target>
<target name = "build" depends="build-Impl">
<rapc destdir="release\5.0" output="MainBBMApp">
<jdp title="MainBBMApp"
type="cldc"
description="MainBBMApp"
runonstartup="true"
systemmodule="true"
StartupTier="7"
vendor="MainBBMApp"
version="1.0">
<entry title="MainBBMApp"
description="MainBBMApp"
icon="../../res/images/icon.png"
/>
</jdp>
<src>
<fileset dir="${src.dir}">
<include name="**/*.java" />
<include name="**/*.png" />
<include name="**/*.gif" />
<include name="**/*.bin" />
</fileset>
<fileset dir="res\images">
<include name="**/*.java" />
<include name="**/*.png" />
<include name="**/*.gif" />
<include name="**/*.bin" />
</fileset>
</src>
</rapc>
</target>
<target name="sign" depends="build">
<java jar="${sigtool.jde}\bin\SignatureTool.jar" fork="true" dir="release\5.0" failonerror="true">
<arg line=" -a -c -C *.cod -p ${signingpassword}" />
</java>
</target>
<target name="ota" depends="sign">
<jadtool input="release\5.0\MainBBMApp.jad" destdir="release\5.0\ota">
<fileset dir="release\5.0" includes="*.cod" />
</jadtool>
</target>
</project>
and while running ant build i am getting error as
[rapc] Error!: Error: java compiler failed: javac -source 1.3 -target 1.3 -g -O -d C:\DOCUME~1\rakesh\LOCALS~1\Temp\rapc_4064de32.dir -bootclas ...
and the detailed issue of the enter link description here
I think it is not using or detecting net_rim_bb_qm_platform.jar file.Can anyone help me on this
Buildfile: D:\RakeshBBWorkspace\testmessenger\MainBBMApp\buildtest.xml
clean:
build-Interface:
[rapc] Compiling 1 source files to BBMInterface.cod
[rapc] Warning!: No definition found for exported static item: .libMain(String[])
build-Impl:
[rapc] Compiling 1 source files to BBMImpl.cod
[rapc] D:\RakeshBBWorkspace\testmessenger\BBMImpl\src\mypackage\BBMBridgeImpl.java:3: package net.rim.blackberry.api.bbm.platform does not exist
[rapc] import net.rim.blackberry.api.bbm.platform.BBMPlatformApplication;
[rapc] ^
[rapc] D:\RakeshBBWorkspace\testmessenger\BBMImpl\src\mypackage\BBMBridgeImpl.java:4: package net.rim.blackberry.api.bbm.platform does not exist
[rapc] import net.rim.blackberry.api.bbm.platform.BBMPlatformContext;
[rapc] ^
[rapc] D:\RakeshBBWorkspace\testmessenger\BBMImpl\src\mypackage\BBMBridgeImpl.java:5: package net.rim.blackberry.api.bbm.platform does not exist
[rapc] import net.rim.blackberry.api.bbm.platform.BBMPlatformManager;
[rapc] ^
[rapc] D:\RakeshBBWorkspace\testmessenger\BBMImpl\src\mypackage\BBMBridgeImpl.java:7: cannot find symbol
[rapc] symbol: class BBMBridge
[rapc] public final class BBMBridgeImpl extends BBMBridge {
[rapc] ^
[rapc] D:\RakeshBBWorkspace\testmessenger\BBMImpl\src\mypackage\BBMBridgeImpl.java:18: cannot find symbol
[rapc] symbol : class BBMPlatformContext
[rapc] location: class mypackage.BBMBridgeImpl
[rapc] BBMPlatformContext _context;
[rapc] ^
[rapc] D:\RakeshBBWorkspace\testmessenger\BBMImpl\src\mypackage\BBMBridgeImpl.java:20: cannot find symbol
[rapc] symbol : class BBMPlatformApplication
[rapc] location: class mypackage.BBMBridgeImpl
[rapc] private final BBMPlatformApplication _bbmApp = new BBMPlatformApplication(UUID);
[rapc] ^
[rapc] D:\RakeshBBWorkspace\testmessenger\BBMImpl\src\mypackage\BBMBridgeImpl.java:11: cannot find symbol
[rapc] symbol : variable BBMBridge
[rapc] location: class mypackage.BBMBridgeImpl
[rapc] if (BBMBridge.getInstance() == null) {
[rapc] ^
[rapc] D:\RakeshBBWorkspace\testmessenger\BBMImpl\src\mypackage\BBMBridgeImpl.java:12: cannot find symbol
[rapc] symbol : class BBMBridge
[rapc] location: class mypackage.BBMBridgeImpl
[rapc] BBMBridge instance = new BBMBridgeImpl();
[rapc] ^
[rapc] D:\RakeshBBWorkspace\testmessenger\BBMImpl\src\mypackage\BBMBridgeImpl.java:13: cannot find symbol
[rapc] symbol : variable BBMBridge
[rapc] location: class mypackage.BBMBridgeImpl
[rapc] BBMBridge.setInstance(instance);
[rapc] ^
[rapc] D:\RakeshBBWorkspace\testmessenger\BBMImpl\src\mypackage\BBMBridgeImpl.java:20: cannot find symbol
[rapc] symbol : class BBMPlatformApplication
[rapc] location: class mypackage.BBMBridgeImpl
[rapc] private final BBMPlatformApplication _bbmApp = new BBMPlatformApplication(UUID);
[rapc] ^
[rapc] D:\RakeshBBWorkspace\testmessenger\BBMImpl\src\mypackage\BBMBridgeImpl.java:24: cannot find symbol
[rapc] symbol : variable BBMPlatformManager
[rapc] location: class mypackage.BBMBridgeImpl
[rapc] _context = BBMPlatformManager.register(_bbmApp);
[rapc] ^
[rapc] D:\RakeshBBWorkspace\testmessenger\BBMImpl\src\mypackage\BBMBridgeImpl.java:29: cannot find symbol
[rapc] symbol : variable BBMPlatformContext
[rapc] location: class mypackage.BBMBridgeImpl
[rapc] if (error == BBMPlatformContext.ACCESS_BLOCKED_BY_USER) {
[rapc] ^
[rapc] 12 errors
[rapc] Error!: Error: java compiler failed: javac -source 1.3 -target 1.3 -g -O -d C:\DOCUME~1\rakesh\LOCALS~1\Temp\rapc_4064de32.dir -bootclas ...
Besides i tried adding like this way
<target name = "build-Impl" depends="build-Interface" >
<rapc destdir="release\5.0" output="BBMImpl" >
<jdp title="BBM Implementation"
vendor="My Systems"
version="1.0"
type="library"
systemmodule = "true"
description="BBMImpl" runonstartup="true" startuptier="6"
/>
<src>
<fileset dir="../BBMImpl/src">
<include name="**/*.java" />
</fileset>
</src>
<import location="lib/net_rim_bb_qm_platform.jar" />
</rapc>
</target>
So it searches for lib in MainBBMApp,So how could i make it search in BBMImpl library project,
or else Should i make the ant build separate for this partalone which in creates jar file,and then can i be using this jar file in my main build file of the app.
来源:https://stackoverflow.com/questions/7144609/how-to-make-ant-build-for-my-bbm-application-with-native-bb-jar