Skip to content

Commit

Permalink
Fix invoker-plugin filling ~/.m2 with junk
Browse files Browse the repository at this point in the history
  • Loading branch information
ascopes committed Apr 20, 2024
1 parent c8bcd23 commit a6d4c50
Show file tree
Hide file tree
Showing 35 changed files with 73 additions and 39 deletions.
2 changes: 1 addition & 1 deletion .mvn/jvm.config
Original file line number Diff line number Diff line change
@@ -1 +1 @@
-XX:+TieredCompilation -XX:TieredStopAtLevel=1
-XX:+TieredCompilation -XX:TieredStopAtLevel=1 -XX:+UseG1GC
28 changes: 15 additions & 13 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -372,19 +372,6 @@
<artifactId>maven-invoker-plugin</artifactId>
<version>${maven-invoker-plugin.version}</version>

<configuration>
<addTestClassPath>true</addTestClassPath>
<cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
<failIfNoProjects>true</failIfNoProjects>
<postBuildHookScript>test</postBuildHookScript>
<settingsFile>src/it/settings.xml</settingsFile>
<showErrors>true</showErrors>
<showVersion>true</showVersion>
<streamLogs>true</streamLogs>
<streamLogsOnFailures>true</streamLogsOnFailures>
<writeJunitReport>true</writeJunitReport>
</configuration>

<executions>
<execution>
<id>integration-test</id>
Expand All @@ -393,6 +380,21 @@
<goal>install</goal>
<goal>run</goal>
</goals>

<configuration>
<addTestClassPath>true</addTestClassPath>
<cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
<failIfNoProjects>true</failIfNoProjects>
<!-- Warning: placing this inside the cloneProjectsTo path triggers a resolution bug in the plugin -->
<localRepositoryPath>${project.basedir}/target/it-repo</localRepositoryPath>
<postBuildHookScript>test</postBuildHookScript>
<settingsFile>src/it/settings.xml</settingsFile>
<showErrors>true</showErrors>
<showVersion>true</showVersion>
<streamLogs>true</streamLogs>
<streamLogsOnFailures>true</streamLogsOnFailures>
<writeJunitReport>true</writeJunitReport>
</configuration>
</execution>
</executions>
</plugin>
Expand Down
9 changes: 9 additions & 0 deletions protobuf-maven-plugin/src/it/WRITING_ITS.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,15 @@ The `invoker.goals` can be changed to use any combination of Maven goals.
The `invoker.properties` within this directory is inherited by all projects implicitly for global
configuration.

## Naming

The project directory name should summarise what the test is for, starting with a GitHub issue
number if relevant.

The `groupId` of the project should be the directory name. This ensures that each test is isolated.

The local repository can be found in the `target/it-repo` directory.

## Skipping tests conditionally

If there are certain conditions where the test should not run, you can create a script within the test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
<relativePath>../../../../pom.xml</relativePath>
</parent>

<artifactId>gh-132-duplicate-maven-dependencies</artifactId>
<groupId>gh-132-duplicate-maven-dependencies</groupId>
<artifactId>parent</artifactId>
<packaging>pom</packaging>

<modules>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>@project.groupId@</groupId>
<artifactId>gh-132-duplicate-maven-dependencies</artifactId>
<groupId>gh-132-duplicate-maven-dependencies</groupId>
<artifactId>parent</artifactId>
<version>@project.version@</version>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>@project.groupId@</groupId>
<artifactId>gh-132-duplicate-maven-dependencies</artifactId>
<groupId>gh-132-duplicate-maven-dependencies</groupId>
<artifactId>parent</artifactId>
<version>@project.version@</version>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>@project.groupId@</groupId>
<artifactId>gh-132-duplicate-maven-dependencies</artifactId>
<groupId>gh-132-duplicate-maven-dependencies</groupId>
<artifactId>parent</artifactId>
<version>@project.version@</version>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>@project.groupId@</groupId>
<artifactId>gh-132-duplicate-maven-dependencies</artifactId>
<groupId>gh-132-duplicate-maven-dependencies</groupId>
<artifactId>parent</artifactId>
<version>@project.version@</version>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>@project.groupId@</groupId>
<artifactId>gh-132-duplicate-maven-dependencies</artifactId>
<groupId>gh-132-duplicate-maven-dependencies</groupId>
<artifactId>parent</artifactId>
<version>@project.version@</version>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
<relativePath>../../../../pom.xml</relativePath>
</parent>

<artifactId>gh-134-multiple-artifact-versions</artifactId>
<groupId>gh-134-multiple-artifact-versions</groupId>
<artifactId>parent</artifactId>
<packaging>pom</packaging>

<modules>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>@project.groupId@</groupId>
<artifactId>gh-134-multiple-artifact-versions</artifactId>
<groupId>gh-134-multiple-artifact-versions</groupId>
<artifactId>parent</artifactId>
<version>@project.version@</version>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>@project.groupId@</groupId>
<artifactId>gh-134-multiple-artifact-versions</artifactId>
<groupId>gh-134-multiple-artifact-versions</groupId>
<artifactId>parent</artifactId>
<version>@project.version@</version>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>@project.groupId@</groupId>
<artifactId>gh-134-multiple-artifact-versions</artifactId>
<groupId>gh-134-multiple-artifact-versions</groupId>
<artifactId>parent</artifactId>
<version>@project.version@</version>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>@project.groupId@</groupId>
<artifactId>gh-134-multiple-artifact-versions</artifactId>
<groupId>gh-134-multiple-artifact-versions</groupId>
<artifactId>parent</artifactId>
<version>@project.version@</version>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
<relativePath>../../../../pom.xml</relativePath>
</parent>

