maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mschipperheyn <m.schipperh...@gmail.com>
Subject war:war overrides webapp content from webapp resources
Date Fri, 20 Jan 2012 12:59:49 GMT
Hi,

I'm running into a little issue in war:war that has a workaround but I'm
still bothered by it:

I'm trying to filter stuff from src/main/webapp/ 
This works
However, my filtered result is overwritten in the last part of resource
copying

[INFO] Processing war project
[INFO] Copying webapp webResources [d:\projects\project\web\src/main/webapp]
to [d:\projects\project\web\target\MyProject-webapp-1.0-SNAPSHOT]
[INFO] Copying webapp webResources [d:\projects\project\web\target/classes]
to [d:\projects\project\web\target\MyProject-webapp-1.0-SNAPSHOT]
[INFO] Copying webapp webResources
[d:\projects\project\web\src/main/webapp/WEB-INF] to
[d:\projects\project\web\target\MyProject-webapp-1.0-SNAPSHOT]
[INFO] Copying webapp webResources [d:\projects\project\web\../core/target]
to [d:\projects\project\web\target\MyProject-webapp-1.0-SNAPSHOT]
[INFO] Copying webapp resources [d:\projects\project\web\src\main\webapp]

It's the last line that is the problem because it overwrites the filtered
webResources copy in an unfiltered way. I'm just wondering where it comes
from and how to change it

<plugin>
	<groupId>org.apache.maven.plugins</groupId>
	<artifactId>maven-war-plugin</artifactId>
	<version>2.2-SNAPSHOT</version>
	<configuration>
		<webResources>
			<resource>
				<directory>src/main/webapp</directory>
				<excludes>
					<exclude>**/Thumbs.db</exclude>
					<exclude>**/.svn/**</exclude>
					<exclude>**/*-min.js</exclude>
					<exclude>**/*-min.css</exclude>
				</excludes>
			</resource>
			<resource>
				<directory>target/classes</directory>
				<targetPath>WEB-INF/classes</targetPath>
			</resource>
			<resource>
				<directory>../core/target</directory>
				<includes>
					<include>${parent.artifactId}-core-${version}.jar</include>
				</includes>
				<targetPath>WEB-INF/lib</targetPath>
			</resource>
		</webResources>
		<packagingExcludes></packagingExcludes>
		<warSourceExcludes>**/Thumbs.db,*.js,*.css</warSourceExcludes>
	</configuration>
</plugin>
<resources>
	<resource>
		<directory>src/main/resources</directory>
		<excludes>
			<exclude>ApplicationResources_*.properties</exclude>
			<exclude>applicationContext-*.xml</exclude>
		</excludes>
		<filtering>true</filtering>
	</resource>
	<resource>
		<directory>src/main/resources</directory>
		<includes>
			<include>applicationContext-resources.xml</include>
		</includes>
	</resource>
</resources>

Cheers,
Marc


--
View this message in context: http://maven.40175.n5.nabble.com/war-war-overrides-webapp-content-from-webapp-resources-tp5160326p5160326.html
Sent from the Maven - Users mailing list archive at Nabble.com.

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


Mime
View raw message