You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Paul Benedict <pb...@apache.org> on 2014/12/08 17:24:17 UTC
Exception overlaying zip in war
I configured the WAR plugin to overlay a zip file. Nothing fancy. Here's
the config:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.5</version>
<configuration>
<overlays>
<groupId>org.company</groupId>
<artifactId>ui</artifactId>
<type>zip</type>
</overlays>
</configuration>
</plugin>
I get an exception:
java.lang.ClassCastException: java.lang.String cannot be
cast to org.apache.maven.plugin.war.Overlay
at
org.apache.maven.plugin.war.overlay.OverlayManager.initialize(OverlayManager.java:122)
I looked at the WAR source. I don't know how a String is making it into the
List<Overlay> collection. Any WAR developers here?
Cheers,
Paul
Re: Exception overlaying zip in war
Posted by Paul Benedict <pb...@apache.org>.
Yup. I copied/pasted and didn't even see the error I made. Thanks for
pointing that out, Stuart!
PS: Still sounds like a bug :-) It should not have seen any overlays -- but
it was coerced to a String unexpectedly.
Cheers,
Paul
On Mon, Dec 8, 2014 at 12:07 PM, Stuart McCulloch <mc...@gmail.com> wrote:
> On Monday, 8 December 2014 at 16:24, Paul Benedict wrote:
> > I configured the WAR plugin to overlay a zip file. Nothing fancy. Here's
> > the config:
> >
> > <plugin>
> > <groupId>org.apache.maven.plugins</groupId>
> > <artifactId>maven-war-plugin</artifactId>
> > <version>2.5</version>
> > <configuration>
> > <overlays>
> > <groupId>org.company</groupId>
> >
> >
>
> ^ missing <overlay> ... </overlay> ?
> > <artifactId>ui</artifactId>
> > <type>zip</type>
> > </overlays>
> > </configuration>
> > </plugin>
> >
> > I get an exception:
> > java.lang.ClassCastException: java.lang.String cannot be
> > cast to org.apache.maven.plugin.war.Overlay
> > at
> >
> org.apache.maven.plugin.war.overlay.OverlayManager.initialize(OverlayManager.java:122)
> >
> > I looked at the WAR source. I don't know how a String is making it into
> the
> > List<Overlay> collection. Any WAR developers here?
> >
> > Cheers,
> > Paul
> >
> >
>
>
>
Re: Exception overlaying zip in war
Posted by Stuart McCulloch <mc...@gmail.com>.
On Monday, 8 December 2014 at 16:24, Paul Benedict wrote:
> I configured the WAR plugin to overlay a zip file. Nothing fancy. Here's
> the config:
>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-war-plugin</artifactId>
> <version>2.5</version>
> <configuration>
> <overlays>
> <groupId>org.company</groupId>
>
>
^ missing <overlay> ... </overlay> ?
> <artifactId>ui</artifactId>
> <type>zip</type>
> </overlays>
> </configuration>
> </plugin>
>
> I get an exception:
> java.lang.ClassCastException: java.lang.String cannot be
> cast to org.apache.maven.plugin.war.Overlay
> at
> org.apache.maven.plugin.war.overlay.OverlayManager.initialize(OverlayManager.java:122)
>
> I looked at the WAR source. I don't know how a String is making it into the
> List<Overlay> collection. Any WAR developers here?
>
> Cheers,
> Paul
>
>