<artifactId>gh-135-compile-dependencies</artifactId>
<groupId>gh-135-compile-dependencies</groupId>
<artifactId>parent</artifactId>
<packaging>pom</packaging>

<modules>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>@project.groupId@</groupId>
<groupId>gh-135-compile-dependencies</groupId>
<artifactId>gh-135-compile-dependencies</artifactId>
<version>@project.version@</version>
</parent>
Expand Down
1 change: 1 addition & 0 deletions protobuf-maven-plugin/src/it/grpc-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
<relativePath>../../../../pom.xml</relativePath>
</parent>

<groupId>grpc-plugin</groupId>
<artifactId>grpc-plugin</artifactId>

<properties>
Expand Down
1 change: 1 addition & 0 deletions protobuf-maven-plugin/src/it/help-goal/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,6 @@
<relativePath>../../../../pom.xml</relativePath>
</parent>

<groupId>help-goal</groupId>
<artifactId>help-goal</artifactId>
</project>
1 change: 1 addition & 0 deletions protobuf-maven-plugin/src/it/http-url-grpc-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
<relativePath>../../../../pom.xml</relativePath>
</parent>

<groupId>http-url-grpc-plugin</groupId>
<artifactId>http-url-grpc-plugin</artifactId>

<properties>
Expand Down
1 change: 1 addition & 0 deletions protobuf-maven-plugin/src/it/http-url-protoc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
<relativePath>../../../../pom.xml</relativePath>
</parent>

<groupId>http-url-protoc</groupId>
<artifactId>http-url-protoc</artifactId>

<properties>
Expand Down
1 change: 0 additions & 1 deletion protobuf-maven-plugin/src/it/invoker.properties
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,5 @@
# limitations under the License.
#

invoker.profiles = its
invoker.quiet = false
invoker.timeoutInSeconds = 300
1 change: 1 addition & 0 deletions protobuf-maven-plugin/src/it/java-main-empty/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
<relativePath>../../../../pom.xml</relativePath>
</parent>

<groupId>java-main-empty</groupId>
<artifactId>java-main-empty</artifactId>

<properties>
Expand Down
1 change: 1 addition & 0 deletions protobuf-maven-plugin/src/it/java-main-lite/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
<relativePath>../../../../pom.xml</relativePath>
</parent>

<groupId>java-main-lite</groupId>
<artifactId>java-main-lite</artifactId>

<properties>
Expand Down
1 change: 1 addition & 0 deletions protobuf-maven-plugin/src/it/java-main/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
<relativePath>../../../../pom.xml</relativePath>
</parent>

<groupId>java-main</groupId>
<artifactId>java-main</artifactId>

<properties>
Expand Down
1 change: 1 addition & 0 deletions protobuf-maven-plugin/src/it/java-paths/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
<relativePath>../../../../pom.xml</relativePath>
</parent>

<groupId>java-paths</groupId>
<artifactId>java-paths</artifactId>

<properties>
Expand Down
1 change: 1 addition & 0 deletions protobuf-maven-plugin/src/it/java-test-empty/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
<relativePath>../../../../pom.xml</relativePath>
</parent>

<groupId>java-test-empty</groupId>
<artifactId>java-test-empty</artifactId>

<properties>
Expand Down
1 change: 1 addition & 0 deletions protobuf-maven-plugin/src/it/java-test-lite/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
<relativePath>../../../../pom.xml</relativePath>
</parent>

<groupId>java-test-lite</groupId>
<artifactId>java-test-lite</artifactId>

<properties>
Expand Down
1 change: 1 addition & 0 deletions protobuf-maven-plugin/src/it/java-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
<relativePath>../../../../pom.xml</relativePath>
</parent>

<groupId>java-test</groupId>
<artifactId>java-test</artifactId>

<properties>
Expand Down
1 change: 1 addition & 0 deletions protobuf-maven-plugin/src/it/kotlin-main/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
<relativePath>../../../../pom.xml</relativePath>
</parent>

<groupId>kotlin-main</groupId>
<artifactId>kotlin-main</artifactId>

<properties>
Expand Down
1 change: 1 addition & 0 deletions protobuf-maven-plugin/src/it/kotlin-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
<relativePath>../../../../pom.xml</relativePath>
</parent>

<groupId>kotlin-test</groupId>
<artifactId>kotlin-test</artifactId>

<properties>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
<relativePath>../../../../pom.xml</relativePath>
</parent>

<groupId>maven-dependency-protopath</groupId>
<artifactId>maven-dependency-protopath</artifactId>

<properties>
Expand Down
2 changes: 2 additions & 0 deletions protobuf-maven-plugin/src/it/path-protoc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@
<relativePath>../../../../pom.xml</relativePath>
</parent>

<groupId>path-protoc</groupId>
<artifactId>path-protoc</artifactId>

<properties>
<protobuf.version>3.25.0</protobuf.version>
</properties>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
<relativePath>../../../../pom.xml</relativePath>
</parent>

<groupId>reactor-grpc-binary-plugin</groupId>
<artifactId>reactor-grpc-binary-plugin</artifactId>

<properties>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
<relativePath>../../../../pom.xml</relativePath>
</parent>

<groupId>reactor-grpc-jvm-plugin</groupId>
<artifactId>reactor-grpc-jvm-plugin</artifactId>


<properties>
<grpc.version>1.61.1</grpc.version>
<javax-annotation-api.version>1.3.2</javax-annotation-api.version>
Expand Down
6 changes: 5 additions & 1 deletion protobuf-maven-plugin/src/it/settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,13 @@
-->
<settings>
<activeProfiles>
<activeProfile>it</activeProfile>
</activeProfiles>

<profiles>
<profile>
<id>its</id>
<id>it</id>

<repositories>
<repository>
Expand Down

0 comments on commit a6d4c50

Please sign in to comment.