maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Barrie Treloar <>
Subject Re: Exclusing JSP files from war file
Date Wed, 16 Jan 2013 23:08:24 GMT
On 17 January 2013 09:20, anjibman <> wrote:
> Hi All,
> I have all JSP files in \views and subfolders as following:
> src\main\webapp\WEB-INF\views\error.jsp
> src\main\webapp\WEB-INF\views\mobile\home.jsp
> src\main\webapp\WEB-INF\views\mobile\register\register.jsp
> src\main\webapp\WEB-INF\views\normal\home.jsp
> src\main\webapp\WEB-INF\views\normal\register\register.jsp
> I am trying to exclude all these JSP from WAR file so I have plugin define
> in pom.xml as
> <plugin>
>    <groupId>org.apache.maven.plugins</groupId>
>    <artifactId>maven-war-plugin</artifactId>
>    <configuration>
>      <webXml>${basedir}/target/jspweb.xml</webXml>
>      <warSourceExcludes>**/*.jsp</warSourceExcludes>
>    </configuration>
> </plugin>
> But I can still see all JAR files in WAR file. Can any one tell me what I am
> doing wrong? Am I not writing path expression correctly? If so what will be
> correct pattern for such.

I dont do war stuff so I'm just pointing at the docs here.
Have you read


Note in your post you have warSourceExcludes which excludes stuff in
warSourceDirectory (${basedir}/src/main/webapp)
And stuff in ${basedir}/src/main/webapp/WEB-INF may get treated
specially as "resources" and not even be available for

I'm no expert on this.
Try packagingExcludes instead.

If you think the documentation could be improved, please feel free to
make the changes and file a jira.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message