Topic
  • 4 replies
  • Latest Post - ‏2012-10-12T09:49:47Z by RaviTamada
RaviTamada
RaviTamada
29 Posts

Pinned topic IBM Worklight 5.0 > Ant Tasks

‏2012-10-09T12:12:46Z |
Hi IBM Worklight Support Team:

Based on the steps that are provided in ‘Module_30_-_Team_Development_using_RTC.pdf’ document, I am trying to Building and deploying hybrid resources to Worklight Tomcat Server.
But I am not able to deploy the app to Worklight Tomcat Server. What is the correct way of specifying the ‘worklightServerHost’ attribute value for ‘adapter-deployer’ task?
Please have a look at enclosed screen shots/sample build files/log files.

Question1) When I am trying to build ‘GettingStarted’ WL Application, Following files are getting generated: ‘GettingStarted-all.wlapp’, ‘GettingStarted-android-1.1.wlapp’, ‘GettingStarted-blackberry-1.0.wlapp’, ‘GettingStarted-common.wlapp’.

Is it required to deploy all these four wlapp files to worklight server? OR is it sufficient to deploy only ‘GettingStarted-all.wlapp’ file?

Question2) I specified worklightServerHost attribute value as: ‘worklightServerHost="http://localhost:8080"’. IS this the right way of specifying the host URL? I am getting error. Please have a look at build.log file for error logs
app-builder 17:36:33,374 SUCCESS ApplicationBuilderTask Succesfully built environments: blackberry, common, android
echo build_wl_adapter D:/Mobility/Worklight5/WL_ANT_TASKS/wl.build/load/RTCcomponent/CoPWL5
adapter-builder Building zip: D:\Mobility\Worklight5\WL_ANT_TASKS\wl.build\output\CoPWL5\HttpAdapter.adapter
adapter-builder adding entry HttpAdapter-impl.js
adapter-builder adding entry HttpAdapter.xml
adapter-builder adding entry Worklight_WebservicesURLs.txt
adapter-builder adding entry getPolicyDetailsInXmlOutJsonTrans.xsl
adapter-builder adding entry getUserNameListInXmlOutJsonTrans.xsl
adapter-builder adding entry validatePolicyInXmlOutJsonTrans.xsl
echo deploy_test_wl_apps D:/Mobility/Worklight5/WL_ANT_TASKS/wl.build/output
adapter-deployer 17:36:34,794 ERROR AdapterDeployerTask Not Found; <html><head><title>Apache Tomcat/7.0.22 - Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body>

HTTP Status 404 - /console/api/adapters/upload

<HR size="1" noshade="noshade">

type Status report

message /console/api/adapters/upload

description The requested resource (/console/api/adapters/upload) is not available.

<HR size="1" noshade="noshade">

Apache Tomcat/7.0.22

</body></html>
buildApplication: duration 12 seconds

BUILD SUCCESSFUL
Ravi Tamada
  • IdanAdar
    IdanAdar
    741 Posts

    Re: IBM Worklight 5.0 &gt; Ant Tasks

    ‏2012-10-09T12:29:22Z  
    Regarding question 2), have you read through pages 17-23 in the following training module, which detail use of Ant?
    http://public.dhe.ibm.com/ibmdl/export/pub/software/mobile-solutions/worklight/docs/Module_42_-_Moving_from_Development_Environment_to_Remote_QA_and_Production_Servers.pdf

    Idan Adar
    QA Engineer
    IBM Worklight Mobile Platform
  • RaviTamada
    RaviTamada
    29 Posts

    Re: IBM Worklight 5.0 &gt; Ant Tasks

    ‏2012-10-09T12:29:31Z  
    i used following ANT file: Is this the right way of writing ant file?

    <?xml version="1.0" encoding="UTF-8"?>
    <project default="buildApplication" basedir=".">
    <target name="buildApplication">
    <taskdef resource="com/worklight/ant/defaults.properties">
    <classpath>
    <pathelement location="D:/Mobility/Worklight5/WL_ANT_TASKS/wl.build/worklight-ant.jar"/>
    </classpath>
    </taskdef>
    <echo> build_wl_apps D:/Mobility/Worklight5/WL_ANT_TASKS/wl.build/load/RTCcomponent/CoPWL5</echo>
    <delete dir="D:/Mobility/Worklight5/WL_ANT_TASKS/wl.build/output/CoPWL5"/>
    <record name="D:/Mobility/Worklight5/WL_ANT_TASKS/wl.build/output/build.log" loglevel="verbose" append="false"/>
    <app-builder nativeProjectPrefix="projectname" applicationFolder="D:/Mobility/Worklight5/WL_ANT_TASKS/wl.build/load/RTCcomponent/CoPWL5/apps/GettingStarted" outputFolder="D:/Mobility/Worklight5/WL_ANT_TASKS/wl.build/output/CoPWL5"></app-builder>

    <echo> build_wl_adapter D:/Mobility/Worklight5/WL_ANT_TASKS/wl.build/load/RTCcomponent/CoPWL5</echo>
    <record name="D:/Mobility/Worklight5/WL_ANT_TASKS/wl.build/output/build.log" loglevel="verbose" append="true"/>
    <adapter-builder folder="D:/Mobility/Worklight5/WL_ANT_TASKS/wl.build/load/RTCcomponent/CoPWL5/adapters/HttpAdapter" destinationFolder="D:/Mobility/Worklight5/WL_ANT_TASKS/wl.build/output/CoPWL5"></adapter-builder>

    <echo> deploy_test_wl_apps D:/Mobility/Worklight5/WL_ANT_TASKS/wl.build/output</echo>
    <adapter-deployer deployable="D:/Mobility/Worklight5/WL_ANT_TASKS/wl.build/output/CoPWL5/HttpAdapter.adapter" worklightServerHost="http://localhost:8080"/>
    <!--app-deployer deployable="D:/Mobility/Worklight5/WL_ANT_TASKS/wl.build/output/CoPWL5/GettingStarted.wlapp" worklightServerHost="http://localhost:8080"/-->

    </target>
    </project>
  • IdanAdar
    IdanAdar
    741 Posts

    Re: IBM Worklight 5.0 &gt; Ant Tasks

    ‏2012-10-10T08:31:35Z  
    Hi,

    As for question 1: it is enough to deploy GettingStarted-all.wlapp as it contains all the environments in it. So if you are looking to deploy all environments, use this file.

    As for question 2: the worklightServerHost value you have inputted is the default one, so you don't really need to specify it. Please try without using this property and see if the adapter deployment passes.
    Idan Adar
    QA Engineer
    IBM Worklight Mobile Platform
  • RaviTamada
    RaviTamada
    29 Posts

    Re: IBM Worklight 5.0 &gt; Ant Tasks

    ‏2012-10-12T09:49:47Z  
    • IdanAdar
    • ‏2012-10-10T08:31:35Z
    Hi,

    As for question 1: it is enough to deploy GettingStarted-all.wlapp as it contains all the environments in it. So if you are looking to deploy all environments, use this file.

    As for question 2: the worklightServerHost value you have inputted is the default one, so you don't really need to specify it. Please try without using this property and see if the adapter deployment passes.
    Idan Adar
    QA Engineer
    IBM Worklight Mobile Platform
    Hello IBM Worklight Support Team,

    Thanks for your clarifications.
    q1)Deploying the 'GettingStarted-all.wlapp' is deploying all other files. Thanks for your answer.

    q2) I tried to deploy wlapp & adapter files to server without using worklightServerHost attribute.
    but still i am not able to deploy the files to server. can you provide me a more details example on how to write the ant scripts? Thanks.
    Ravi Tamada