I may be mis-remembering and never had the problem under Ant, it's been years
🙂 Perhaps I confuse it with the longstanding issue where WO confuses the app Session with other Session classes on the classpath. That is fixed the same way BTW.
Yep, I'm familiar with 2.5, but I've been a bit lazy :) I have a maven woapp archetype that I haven't published anywhere yet which is using the latest. It's basically the same as that wodocker project with some additional tweaks. I plan to make a woframework
and a wod2w archetype to go with it in a single maven multi-module project and push those up to maven central under the org.wocommunity groupId one of these days. All my weekends have been filled with fun things to do away from the computer lately.
From: WebObjects & WOnder Development <webobjects-dev@wocommunity.org> on behalf of Aaron Rosenzweig <aaron@chatnbike.com>
Sent: Tuesday, January 31, 2023 10:59 PM
To: WebObjects & WOnder Development <webobjects-dev@wocommunity.org>
Subject: [WO-DEV] Re: Maven Components subfolders incompatibility?
Hi thank you Ramsey. You are always so kind and fast to reply.
Yes! your advice of overriding “installPatches()” to manually kick WO to have a mapping to the missing components works! As I click around the app I’m finding lots of WOComponents having this problem but they only are discernible as you step into
them.
It’s concerning but a good workaround. I didn’t have these problems before with ANT builds. <<scratches head>>
In other news I noticed there are upgrades on the maven lifecycle plug in. In your docker example, you are using v2.2.1 (others recommended 2.3-SNAPSHOT) and now there is a 2.5 - upgrading didn’t make any changes for the component discovery but
I’ll note the following changes in the POM to include it:
1) <groupId>org.objectstyle.woproject.maven2</groupId> -> <groupId>org.wocommunity</groupId>
2) <artifactId>maven-wolifecycle-plugin</artifactId> -> <artifactId>wolifecycle-maven-plugin</artifactId>
3) <version>2.3-SNAPSHOT</version> -> <version>2.5</version>
Thank you,
— Aaron
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
Confidentiality Notice: This email, including all attachments and replies thereto, are covered by the Electronic Communications Privacy Act, 18 U.S.C. Sections 2510-2521 and are legally privileged. This information is confidential, and intended only
for the use of the individuals or entities named above. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or the taking of any action in reliance on the contents of this transmitted information is strictly
prohibited. Please notify us if you have received this transmission in error. Thank you.
|