maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Thomas <greg.d.tho...@gmail.com>
Subject Re: How to exclude resources from war?
Date Sat, 18 Feb 2012 12:49:26 GMT
On 18 February 2012 10:55, Greg Thomas <greg.d.thomas@gmail.com> wrote:
> On 18 February 2012 10:46, Greg Thomas <greg.d.thomas@gmail.com> wrote:
>> On 17 February 2012 18:36, David Hoffer <dhoffer6@gmail.com> 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: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message