Re: question on new woapplication task and WOFrameworksBaseURL

From: Lachlan Deck (lachlan.dec..mail.com)
Date: Mon Oct 13 2008 - 19:26:07 EDT

  • Next message: Lars Sonchocky-Helldorf (JIRA): "[OS-JIRA] Created: (WOL-905) WOLips validates inactive (commented out) HTML"

    On 14/10/2008, at 4:57 AM, Mike Schrag wrote:

    >> With new split embedded build.xml for applications, I don't see the
    >> -WOFrameworksBaseURL being added to the launch command at the
    >> bottom of the executable ..... is that intentional or is there some
    >> other magic setting it somewhere that I cannot see?
    > it's not being set right now ... oversight

    If, however, you're using versioned deployed apps, then this snippet
    of code might be useful in your Wonder app... (at least for maven
    builds this is what I'm using. I assume it's similar for you guys).

    public void finishInitialization()
    {
            super.finishInitialization();
            LOG.info( "WOApplicationBaseURL:" + applicationBaseURL() );
            if
    ( ERXProperties
    .booleanForKeyWithDefault
    ( "ISHFrameworksBaseURL.relativeToApplicationBaseURL", true ) )
            {
                    String realAppName = NSPathUtilities.lastPathComponent( path() );
                    NSArray< String > components = new NSArray< String >( new String[] {
                        realAppName, "Contents", "Frameworks"
                    } );
                    String newBaseURL = applicationBaseURL();
                    for ( Enumeration< String > en = components.objectEnumerator();
    en.hasMoreElements(); )
                            newBaseURL =
    NSPathUtilities.stringByAppendingPathComponent( newBaseURL,
    en.nextElement() );
                    ERXProperties.setStringForKey( "WOFrameworksBaseURL", newBaseURL );
                    setFrameworksBaseURL( newBaseURL );
            }
            LOG.info( "WOFrameworksBaseURL:" + frameworksBaseURL() );
            <...>
    }

    with regards,

    --
    

    Lachlan Deck



    This archive was generated by hypermail 2.0.0 : Mon Oct 13 2008 - 19:27:06 EDT