Yes, that change to WOLifeCycle is The Right Thing To Do.

Chuck

From: Hugi Thordarson <h...@karlmenn.is>
Date: Friday, June 23, 2017 at 1:47 AM
To: Paul Hoadley <pa...@logicsquad.net>
Cc: Chuck Hill <ch...@gevityinc.com>, WebObjects Development 
<webobjects-dev@lists.apple.com>
Subject: Re: java.util.logging and Maven builds

src/main/resources is a path to a Java resource.  Contents/Resources is a path 
to a WebObjects resource.  Java knows Jacques Schmidt about these.  Only WO 
classes know about this.   Your Maven build needs to get this file into the top 
level directory that the class files are under (would normally go into a 
package, top level is the default package).

logging.properties _does_ get copied from src/main/resources into 
target/classes during build. But it _doesn’t_ make it into the app’s JAR (which 
ends up in Contents/Resources/Java), which I suspect is where it needs to be.

I’m stumped—any Maven aficionados want to chime in?

WOLifecycle modifies the maven standard behaviour by enlisting src/resources 
for WO bundle resources only (equivalent to /Resources in Fluffy Bunny). 
However, the Eclipse compiler doesn't know about WOLifecycle's eccentricities 
and will continue to behaves as if the project is a standard maven project and 
copy the resources in src/main to target/classes. That's why everything works 
during development and blows up in production.

I've mentioned that we should really change this behaviour: Make WOLifecycle 
handle src/resources like a standard maven java project does and then add a 
separate folder for WO bundle resources (app-resources, wo-resources or 
something like that). You can see a bit of discussion in #maven on Slack on 
January 24th. Unfortunately I haven't had the time to actually *do* anything 
about that :).

If you'd like, here's a workaround: You can force maven to copy the java 
resources (or certain resources). But of course, this is less than optimal.

https://gist.github.com/hugith/a2ece8632ab33b994403ff9a04722fc1

Cheers,
- hugi
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to