Skip to content

Commit cb890b5

Browse files
Allows invoker tests to work with verify instead of install (#1471)
Sets invoker.install.scope=test so brave-tests resolves from the reactor into the invoker local repo. Also sets updatePolicy=always on local.central since it is a file-based repo with zero overhead. Signed-off-by: Adrian Cole <adrian@tetrate.io>
1 parent 04a27a5 commit cb890b5

File tree

4 files changed

+14
-4
lines changed

4 files changed

+14
-4
lines changed

build-bin/test

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@
44
#
55
# See [README.md] for an explanation of this and how CI should use it.
66

7-
# We use install, not verify, because maven-invoker-tests need brave-tests
8-
# installed into the local repository before it can run.
9-
#
107
# We avoid -T1C because some plugins don't work in parallel and also ITs are
118
# difficult to debug when failures are in parallel.
12-
./mvnw install -nsu "$@"
9+
./mvnw verify -nsu "$@"

pom.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,9 @@
154154
<maven-help-plugin.version>3.5.1</maven-help-plugin.version>
155155
<maven-install-plugin.version>3.1.4</maven-install-plugin.version>
156156
<maven-invoker-plugin.version>3.9.1</maven-invoker-plugin.version>
157+
<!-- default is runtime, but test-scoped reactor deps like brave-tests
158+
need to be in the invoker local repo for IT projects to resolve -->
159+
<invoker.install.scope>test</invoker.install.scope>
157160
<maven-javadoc-plugin.version>3.12.0</maven-javadoc-plugin.version>
158161
<maven-jar-plugin.version>3.5.0</maven-jar-plugin.version>
159162
<maven-release-plugin.version>3.3.1</maven-release-plugin.version>

spring-beans/pom.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,12 @@
5858
<version>${project.version}</version>
5959
<scope>test</scope>
6060
</dependency>
61+
<dependency>
62+
<groupId>${project.groupId}</groupId>
63+
<artifactId>brave-tests</artifactId>
64+
<version>${project.version}</version>
65+
<scope>test</scope>
66+
</dependency>
6167
</dependencies>
6268

6369
<build>

src/it/settings.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,11 @@
1818
<url>@localRepositoryUrl@</url>
1919
<releases>
2020
<enabled>true</enabled>
21+
<updatePolicy>always</updatePolicy>
2122
</releases>
2223
<snapshots>
2324
<enabled>true</enabled>
25+
<updatePolicy>always</updatePolicy>
2426
</snapshots>
2527
</repository>
2628
</repositories>
@@ -30,9 +32,11 @@
3032
<url>@localRepositoryUrl@</url>
3133
<releases>
3234
<enabled>true</enabled>
35+
<updatePolicy>always</updatePolicy>
3336
</releases>
3437
<snapshots>
3538
<enabled>true</enabled>
39+
<updatePolicy>always</updatePolicy>
3640
</snapshots>
3741
</pluginRepository>
3842
</pluginRepositories>

0 commit comments

Comments
 (0)