Skip to content

Instantly share code, notes, and snippets.

@onlyeat3
Last active July 11, 2019 01:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save onlyeat3/c92bd90f59e4c78478fd773ab6be5104 to your computer and use it in GitHub Desktop.
Save onlyeat3/c92bd90f59e4c78478fd773ab6be5104 to your computer and use it in GitHub Desktop.
在自定义文件中启用maven内置变量,需要额外处理
这些配置是可继承的,如果是多模块项目,放到父工程即可
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
<includes>
<include>**/*</include>
</includes>
</resource>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.xml</include>
</includes>
</resource>
</resources>
<plugins>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<configuration>
<encoding>utf-8</encoding>
<useDefaultDelimiters>true</useDefaultDelimiters>
</configuration>
</plugin>
</plugins>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment