0

I have a bunch of XML files (specifically, Apigee Edge config) which can be grouped into subsections called proxies (proxyOne, proxyTwo), each with their own Maven POM. Each of these subsections references a common parent-pom.xml.

 [myapi]                 <-- parent repo
    parent-pom.xml
    [proxies]
        [proxyOne]       <-- proxyOne repo
            ...
            pom.xml
        [proxyTwo]       <-- proxyTwo repo
            ...
            pom.xml

My requirement is that each of these subsections (of which there are many) has it's own Git repository, but all require access to the parent POM. As there are many, it's not practical to duplicate the parent POM between repos.

As far as I can see, the only way to do this is with a repo for the parent and one for each proxy. I've looked at submodules here but can't see how it could be done to fit my particular needs; it seems to be meant for referencing sub, rather than super projects.

Is there some way (or some way to get submodules) to get multiple Git repositories to reference a common parent repo so that a checkout also checks out the latest parent (in its parent directory)?

Community
  • 1
  • 1
Ross Drew
  • 8,163
  • 2
  • 41
  • 53
  • No, git has no facility for this. – larsks Aug 12 '15 at 14:51
  • Are you thinking about this in reverse? You're saying that the children projects depend on the parent, which seems counterintuitive. Or, is it the case that each project can stand reasonably on its own, but must be amalgamated into the parent project? – Makoto Aug 12 '15 at 14:56
  • The poms for each proxy are minimal. All the pom functionality is shared throughout all proxies via the parent pom which is pretty large and is extended by the children. So yes, all sub poms depend upon the parent. – Ross Drew Aug 12 '15 at 15:02

0 Answers0