Skip to content

Commit

Permalink
Specify a localRepositoryPath for integration tests.
Browse files Browse the repository at this point in the history
The upgrade to version 3.5.0 of `maven-invoker-plugin` caused this project to fail, with this message:
```
Failed to execute goal org.apache.maven.plugins:maven-invoker-plugin:3.5.0:install (integration-test) on project auto-value: Failed to install artifact com.google.auto:auto-common:jar:1.2.1: cannot install /home/runner/.m2/repository/com/google/auto/auto-common/1.2.1/auto-common-1.2.1.jar to same path -> [Help 1]
```

Setting `localRepositoryPath` fixes this.

I believe the change in behaviour was caused by [this PR](apache/maven-invoker-plugin#174), which may have broken other projects similarly.

RELNOTES=n/a
PiperOrigin-RevId: 510172220
  • Loading branch information
eamonnmcmanus authored and Google Java Core Libraries committed Feb 16, 2023
1 parent 01f2004 commit 2f9be2b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions factory/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@
<configuration>
<addTestClassPath>true</addTestClassPath>
<cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
<localRepositoryPath>${project.build.directory}/it-repo</localRepositoryPath>
<pomIncludes>
<pomInclude>*/pom.xml</pomInclude>
</pomIncludes>
Expand Down
1 change: 1 addition & 0 deletions value/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@
<configuration>
<addTestClassPath>true</addTestClassPath>
<cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
<localRepositoryPath>${project.build.directory}/it-repo</localRepositoryPath>
<pomIncludes>
<pomInclude>*/pom.xml</pomInclude>
</pomIncludes>
Expand Down

0 comments on commit 2f9be2b

Please sign in to comment.