<plugin> <artifactId>maven-resources-plugin</artifactId> <version>2.6</version> <executions> <execution> <id>copy-resources</id> <!-- here the phase you need --> <phase>validate</phase> <goals> <goal>copy-resources</goal> </goals> <configuration> <!--copyTo的目录--> <outputDirectory>${project.build.directory}/rarity/consumer/webRoot</outputDirectory> <resources> <resource> <!--被copy的目录--> <directory>src/main/resources</directory> <filtering>true</filtering> </resource> </resources> </configuration> </execution> </executions> </plugin>
转载于:https://my.oschina.net/u/4119844/blog/3042721
本文详细介绍了如何使用Maven资源插件进行资源文件的复制配置,包括指定复制源目录、目标目录、过滤选项及执行阶段等关键参数,适用于项目中资源文件的管理和部署。
3777

被折叠的 条评论
为什么被折叠?



