Re: woproject-ant-tasks appstart script doubt

From: D Tim Cummings (timc..igpond.com.au)
Date: Sat May 09 2009 - 03:57:32 EDT

  • Next message: Ricardo J. Parada: "Re: EOGen-Templates an javaEnum"

    Hi Lachlan,

    I find it really useful to have the WOFrameworksBaseURL set in the
    application start up file. I have modified the following two lines in
    my build.xml so the app name contains a date and time stamp

                    <property name="build.app.name" value="${project.name}${DSTAMP}$
    {TSTAMP}" />
                    <property name="build.app.name.lowercase" value="$
    {project.name.lowercase}${DSTAMP}${TSTAMP}" />

    Then when I deploy, I can install the new version of the app alongside
    the old version. In JavaMonitor I only have to change the "Path" to
    the new version of the app and be confident that it will pick up the
    new WebServerResources that were installed at the same time without
    having to set the new WOFrameworksBaseURL in the "Additional
    Arguments". Rolling back to a previous version of the app is
    similarly easy.

    I was sure that JavaMonitor setting of WOFrameworksBaseURL would
    override the application start up script if I had wanted to. However,
    it is so long since I used to do it that way that I have forgotten if
    I ever tried it.

    Tim

    On 08/05/2009, at 11:08 AM, Lachlan Deck wrote:

    > On 08/05/2009, at 9:56 AM, Henrique Prange wrote:
    >
    >> I've found something that left me in doubt while investigating some
    >> problems related with the WOFrameworksBaseURL property. The
    >> woproject-ant-tasks module has two templates for the application
    >> start-up file.
    >>
    >> src/resources/woapp/Contents/MacOS/appstart:
    >>
    >> [...]
    >> echo ${JAVA_EXECUTABLE} ... ${COMMAND_LINE_ARGS}..
    >> WOFrameworksBaseURL@
    >> eval exec ${JAVA_EXECUTABLE} ... ${COMMAND_LINE_ARGS}..
    >> WOFrameworksBaseURL@
    >>
    >> src/resources/woapp_52/Contents/MacOS/appstart:
    >>
    >> [...]
    >> echo ${JAVA_EXECUTABLE} ... ${COMMAND_LINE_ARGS}
    >> eval exec ${JAVA_EXECUTABLE} ... ${COMMAND_LINE_ARGS}
    >>
    >> The former has a "variable"..WOFrameworksBaseURL@ that is replaced
    >> by the correct value in build time (if WO not 5.2 or greater). The
    >> latter doesn't have this variable and the final artifact generated
    >> doesn't have any reference to the WOFrameworksBaseURL property.
    >>
    >> Is this a mistake or there is a reason to not add the
    >> WOFrameworksBaseURL property in the application's launch script for
    >> WO 5.2 or greater?
    >
    > It shouldn't be there and doesn't need to be there. It overrides
    > anything defined in Java Monitor or the app properties.
    >
    > I've had to work around this (what I'd call a bug) by adjusting the
    > baseurl during app launch to be what I wanted it to be...
    >
    > I'm not sure why it was added in. Perhaps there's a commit message
    > that has an explanation. I'm willing to be convinced otherwise but I
    > think it was a bad move. :-)
    >
    > with regards,
    > --
    >
    > Lachlan Deck
    >



    This archive was generated by hypermail 2.0.0 : Sat May 09 2009 - 03:58:10 EDT