Skip to content

Commit b65db79

Browse files
fix(ci): also install obp-parent POM to local Maven repo on test shards
When Maven reads the installed obp-commons POM to resolve its transitive deps, it fetches obp-commons' <parent> declaration (com.tesobe:obp-parent :1.10.1). That POM is also local-only and not in any remote repo. Install it first via install:install-file before installing obp-commons.
1 parent aa95608 commit b65db79

File tree

2 files changed

+32
-10
lines changed

2 files changed

+32
-10
lines changed

.github/workflows/build_container.yml

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -164,12 +164,23 @@ jobs:
164164
with:
165165
name: compiled-output
166166

167-
- name: Install obp-commons into local Maven repo
167+
- name: Install local artifacts into Maven repo
168168
run: |
169-
# obp-commons is a local multi-module dep not published to any public
170-
# repo. The compile job installs it to its own ~/.m2 but that runner
171-
# is gone. Re-install from the downloaded artifact so surefire:test
172-
# can resolve com.tesobe:obp-commons without hitting remote repos.
169+
# The compile runner's ~/.m2 is discarded after that job completes.
170+
# Install the two local multi-module artifacts so scalatest:test can
171+
# resolve com.tesobe:* without hitting remote repos.
172+
#
173+
# 1. Parent POM — obp-commons' pom.xml declares obp-parent as its
174+
# <parent>; Maven fetches it when reading transitive deps.
175+
mvn install:install-file \
176+
-Dfile=pom.xml \
177+
-DgroupId=com.tesobe \
178+
-DartifactId=obp-parent \
179+
-Dversion=1.10.1 \
180+
-Dpackaging=pom \
181+
-DgeneratePom=false
182+
# 2. obp-commons JAR with its full POM (lists compile deps inherited
183+
# by obp-api at test classpath resolution time).
173184
mvn install:install-file \
174185
-Dfile=obp-commons/target/obp-commons-1.10.1.jar \
175186
-DpomFile=obp-commons/pom.xml

.github/workflows/build_pull_request.yml

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -164,12 +164,23 @@ jobs:
164164
with:
165165
name: compiled-output
166166

167-
- name: Install obp-commons into local Maven repo
167+
- name: Install local artifacts into Maven repo
168168
run: |
169-
# obp-commons is a local multi-module dep not published to any public
170-
# repo. The compile job installs it to its own ~/.m2 but that runner
171-
# is gone. Re-install from the downloaded artifact so surefire:test
172-
# can resolve com.tesobe:obp-commons without hitting remote repos.
169+
# The compile runner's ~/.m2 is discarded after that job completes.
170+
# Install the two local multi-module artifacts so scalatest:test can
171+
# resolve com.tesobe:* without hitting remote repos.
172+
#
173+
# 1. Parent POM — obp-commons' pom.xml declares obp-parent as its
174+
# <parent>; Maven fetches it when reading transitive deps.
175+
mvn install:install-file \
176+
-Dfile=pom.xml \
177+
-DgroupId=com.tesobe \
178+
-DartifactId=obp-parent \
179+
-Dversion=1.10.1 \
180+
-Dpackaging=pom \
181+
-DgeneratePom=false
182+
# 2. obp-commons JAR with its full POM (lists compile deps inherited
183+
# by obp-api at test classpath resolution time).
173184
mvn install:install-file \
174185
-Dfile=obp-commons/target/obp-commons-1.10.1.jar \
175186
-DpomFile=obp-commons/pom.xml

0 commit comments

Comments
 (0)