1

I had an Ant build file working fine on Worklight v5.0.6. On porting to Worklight v6.0 I found out that there's a new mandatory attribute, worklightserverhost, for the app-builder task.

 <app-builder 
    applicationFolder="path/to/proj"
    environments="mobilewebapp,android,iphone"
    nativeProjectPrefix="myproj"
    worklightserverhost="?Here?" 
    outputFolder="where/to/put/it"/>

I can find no documentation of the value to put here or its significance; my guess is that it is supposed to be the value that was formerly in application-descriptor.xml and is now taken from worklight.properties when building in Worklight Studio, and hence it's not just the host but also the port and context root. Is that right?

Idan Adar
  • 44,156
  • 13
  • 50
  • 89
djna
  • 54,992
  • 14
  • 74
  • 117

1 Answers1

3

This attribute is now required due to, as you mentioned, the removal of worklightServerRootURL from application-descriptor.xml. So if you're using the app-builder Ant task you need to specify the host, port and context-root.
For example: worklightserverhost="http://9.148.22.4:10080/testProject"

Does this work for you?

I will open a documentation defect about the missing information; it seems more like the article(s) about the Ant task in 6.0 have not been updated in the IBM Worklight Information Center (adapters, apps).

Idan Adar
  • 44,156
  • 13
  • 50
  • 89
  • Work for me? I'm still experimenting, I expect that errors in this value may not show up until the application is running and then fails to connect. As you say it's the ant task documentation that most needs updating. – djna Jul 16 '13 at 20:13
  • Well I assumed that you'll try building an app with the task and not just ask a theoretical question... 'k. – Idan Adar Jul 17 '13 at 02:10
  • 1
    As it happens, I am building an app, and I'm happy to say "yes", it now works. But I also place a lot of value on theory too ... ;-) – djna Jul 18 '13 at 07:48