开发者

How to use properties from a property file within a Maven script?

I want to use properties that are defined in a property file in a Maven script, in a plugin configura开发者_Python百科tion section. How can I do that?

Extract from my Maven script:

...
<configuration>
    <url>${jdbc.url}</url>
</configuration>
...

And my property file (jdbc.properties) is somewhere in my classpath

jcbc.url=some.url.to.use

Thanks.


Use the properties plugin. And it's called a POM, not a script. It may seem like a trivial difference, but a POM describes a project and how it should be built, where a script is a sequence of commands saying what needs to be done.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