Accessing a property of a sibling project dependency

丶灬走出姿态 提交于 2019-12-10 10:37:43

问题


Let's say I have

<properties>
...
    <module.deployPath>/admin</module.deployPath>
...
</properties>

in the pom.xml of the project A.

And now I'd like to access ${module.deployPath} in another project B where project A is listed as dependency of project B.

Is this possible somehow without using external property files or settings.xml?

Thank you for your help!

Cheers,

b


回答1:


Staying strictly within Maven's property access mechanism, I'm almost certain you can't do that. If you were to add the GMaven plugin and write some Groovy code, then it would probably be possible to get and parse the dependency's pom to get at the property you're looking for.



来源:https://stackoverflow.com/questions/6681635/accessing-a-property-of-a-sibling-project-dependency

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!