0
  1. I am building a bat file which automatically adds android environment to my worklight project and produce me with the apk file and worklight .war and .wlapp files to my destined location.
  2. I have completed and everything works fine. i am using mfp bulid -d command to build the project and i have modifided the ant file in the MobileFirstServer Generator so that the above command give me .war file of the project.
  3. Now my requirement is i want to build my project to a remote server so that my project.properties file in the android also gets updated with the serverip which i provide and i want to do this with the mobilefirst cli command since i am using a bat file and executing the commands.
  4. I have seen this in the CLI build.xml file so this means if i have a build.properties file in my project anywhere i dont know exactly where it will take the ip,root,etc from that file.

XML

<!-- specify properties in this file or loaded from build.properties
  <property name="worklight.server.install.dir" value=""/>
  <property name="worklight.hostname" value="localhost"/>
  <property name="worklight.port" value="10080"/>
  <property name="worklight.username" value=""/>
  <property name="worklight.password" value=""/>
  <property name="worklight.app.dir" value=""/>
  <property name="worklight.app.environments" value="common,iphone,android,blackberry10,windowsPhone8,windows8,ipad,mobileWebApp"/>
  -->
Kawinesh S K
  • 3,148
  • 1
  • 16
  • 29

2 Answers2

0

In current releases of Worklight/MFP (6.x - 7.0), the CLI tool does not provide the ability to alter the IP address to a remote server prior to the build.

The workaround is to manually edit the wlclient.properties (Android, WP8) or worklight.plist (iOS) files in order for the application to connect to the remote server.

Idan Adar
  • 44,156
  • 13
  • 50
  • 89
0
  1. I have Done what i wanted via build.properties file.
  2. Placed it in the Project folder of Worklight Project.

build.properties file has the following things in it

worklight.hostname=111.111.11.11
worklight.port=9090

Note: The above works only when internet connectivity is not present (i.e your ip-address should not be present for your system) This is an issue which i have noted. if your internet connectivity is there it will take your current ip address.

Kawinesh S K
  • 3,148
  • 1
  • 16
  • 29