简体   繁体   中英

How to export custom parent pom properties to a file, from a child pom?

I have a parent pom with some custom properties and I would like to export those properties from one of the child to a file.

I tried maven-antrun-plugin with echo, but this works only with the child properties. I also tried to define child properties and assign the parent properties (eg <child.prop>${parent.prop}</child.prop> ) but I got the same result.

Update: It worked after I run mvn clean install on the parent.

仅当在父级上安装mvn后,父级自定义属性才在子pom中可用。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM