【发布时间】:2010-10-25 08:44:52
【问题描述】:
有谁知道如何在 Maven 中读取 x.properties 文件。我知道有一些方法可以使用资源过滤来读取属性文件并从中设置值,但我希望在我的 pom.xml 中有一种方法,例如:
<properties file="x.properties">
</properties>
对此进行了一些讨论: Maven External Properties
【问题讨论】:
-
如果您只有几个值,并且不同的用户需要不同的值,请考虑改为putting the value in your
settings.xml。
标签: java build maven-2 properties-file