On Wed, Apr 17, 2013 at 7:43 AM, Stephen Connolly <
stephen.alan.conno...@gmail.com> wrote:

>
> >>
> > Hmm. I understand what ClassLoader.getResources(path) returns (just read
> > the javadoc). However, if I have a bunch of independently developed
> > components that are assembled as WAR overlays, then the first file in
> with
> > a particular name wins.
> >
>
> You are reading the javadoc of getResource(path) not getResources(path)
> note the "s" at the end.
>
>
Stephen, I don't think you read what Mark wrote, and he is correct. The
Maven WAR plugin, when it overlays, *overwrites* competing filenames with
the same name. Your solution will work if they are the same name and in
embedded jar files, but will not work for a war overlay. We have exactly
this situation for jawr configuration files - each war overlay needs to
specify jawr-artifactid.properties - then  we classpath scan for
/WEB-INF/jawr-*.properties and assemble them using JAWR's muultiple source
capability.

Mark - we use war overlays, but we have built the necessary stuff to make
us productive in and outside of the IDE. We use Jetty 9 and a runnable war,
not sure if that matches at all, but we have code we can give you if it
helps. We will be open sourcing once we move to git but our artifacts will
never be in central as we are open sourcing them to allow for students to
enhance and hack on our projects. Contact me off list if you are interested
and I'll send you everything.

Richard


-- 
---
Richard Vowles,
Grails, Groovy, Java, Javascript, AngularJS
Consistency is the last refuge of the unimaginative - Oscar Wilde
ph: +64275467747, google+:http://rvowl.es/UX8Bmq
podcast: http://www.illegalargument.com

Reply via email to