But in that case wouldn't it be excluded in the compile phase too?
I'm looking for a way to include the resources for all uses (i.e.
compile phase) but just not package it in the war.  E.g. as if they
have provided scope.  That just gives me an idea...I might move those
resources to a new module and depend on it with provided scope...seems
like a hack to get around a basic feature the war plugin should
provide/allow.

-Dave

On Sat, Feb 18, 2012 at 5:49 AM, Greg Thomas <[email protected]> wrote:
> On 18 February 2012 10:55, Greg Thomas <[email protected]> wrote:
>> On 18 February 2012 10:46, Greg Thomas <[email protected]> wrote:
>>> On 17 February 2012 18:36, David Hoffer <[email protected]> wrote:
>>>> Where is logback-test.xml in your directory structure relative to the pom?
>>>
>>> Currently for legacy reasons in src/main/webapp/WEB-INF/classes -
>>> though I'm sure that we have tested it in src/main/resources.
>>
>> Actually, I take that back. I just retested, and it still is included
>> if it's left in src/main/resources - presumably why we've left it in
>> WEB-INF/classes.
>
> That was bugging me; I figured out that to exclude a resource from a
> WAR file you simply need to do something like the following ...
>
>                        <build>
>                                <!-- Don't use the logback-test.xml -->
>                                <resources>
>                                        <resource>
>                                                
> <directory>src/main/resources</directory>
>                                                <excludes>
>                                                        
> <exclude>logback-test.xml</exclude>
>                                                </excludes>
>                                        </resource>
>                                </resources>
>                                ...
>                        </build>
>
> HTH,
>
> Greg
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>

Reply via email to