Reputation: 1810
Suppose that I have many Github repos connected using a maven multi-module project (i.e., reactor), with a dependency tree like this...
A
B
C
D
F
G
...and a pom structure like this:
- <parent><version>1-SNAPSHOT...
GitHub repo A - pom.xml - <artifactId>A</artifactId><version>2-SNAPSHOT...
- <dependencies><X><version>3-SNAPSHOT...
- <modules><module>B</module></modules>
- <parent><version>1-SNAPSHOT...
GitHub repo B - pom.xml - <artifactId>B</artifactId><version>2-SNAPSHOT...
- <dependencies><Y><version>3-SNAPSHOT...
...
If somebody updates C (e.g., adds a new Java method) and does mvn deploy
, I want to automatically (i.e., Continuous Integration (CI)) rebuild both A and B to use C's latest version. To successfully accomplish that, I can use the Jenkins Pipeline Maven Plugin (PMP), such that when somebody updates C, Jenkins then triggers a build for B, which finally triggers A--in that order. While building those repos, maven downloads the latest SNAPSHOT for C, B, and A using a private Maven repo.
Now suppose I have a new requirement: remove PMP.
Problem: By removing PMP, if somebody updates C, PMP will not rebuild A, so A can NOT automatically use it. But another requirement says that A must use the latest version of C.
Question: How can I solve or improve this?
Upvotes: 0
Views: 147
Reputation: 35805
If you always want to use the latest versions and rebuild everything, I would move all those git repos into one and use a multi-module project.
Upvotes: 1