Regarding your second issue, I also keep my components grouped in subfolders
and I was never able to find an automated way to flatten just the components
subfolders. I ended up having to explicitly exclude all subfolders under
src/main/components and then add each subfolder as a resource directory
individually so that each component in that subdirectory was installed in the
Resources folder. It’s not pretty and may not be the cleanest way to do things,
but it works for me. You just have to remember to update your POM if you
add/remove component subfolders. In my case, my subfolder structure is pretty
static and mainly kept in a framework, so I don’t have to make changes often.
Here’s an excerpt from one of my framework POMs. In my project, I have a few
subfolders under the main component folder to group related components, e.g.:
src/main/components/
…/admin/
…/common/
…/dashboards/
…
Then my POM looks something like this (I’ve removed some non-relevant stuff):
<project ... >
<modelVersion>4.0.0</modelVersion>
<parent> ... </parent>
<artifactId>abacus-views</artifactId>
<packaging>woframework</packaging>
<name>Abacus Views</name>
<build>
<finalName>${project.artifactId}</finalName>
<!--
Flatten component hierarchy so that all components are
put in the Resources folder. There is
no way to do this automatically, so we manually exclude
each subfolder under the components
folder, and then manually include each subfolder
separately as a resource folder to be installed into
the top-level Resources folder.
-->
<resources>
<resource>
<targetPath>Resources</targetPath>
<directory>${basedir}/src/main/components</directory>
<excludes>
<exclude>admin/**/*</exclude>
<exclude>common/**/*</exclude>
<exclude>dashboard/**/*</exclude>
...
</excludes>
</resource>
<resource>
<targetPath>Resources</targetPath>
<directory>${basedir}/src/main/components/admin</directory>
</resource>
<resource>
<targetPath>Resources</targetPath>
<directory>${basedir}/src/main/components/common</directory>
</resource>
<resource>
<targetPath>Resources</targetPath>
<directory>${basedir}/src/main/components/dashboard</directory>
</resource>
...
</resources>
<plugins> ... </plugins>
</build>
<dependencies> ... </dependencies>
</project>
Hope that helps.
F
--
Faizel Dakri
[email protected] <mailto:[email protected]>
> On 2016-Oct-09, at 06:29 AM, Paul Hoadley <[email protected]
> <mailto:[email protected]>> wrote:
>
> Hello,
>
> Well, I say the _last_ two hurdles. They’re at least the _current_ two
> hurdles. I’ve got this a long way, but I’m still not there. I’ve been
> migrating an app and its 10 or so framework dependencies. Everything builds
> (both locally on OS X and on a Jenkins CI server running Amazon Linux), but
> I’m stuck on launch.
>
> 1. Launching in Eclipse I get this:
>
> WARN NSLog - A fatal exception occurred: There is no model named
> 'LSNotification' in this model group.
> [2016-10-9 11:11:26 UTC] <main> java.lang.IllegalArgumentException: There is
> no model named 'LSNotification' in this model group.
> at
> er.extensions.migration.ERXMigrator._buildDependenciesForModelsNamed(ERXMigrator.java:274)
>
> That model is in LSNotification.framework, which appears to be built
> correctly, and its JAR (which contains that model) is in the built
> application bundle under target. (Is this even what Eclipse is running when I
> hit launch?) If I go into that bundle on the command line and launch by hand,
> I _don’t_ get this error, which is encouraging—the application finds that
> model, runs the migrations (and then fails elsewhere—see below). What am I
> overlooking when I launch from Eclipse? I’ve unchecked
> NSProjectBundleEnabled—anything else?
>
> 2. Launching from the command line, I get bitten by an issue Mark Wardle
> brought up last month: we have sub-directories to group components under
> src/main/components. We have sub-directories to group resources under
> src/main/webserver-resources. We can set flattenResources to true for the
> maven-wolifecycle-plugin, but that flattens _both_. We want to flatten
> components, but not webserver-resources. So depending whether that’s true or
> false, the app breaks because it either can’t find components or webserver
> resources. Is there a workaround for this (that doesn’t involve pulling the
> sub-directory structure our of src/main/resources)?
>
>
> --
> Paul Hoadley
> http://logicsquad.net/ <http://logicsquad.net/>
>
>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list ([email protected]
> <mailto:[email protected]>)
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/webobjects-dev/listfez%40dakri.com
> <https://lists.apple.com/mailman/options/webobjects-dev/listfez%40dakri.com>
>
> This email sent to [email protected]
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com
This email sent to [email protected]