当前位置: 代码迷 >> Web前端 >> maven install复制非class资料pom配置
  详细解决方案

maven install复制非class资料pom配置

热度:172   发布时间:2013-03-01 18:33:02.0
maven install复制非class文件pom配置
<build>
		<!-- 资源 -->
		<resources>
			<resource>
				<directory>src/main/resources/META-INF</directory>
				<filtering>true</filtering>
				<targetPath>META-INF</targetPath>
			</resource>
			<!-- 复制非class文件 -->
			<resource>
				<directory>src/main/java/com/proxy/bean</directory>
				<filtering>true</filtering>
				<includes>
					<include>*.betwixt</include>
				</includes>
				<targetPath>${project.build.directory}/classes/com/proxy/bean</targetPath>
			</resource>
		</resources>


注:如果不排除或包含设置会把java文件一起copy过去的,所以需要配置相应的后缀名。

// maven web工程,目录结构是一个标准的maven结构,如下:

D:. 
└─mywebapp 
    │  pom.xml 
    │ 
    └─src 
        └─main 
            ├─resources 
            └─webapp 
                │  index.jsp 
                │ 
                └─WEB-INF 
                    web.xml
  相关解决方案