简体   繁体   中英

Inheriting properties from parent pom

Is there a way to inherit properties from parent pom. Eg: I want to replace ${publish.dir} in child pom with the value from parent pom.

parent pom:

<properties> <publish.dir>/tmp/publish</publish.dir> </properties>

child pom:

<outputDirectory>${publish.dir}/dev</outputDirectory>

There is no way not to inherit properties from a parent POM. Properties defined in a parent are visible in the child.

However. outputDirectory is relatively special part of the POM data model. Inherited properties won't work for that. I'm sorry that it took me so long for the appropriate part of my brain to turn on. I think that you might be out of luck, or might need to specify the output to specific plugins.

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