Mailing List webobjects-dev@wocommunity.org Message #415
From: Aaron Rosenzweig <aaron@chatnbike.com>
Subject: Re: Maven Components subfolders incompatibility?
Date: Mon, 30 Jan 2023 15:46:25 -0500
To: WebObjects & WOnder Development <webobjects-dev@wocommunity.org>
Hi All,

I discovered this option for the Maven lifecycle plugin:

<configuration>
<flattenComponents>true</flattenComponents>
</configuration>

I tried it and I can see inside the target directory it was honored… but the error message is still the same, cannot find UserSwitcher.

I’m trying to launch from within Eclipse but I don’t understand how to get it to go. I don’t see the .woa built anywhere, is this a type of bundles build process? Or where is the .woa built? It’s not in the target folder.

Thank you,
— Aaron

> On Jan 30, 2023, at 2:12 PM, Aaron Rosenzweig <aaron@chatnbike.com> wrote:
>
> I’m trying to convert my Eclipse workspace front ANT -> Maven builds but I’ve run into a snag. Hoping a kind WOrrior can lend me their axe
>
> When I launch the app it cannot find some WOComponents. I get errors like:
>
> WOBundle.lookForClassInAllBundles(UserSwitcher) failed!
>
> <com.webobjects.appserver._private.WOComponentDefinition> WARNING: Unable to find component class named "UserSwitcher".  If this is not intended to be a classless component, check your framework settings and the contents of your classpath file (in the .woa's Contents/<PLATFORM_NAME> subdirectory).
>
> …
>
> “UserSwitcher.wo” is a component in this app, not an included framework.
>
> It lives in: Components/Permissions/UserSwitcher.wo
>
> It seems that the “Permissions” subfolder is causing issues as components defined directly under Components are discovered and work properly.
>
> I would rather continue to keep subfolders in Components if possible… while using Maven.
>
> What I think is the relevant part of the POM looks like:
> <resources>
>  <resource>
>      <targetPath>Resources</targetPath>
>      <filtering>false</filtering>
>      <directory>Components</directory>
>  </resource>
>  <resource>
>      <targetPath>Resources</targetPath>
>      <filtering>false</filtering>
>      <directory>Components/Permissions</directory>
>  </resource>
> </resources>
>
> When I check the “target” directory… which I think is where the Maven temporary files live… I do find the following intact:
> target/classes/Resources/Permissions/UserSwitcher.wo
>
> So it sort of looks like it is working but the running app in Eclipse cannot find this component. How does Eclipse launch it from here? Is it a type of bundle-less build? Where is the next step to debug to figure out how UserSwitcher.wo is not getting put into the right location?
>
> Any help appreciated, thank you :-)
> — Aaron

Subscribe (FEED) Subscribe (DIGEST) Subscribe (INDEX) Unsubscribe Mail to Listmaster