Skip to content

Commit 282dddb

Browse files
committed
fix(ci): deactivate default profile in compat installs
The micrometer and jmx-exporter compatibility tests install local artifacts with -Dmaven.test.skip=true, which skips building the *:test-jar artifacts that the activeByDefault default profiles declare as test dependencies. Leaving the profile active broke dependency resolution (e.g. prometheus-metrics-exposition-textformats:jar:tests), failing on main and on every PR (e.g. #2173). Deactivate those profiles in the compat install (-P '!default'), the same approach the release task already uses (-P 'release,!default'). Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
1 parent 9220fd4 commit 282dddb

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

.mise/lib/jmx_exporter_compat.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,12 @@ def install_local_artifacts(root_dir: Path = Path.cwd()) -> None:
9797
# our main artifacts, and our test sources target a newer release than
9898
# the compatibility JDK supports.
9999
"-Dmaven.test.skip=true",
100+
# Deactivate the activeByDefault profiles that add test-only
101+
# dependencies (incl. a test-jar). With maven.test.skip those are not
102+
# built, so leaving the profile active breaks dependency resolution.
103+
# Same approach the release task uses (-P 'release,!default').
104+
"-P",
105+
"!default",
100106
"-Dcoverage.skip=true",
101107
"-Dcheckstyle.skip=true",
102108
"-Dwarnings=-nowarn",

.mise/lib/micrometer_compat.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,12 @@ def install_local_artifacts(root_dir: Path = Path.cwd()) -> None:
129129
# our main artifacts, and our test sources target a newer release than
130130
# the compatibility JDK supports.
131131
"-Dmaven.test.skip=true",
132+
# Deactivate the activeByDefault profiles that add test-only
133+
# dependencies (incl. a test-jar). With maven.test.skip those are not
134+
# built, so leaving the profile active breaks dependency resolution.
135+
# Same approach the release task uses (-P 'release,!default').
136+
"-P",
137+
"!default",
132138
"-Dcoverage.skip=true",
133139
"-Dcheckstyle.skip=true",
134140
"-Dwarnings=-nowarn",

0 commit comments

Comments
 (0)