带你了解Java Maven的打包操作
程序员文章站
2022-03-25 10:17:45
<profiles> <profile> <id>dev</id> <properties> <env>dev</env> </properties> <!--未指定环境时,默认打包dev环境--> <activation> <activebydefault>true</activebydefault> </activation> </profile> <profile> <id>test</id> <properties> <env>test</env> </properties> </profile> <profile> <id>product</id> <properties> <env>product</env> </properties> </profile> </profiles>
<!--对于项目资源文件的配置放在build中--> <resources> <resource> <directory>src/main/resources/${env}</directory> </resource> <resource> <directory>src/main/java</directory> <includes> <include>**/*.xml</include> <include>**/*.properties</include> <include>**/*.tld</include> </includes> <filtering>false</filtering> </resource> </resources>
总结
本篇文章就到这里了,希望能够给你带来帮助,也希望您能够多多关注的更多内容!