Collection of ant tasks for building blackberry application

Collectionofanttasksforbuildingblackberryapplications.HomeDocumentationSupportSourceForgeProjectPageDownloadsCreditsDocumentationRequirementsReference<rapc><sigtool><alx><jadtool>PreprocessorExamplesRequirementsRIMJDE(testedwith4.1andup)Java1.5orhigherApacheAnt1.7.xorhigherImportant!TheJavaJDK'sbindirectorymustbeinyoursystemsPATHenvironmentvariable.Forwindows:setPATH=%PATH%;%JAVA_HOME%\binForUnix:exportPATH=$PATH:$JAVA_HOME/binReferenceThe<rapc>and<sigtool>taskswillfirsttrytogetthe"jde.home"propertyfromtheproject.Ifthispropertyisnotset,thenthe"jdehome"attributemustbeexplicitlysetforthesetasks.<rapc>Runstherapccompiler.TherapctaskrunsthecompilerinmuchthesamewayastheRIMJDE.TheJDEproject/workspacefilesarehowevernotusedforbuildingcodfiles.Thenested<jdp>elementisusedtospecifyallcodfileproperties.Therapctaskbehavessimilartothejavactaskinthatitwillcheckthemodifiedtimeofthesourcefilesandcompareittothemodifiedtimeofthecodfile.Itwillcompileifoneormoreofthesourcefilesisnewerthantheexistingcodfile.ParametersAttributesDescriptionRequiredjdehomeSetstheJDEhomedirectory.Thisattributeisrequiredwhenthejde.homepropertyisnotdefinedattheprojectlevel.OptionaljdkhomeSetsanalternativeJVMhomedirectory.UsethistooverridetheversionoftheJVMusedtoexecutetherapccompiler.Whenthisattributeisnotdefined,thesystemsdefaultJVMisused.OptionalexepathExplicitlydefinethedirectorycontainingthepreverifycommandusedbytherapccompiler.Whennotdefined,thesystemsdefaultPATHisused.OptionalsrcdirDirectorycontainingsourcefiles.Thisattributeisrequiredwhenthenested<src>propertyisnotused.Anerroroccursifboththenested<src>propertyandthesrcdirattributeisspecified.OptionaldestdirOutputdirectoryof.codfile.Whennotdefined,thebasedirectoryoftheAntbuildfileisused.OptionaloutputNameofoutputfile,eg:[output].cod,[output].cso,etc.RequiredimportPathof.jarfilestoimport.Pathstringsconsistofrelativeorabsolutepathnamesdelimitedbya';'(Windows)or':'(Unix)character.Therapctaskwillalwaysaddthenet_rim_api.jarfilebydefault.Thisattributeisoptional.OptionalimportrefPathof.jarfilestoimportgivenasareferencetoapathdefinedelsewhere.Therapctaskwillalwaysaddthenet_rim_api.jarfilebydefault.Thisattributeisoptional.Optionaldefines':'or';'delimitedlistofpreprocessortags.Seethenotebelowregardingpreprocessorusage.OptionalquietTellstherapccommandtobelesschatty,defaulttofalse.OptionalverboseTurnonverboseoutputoftherapccompiler,defaultisfalse.OptionalnodebugTurnoffgenerationof.debugfiles,defaultisfalse.OptionalnowarnDisablewarningmessages,defaultisfalse.OptionalwarnerrorTreatallwarningsaserrors,defaultisfalse.OptionalnoconvertDon'tconvertimagestopng,defaultisfalse.OptionalnopreverifyDonotcallthepreverifyexecutable,defaultisfalse.OptionalgeneratesourcelistGeneratelistofsourcefilesintextfile.Setthistotruewhenjavareturns"CreateProcesserror=87"onWindows.Optional,defaultstofalse.OptionalsourcelistfileSetthenameofthesourcelistfile.Usethistooverridethenameofthefilecreatedwhengeneratesourcelistissettotrue.Thedefaultfilenameissources.txt.OptionalNestedelements<define>Zeroormorepreprocessortagdefinitionsnestedaselements.AttributesDescriptionRequiredtagNameofpreprocessortageg:THE_DEFINED_TAG.RequiredifDefinetagonlywhenthenamedpropertyisset.OptionalunlessDefinetagonlywhenthenamedpropertyisNOTset.Optional<src>Pathlikestructureoffilestocompile.The<src>elementcancontain<fileset>,<filelist>,oranyotherpathlikeelement.Apathdefinedelsewherecanbereferencedbysettingtherefidattributeof<src>.Ifthesrcdirattributewasnotdefined,the<src>elementmustcontainoneormoreresourcestocompile.<import>Pathlikestructureofjarfilestoimport.Therapctaskwillalwaysaddthenet_rim_api.jarfilebydefault.Thisparameterisoptional.<jdp>Collectionofcodfileproperties.Optionally,placethecodpropertiesinapropertiesfileandsetthefileattribute.Thepropertynamesmustmatchtheattributenamesinthetablebelow.AttributesDescriptionDefaultfilePropertiesfilecontainingtheprojectattributes.Propertynamesmustmatchthenamesdefinedbelow.typeTypeofcodfiletocreate.Validvaluesare"library","cldc","midlet".When"midlet"isspecified,themidletclasspropertyisrequired."cldc"titleModuletitle.Thetitleappearsbelowtheiconandintheapplicationslistonthedevice.vendorCompanyname.Thevendorstringappearsintheapplicationspropertiesonthedevice.versionModuleversionnumber.Versionnumberstringsmustcontainonlynumbersanddots.0.0descriptionModuledescription.Thedescriptionstringappearsintheapplicationpropertiesonthedevice.argumentsSpacedelimitedlistofargumentspassedtothemainmethod.midletclassFullyqualifiedclassnameoftheclassextendingjavax.microedition.midlet.MIDlet.systemmoduleSettotrueforasystemmodule.Systemmodulesruninthebackgroundanddonothaveanicononthehomescreen.falserunonstartupSettotrueifapplicationshouldstartwhendevicestarts.falsestartuptierStartuppriorityrelativetootherapplications.Validvaluesare0-7,lowervalue=higherpriority.7ribbonpositionPositionoficoninribbon.Highervaluesmovetheiconclosertothetopoftheribbon.0nameresourcebundleNameofresourcebundlethatcontainsthemoduletitle,eg:ca.slashdev.MyAppResourcesnameresourceidTheidoftheresourcethatcontainsthemoduletitle,eg:1234.iconRibbonicon.Pathmustberelativetodestdir,eg:../img/ribbon1.pngUseacommadelimitedlisttosetmultipleicons.focusiconRibbonfocusicon(&gt;=JDE4.7).Pathmustberelativetodestdir,eg:../img/focus1.png.Useacommadelimitedlisttosetmultiplefocusicons.<entry>Nestedelementof<jdp>.ContainsattributesforspecifyinganalternateentrypointforCLDCapplications.Itcontainsasubsetofattributesavailablein<jdp>.Optionally,placeentrypointpropertiesinapropertiesfileandsetthefileattribute.Thepropertynamesmustmatchtheattributenamesinthetablebelow.AttributesDescriptionDefaultfilePropertiesfilecontainingtheprojectattributes.Propertynamesmustmatchthenamesdefinedbelow.titleFornon-systemmodules,definesthetitlefortheribbonicon.argumentsSpacedelimitedlistargumentspassedtothemainmethod.systemmoduleSettotrueforasystemmodule.Systemmodulesruninthebackgroundanddonothaveanicononthehomescreen.falserunonstartupSettotrueifapplicationshouldstartwhendevicestarts.falsestartuptierStartuppriorityrelativetootherapplications.Validvaluesare0-7,lowervalue=higherpriority.7ribbonpositionPositionoficoninribbon.Highervaluesmovetheiconclosertothetopoftheribbon.0nameresourcebundleNameofresourcebundlethatcontainsthemoduletitle,eg:ca.slashdev.MyAppResourcesnameresourceidTheidoftheresourcethatcontainsthemoduletitle,eg:1234.iconRibbonicon.Pathmustberelativetodestdir,eg:../img/ribbon1.pngUseacommadelimitedlisttosetmultipleicons.focusiconRibbonfocusicon(&gt;=JDE4.7).Pathmustberelativetodestdir,eg:../img/focus1.png.Useacommadelimitedlisttosetmultiplefocusicons.ifIncludeentrypointwhenthenamedpropertyisset.unlessIncludeentrypointwhenthenamedpropertyisNOTset.<sigtool>Sigtooltaskwilllaunchthesignaturetoolonagivencodfileorsetofcodfiles.Ifasinglecodfileisspecified,thenafilewillbecreatedalongsidethecodfiletomarkitassigned.ParametersAttributesDescriptionRequiredjdehomeSetstheJDEhomedirectory.Thisattributeisrequiredwhenthejde.homepropertyisnotdefinedattheprojectlevel.OptionalcodfileSinglecodfiletosign.OptionalforcecloseClosesignaturetoolevenifsignaturefailed.Defaultisfalse.OptionalcloseCloseaftersignaturerequestifnoerrorshaveoccurred.Defaultistrue.OptionalrequestRequestsignaturewhenapplicationlaunches.Defaultistrue.OptionalpasswordRemovestheinteractivepasswordprompt.Thisimplicitlysets"close"and"request"totrue.OptionalNestedelementsSigtooltasksupportsselectingcodfilesusingnestedresourcecollectionssuchas<fileset>and<filelist>.<alx>Alxtaskcreatesadirectorystructureofcodfilesandan.alxfile.Thepurposeofthetaskistogenerateadirectorythatcanbeeasilyzippedforcreatinganinstallationpackage.Thereforecodfilesarealwayscopiedtothedestinationdirectory.Thetaskfullysupportsgeneratingexpressionsthatlimitwhichfileswillbeselectedbytheapplicationloader(Loader.exe)basedonOSversion.TotargetaspecificversionoftheBlackBerrysoftwareseteitherorbothbothofthegreaterthanandlessthanattributesinthe<application>or<codset>tags.ParametersAttributesDescriptionRequireddestdirDestinationdirectorfor.codfilesand.alxfile.Ifthedirectorydoesnotexist,itwillbecreated.RequiredfilenameNameof.alxfiletogenerate.RequiredNestedelements<application>Nestedelementsof<alx>.Theidattributeisrequired.Theremainingattributesareforinformationpurposesonlyintheapplicationloaderprogram(Loader.exe).AttributesDescriptionRequiredidUniqueidoftheapplication,eg:com.mycompany.myapp.RequiredfileOptionallyspecifyapropertiesfileofapplicationattributes,mustmatchnamesdefinedbelow.NOTE:'title'isrecognizedasanaliasfor'name'sopropertiesfilescreatedfor<jdp>typecanbeusedhere.OptionalnameApplicationname.OptionaldescriptionApplicationdescription.OptionalversionVersionnumber,eg:1.0OptionalvendorVendorstring,eg:MyCompany.OptionalcopyrightCopyrightinformation.OptionalgreaterthanOnlyinstallapplicationonversionsoftheBlackBerrysoftwaregreaterthanthegivenversion.OptionalgreaterthanequalOnlyinstallapplicationonversionsoftheBlackBerrysoftwaregreaterthanorequaltothegivenversion.OptionallessthanOnlyinstallapplicationonversionsoftheBlackBerrysoftwarelessthanthegivenversion.OptionallessthanequalOnlyinstallapplicationonversionsoftheBlackBerrysoftwarelessthanorequaltothegivenversion.Optional<codset>Oneormorenestedelementsof<application>element.Codfilesmustbelistedusingnestedresourcecollectionssuchas<fileset>and<filelist>.AttributesDescriptionRequireddirDirectoryforcodfilesindestinationdirectory.OptionalgreaterthanOnlyinstallcodfilesonversionsoftheBlackBerrysoftwaregreaterthanthegivenversion.OptionalgreaterthanequalOnlyinstallcodfilesonversionsoftheBlackBerrysoftwaregreaterthanorequaltothegivenversion.OptionallessthanOnlyinstallcodfilesonversionoftheBlackBerrysoftwarelessthanthegivenversion.OptionallessthanequalOnlyinstallcodfilesonversionoftheBlackBerrysoftwarelessthanorequaltothegivenversion.Optional<jadtool>Simpletaskthattakesaninput.jadfileandrewritesitwithoneormorenewcodfiles.The.jadfileisupdatedwithaccurate.codfilesizesandSHA1checksums.Thecodfilesarecopiedtothedirectorywherethe.jadfileiscreated.Ifthecodfilecontainssiblings,thecodfileisautomaticallyextracted.ParametersAttributesDescriptionRequiredinputInput.jadfile.RequireddestdirDestinationdirectoryforcodfilesandnewjadfile.RequiredNestedelementsJadtooltasksupportsselectingcodfilesusingnestedresourcecollectionssuchas<fileset>and<filelist>.Atleastonecodfilemustbeselected.<override>Nestedelementsof<jadtool>.Providestheabilitytoaddand/orupdatefieldsinthedestination.jadfile.AttributesDescriptionRequiredkeyNameof.jadpropertytoadd/changeRequiredvalueNewvaluefor.jadpropertyRequiredPreprocessorApparentlysinceversion4.0,rapccompilerhashadsupportforasimplesetofpreprocessormacros.Tousethepreprocessoryoumust:enableprocessingonaperfilebasisbyplacing//#preprocessintheveryfirstlineofeach.javafileuse//#ifdef<tag>,//#ifndef<tag>tobeginablockoftextthatwillbeconditionallycompilediftheTAGisdefinedorundefinedrespectivelyuse//#elseafter//#ifdef<tag>or//#ifndef<tag>closeconditionalblockswith//#endifPreprocessordefinescanbespecifiedasacolonorsemi-colondelimitedlistasanattributeofthe<rapc>tagORzeroormorenestedelements.ExamplesExample1<!--bareminimumusage--><rapcoutput="ca_slashdev_MyKickAssApp"srcdir="${src.dir}"jdehome="${jde.home}"></rapc>Example2<!--usesjde.homepropertyfromproject,specifiesapptitle,vendor,etc--><propertyname="jde.home"location="c:/jde4.1"></property>...<rapcoutput="ca_slashdev_MyKickAssApp"srcdir="${src.dir}"><jdptitle="KickAssApp"vendor="Slashdev"version="1.0"type="cldc"></jdp></rapc>Example3<!--usefilesettoselectsourcefiles,importdependencylib--><propertyname="jde.home"location="c:/jde4.1"></property>...<rapcoutput="ca_slashdev_MyKickAssApp"><jdptitle="KickAssApp"vendor="Slashdev"version="1.0"type="cldc"></jdp><src><filesetdir="${src.dir}"><includesname="**/*.java"></includes><includesname="**/*.rrc"></includes></fileset></src><importlocation="../libKickAss/ca_slashdev_libKickAss.jar"></import></rapc>Example4<!--usethepreprocessor--><rapcoutput="ca_slashdev_MyKickAssApp"srcdir="${src.dir}"defines="TAG1;TAG2"><definetag="TAG3"></define><definetag="TAG4"></define></rapc>Example5<!--signsinglecodfile--><sigtooljdehome="${jde.home}"codfile="build/ca_slashdev_MyKickAssApp.cod"></sigtool>Example6<!--jde.homepropertyfromproject,filesetselectsmultiplecodfiles--><propertyname="jde.home"location="c:/jde4.1"></property>...<sigtoolpassword="1234"><filesetdir="build"includes="*.cod"></fileset></sigtool>Example7<!--simpleexample,createzipfile--><alxdestdir="release"filename="myapp.alx"><applicationid="ca.slashdev.myapp"name="MyApp"><codset><filesetdir="build"includes="*.cod"></fileset></codset></application></alx><zipdestfile="release.zip"basedir="release"></zip>Example8<!--codfilesforspecificversionsofOS--><alxdestdir="release"filename="myapp.alx"><applicationid="ca.slashdev.myapp"name="MyApp"><codset><filesetdir="build"includes="*.cod"></fileset></codset><!--4.1uptobutnotincluding4.2--><codsetgreaterthanequal="4.1"lessthan="4.2"><filesetdir="build41"includes="*.cod"></fileset></codset><!--4.2.0only--><codsetgreaterthanequal="4.2.0"lessthan="4.2.1"><filesetdir="build42"includes="*.cod"></fileset></codset><!--4.2.1andabove--><codsetgreaterthanequal="4.2.1"><filesetdir="build421"includes="*.cod"></fileset></codset></application></alx><zipdestfile="release.zip"basedir="release"></zip>Example9<!--jadtooltaskisprettysimple--><jadtoolinput="ca_slashdev_myapp.jad"destdir="ota"><filesetdir="build"includes="*.cod"></fileset></jadtool>Example10<!--overridethenameoftheapplicationtitleinOptions/Applicaions--><jadtoolinput="ca_slashdev_myapp.jad"destdir="ota"><filesetdir="build"includes="*.cod"></fileset><overridekey="MIDlet-Name"value="MyTitle"></override></jadtool>Sitepoweredby:|Markdown|MagpieRSSTasks</rapc></tag></tag></tag></tag></jadtool></override></filelist></fileset></jadtool></filelist></fileset></application></codset></jdp></alx></application></codset></application></alx></filelist></fileset></sigtool></jdp></jdp></entry></jdp></import></src></src></filelist></fileset></src></src></define></src></src></jdp></rapc></sigtool></rapc></jadtool></alx></sigtool></rapc>