eclipse打包资源排除

eclipse打包资源排除:

	<build>
		<resources>
			<resource>
				<directory>src/main/resources</directory>
				<filtering>true</filtering>
				<!-- 排除WEB-INF classes下资源 -->
		        <excludes>
		            <exclude>database/*.sql</exclude>
		            <exclude>META-INF/*.MF</exclude>
		            <exclude>*.wav</exclude>
		            <exclude>version.txt</exclude>
		        </excludes>
			</resource>
		</resources>
		
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-war-plugin</artifactId>
				<version>2.2</version>
				<configuration>
			        <archive>
			            <addMavenDescriptor>false</addMavenDescriptor>
			        </archive>
					<warName>${project.name}</warName>
					<webResources>
						<resource>
							<directory>src/main/resources</directory>
							<!-- 排除项目下资源 -->
					        <excludes>
					            <exclude>database/*.sql</exclude>
					            <exclude>META-INF/pojo/*.xml</exclude>
					            <exclude>META-INF/ssl/*</exclude>
					            <exclude>META-INF/struts/*.xml</exclude>
					            <exclude>META-INF/spring/*.xml</exclude>
					            <exclude>META-INF/spring/*.properties</exclude>
					            <exclude>META-INF/*.MF</exclude>
					            <exclude>*.wav</exclude>
		            			<exclude>*.xml</exclude>
					        </excludes>
						</resource>
					</webResources>
				</configuration>
			</plugin>
		<plugins>
	</build>

猜你喜欢

转载自blog.csdn.net/leadseczgw01/article/details/80380159