Can something in the parent pom take a value declared in the child pom?
Yes. In order to have a valid parent POM, however, I suggest providing a default/dummy value for ${git.repo}
in the parent.
To deal with cases where a child POM does not override (i.e. redefine) ${git.repo}
you could introduce a profile in the parent like so:
<profiles>
<profile>
<id>property-not-redefined</id>
<activation>
<activeByDefault>false</activeByDefault>
<property>
<name>git.repo</name>
<value>your-default-value</value>
</property>
</activation>
<build>
<plugins>
<!-- do something here -->
</plugins>
</build>
</profile>
</profiles>
This profile becomes active when the git.repo
property still has the default value.