How to make Ant build for my BBM application with native BB jar
Asked Answered
W

0

2

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.

Watthour answered 22/8, 2011 at 8:4 Comment(11)
There's really not enough to go on in the single message line you've included - could you paste the full stack trace? Also, roughly where in your buildfile is line 36?Yacano
I have updated full build.xml fileWatthour
Rakesh - can you not just paste the error stack trace in? That link doesn't go directly to anything.Yacano
Hi Martin,Did you got any idea of this error.Watthour
Rakesh - no I didn't - when I follow the link above to picasa it says 'Sorry, that page was not found.'Yacano
finally i succeeded in adding the error,Can you check with this and tell me.Watthour
Hi Martin,I updated the error in this page itselfWatthour
Rakesh - sorry not had a chance to look at this. I don't think the lib jar should appear under src. Perhaps under an import element of rapc instead? Reference: bb-ant-tools.sourceforge.net/docsYacano
i have added it the way you told me ,and it is in bottom,i appended in this page it self,Please check and tell me.Watthour
Rakesh - I don't have a way to reproduce your problem. I haven't built for BlackBerry for a couple of years. I thought you had to assemble jars into a single cod for deploy as you mention - rather than building separate cods and associating them.Yacano
@Watthour I want to know which of the targets is actually failing. Remove the depends parameters from your targets, and run each one manually. Tell me what fails pls - build-Interface or build-Impl or build?Lakesha

© 2022 - 2024 — McMap. All rights reserved.