You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Siddharth Gargate <si...@gmail.com> on 2010/08/10 13:16:26 UTC

Exclude WEB-INF/classes folder in war:war

Hi all,
I wish to exclude WEB-INF classes folder from being added in the war file.
How can we do it?

Thanks,
Sid

Re: Exclude WEB-INF/classes folder in war:war

Posted by Jörg Schaible <jo...@gmx.de>.
Siddharth Gargate wrote:

> Hi all,
> I wish to exclude WEB-INF classes folder from being added in the war file.
> How can we do it?

Use the packagingExcludes parameter.

- Jörg


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Exclude WEB-INF/classes folder in war:war

Posted by Wayne Fay <wa...@gmail.com>.
> param. However, I'm wondering why you would like not to include the Java
> classes of the war project? Why do they exist there if your don't want them?

I'm thinking along the lines of Anders... You should probably move all
classes to another Maven project of type jar, then depend on it in
your War.

Wayne

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Exclude WEB-INF/classes folder in war:war

Posted by Anders Hammar <an...@hammar.net>.
I doubt that's what's the question was regarding. Filtering doesn't exclude
files...
I'm not an expert on the war plugin, but I would try the packagingExcludes
param. However, I'm wondering why you would like not to include the Java
classes of the war project? Why do they exist there if your don't want them?

/Anders

On Tue, Aug 10, 2010 at 13:54, Vishal Gupta <gr...@gmail.com> wrote:

> i guess u need to use filter
> <build>
>    <resources>
>      <resource>
>        <directory>src/main/resources</directory>
>        <filtering>true</filtering>
>      </resource>
>    </resources>
>  </build>
>
> http://maven.apache.org/guides/getting-started/index.html#How_do_I_filter_resource_files
>
> Regards,
> vishal
>
> On Tue, Aug 10, 2010 at 4:46 PM, Siddharth Gargate <sidgatedev@gmail.com
> >wrote:
>
> > Hi all,
> > I wish to exclude WEB-INF classes folder from being added in the war
> file.
> > How can we do it?
> >
> > Thanks,
> > Sid
> >
>

Re: Exclude WEB-INF/classes folder in war:war

Posted by Vishal Gupta <gr...@gmail.com>.
i guess u need to use filter
<build>
    <resources>
      <resource>
        <directory>src/main/resources</directory>
        <filtering>true</filtering>
      </resource>
    </resources>
  </build>
http://maven.apache.org/guides/getting-started/index.html#How_do_I_filter_resource_files

Regards,
vishal

On Tue, Aug 10, 2010 at 4:46 PM, Siddharth Gargate <si...@gmail.com>wrote:

> Hi all,
> I wish to exclude WEB-INF classes folder from being added in the war file.
> How can we do it?
>
> Thanks,
> Sid
>