You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Maven User <ma...@gmail.com> on 2012/08/31 17:20:50 UTC
zip overlay for war project - items inside not visible....
Hi all -
I'm having an issue where a zip file containing shared js and css
components are overlaid to my war project - but they're NOT visible!
So in my source tree, I have:
src/main/webapp/js/foo.js
I'm overlaying several other js files and the resulting war also has:
webapp/js/foo.js
webapp/js/bar.js
Bar.js is NOT visible in the resulting war.
What am I doing wrong?
Re: zip overlay for war project - items inside not visible....
Posted by Maven User <ma...@gmail.com>.
Not a bug...
jetty:run runs out of the source structure - and does NOT take into account
the overlays.
jetty:run-war runs out of the exploded war directory structure and DOES
take into account the overlays.
Re: zip overlay for war project - items inside not visible....
Posted by Maven User <ma...@gmail.com>.
Uh - by "visible" I mean, I can see it when I run "jetty:run" and go to
that url.
In my example above, I can hit foo.js, but not bar.js - even when they are
right next to each other.
Doesn't matter if it's a zip or a war I'm using for the overlay, neither
work. Has anyone see this or know of a bug?
Here's the doc for maven overlays:
http://maven.apache.org/plugins/maven-war-plugin/overlays.html
To use a *zip* dependency as an overlay you have to configure it explicitly
in the plugin's configuration. For instance to inject the content of a zip
overlay in the scripts directory of the webapp, do as follows:
...
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.2</version>
<configuration>
<overlays>
<overlay>
<groupId>zipGroupId</groupId>
<artifactId>zipArtifactId</artifactId>
<type>zip</type>
<targetPath>scripts</targetPath>
</overlay>
</overlays>
</configuration>
</plugin>
</plugins>
On Fri, Aug 31, 2012 at 11:30 AM, Wayne Fay <wa...@gmail.com> wrote:
> > I'm having an issue where a zip file containing shared js and css
> > components are overlaid to my war project - but they're NOT visible!
>
> What does "visible" mean?
> Are you sure you can overlay a war with a zip in the first place?
>
> Wayne
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
Re: zip overlay for war project - items inside not visible....
Posted by Wayne Fay <wa...@gmail.com>.
> I'm having an issue where a zip file containing shared js and css
> components are overlaid to my war project - but they're NOT visible!
What does "visible" mean?
Are you sure you can overlay a war with a zip in the first place?
Wayne
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org