如何读取Maven中的外部属性文件(How to read an external properties file in Maven)

编程入门 行业动态 更新时间:2024-10-25 20:21:19
如何读取Maven中的外部属性文件(How to read an external properties file in Maven)

有谁知道如何在Maven中阅读x.properties文件。 我知道有些方法可以使用资源过滤来读取属性文件并从中设置值,但是我想在我的pom.xml中有一种方法,如:

<properties file="x.properties"> </properties>

有一些讨论: Maven外部属性

Does anyone know how to read a x.properties file in Maven. I know there are ways to use resource filtering to read a properties file and set values from that, but I want a way in my pom.xml like:

<properties file="x.properties"> </properties>

There was some discussion about this: Maven External Properties

最满意答案

尝试Maven属性插件

Try the Maven Properties Plugin

更多推荐

本文发布于:2023-07-05 07:50:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1034856.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:属性   文件   Maven   read   file

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!