Mailing List webobjects-dev@wocommunity.org Message #414
From: Aaron Rosenzweig <aaron@chatnbike.com>
Subject: Maven Components subfolders incompatibility?
Date: Mon, 30 Jan 2023 14:12:10 -0500
To: WebObjects & WOnder Development <webobjects-dev@wocommunity.org>
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