Re: Deployment resources paths in nightly

From: Lachlan Deck (lachlan.dec..mail.com)
Date: Mon Nov 24 2008 - 02:24:38 EST

  • Next message: Xavier Destombes: "Re: Maclipse 3.4.1 [Solved]"

    On 24/11/2008, at 9:37 AM, David LeBer wrote:

    > On 23-Nov-08, at 4:51 PM, David LeBer wrote:
    >
    >> I'm playing with nightly (New Hotness (tm)) in preparation for it
    >> becoming stable.
    >>
    >> When I do an 'everything embedded' install. WOLips generates a
    >> split install copying the WebServerResources for the embedded
    >> frameworks into:
    >>
    >> [SPLIT]/WebObjects/APPNAME.woa/Frameworks/FRAMEWORKNAME.framework/
    >> WebServerResources/
    >>
    >> Which should get moved to the www doc root.
    >>
    >> However, when launching the app it is looking for resources in:
    >> /WebObjects/Frameworks/FRAMEWORKNAME.framework/WebServerResources/
    >> Am I missing a necessary flag somewhere? In my Old Lameness (tm)
    >> build.xml I was setting the 'frameworksBaseURL' property. Do I need
    >> to do that here too?
    >
    > So, adding 'frameworksBaseURL="/WebObjects/${project.name}.woa/
    > Frameworks"' to woapplication in the build.xml file generates the
    > paths I would expect for embedded web resources.
    >
    > Is there a more generic way of doing this (that doesn't require
    > touching every build.xml file)?

    Your Wonder app subclass:

    public void finishInitialization()
    {
            super.finishInitialization();

            // fix frameworks/app webserver resources url.
            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 Nov 24 2008 - 02:25:26 EST