Skip to content

Commit

Permalink
maven-plugins: Add integration test execution for maven target version
Browse files Browse the repository at this point in the history
For extra coverage, in addition to running integration tests on the
build maven version, we now also run the integration tests on the target
maven version.

Signed-off-by: BJ Hargrave <hargrave@us.ibm.com>
  • Loading branch information
bjhargrave committed Aug 28, 2024
1 parent 9603922 commit cfa0ee3
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 3 deletions.
4 changes: 4 additions & 0 deletions bnd-plugins/org.eclipse.transformer.bnd.analyzer/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,10 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-invoker-plugin</artifactId>
Expand Down
6 changes: 5 additions & 1 deletion maven-plugins/transformer-maven-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,14 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugin-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-invoker-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
</project>
36 changes: 34 additions & 2 deletions org.eclipse.transformer.parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,27 @@ SPDX-License-Identifier: ${project.licenses[0].name}
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.8.0</version>
<executions>
<execution>
<id>maven-target-version</id>
<phase>pre-integration-test</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.apache.maven</groupId>
<artifactId>apache-maven</artifactId>
<version>${maven.target.version}</version>
<classifier>bin</classifier>
<type>zip</type>
<outputDirectory>${project.build.directory}/it</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down Expand Up @@ -213,9 +234,10 @@ SPDX-License-Identifier: ${project.licenses[0].name}
<configuration>
<projectsDirectory>${basedir}/src/it</projectsDirectory>
<settingsFile>${basedir}/src/it/settings.xml</settingsFile>
<localRepositoryPath>${project.build.directory}/it-repo</localRepositoryPath>
<cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
<localRepositoryPath>${project.build.directory}/it/${mojo.executionId}/repo</localRepositoryPath>
<cloneProjectsTo>${project.build.directory}/it/${mojo.executionId}/projects</cloneProjectsTo>
<cloneClean>true</cloneClean>
<reportsDirectory>${project.build.directory}/invoker-reports/${mojo.executionId}</reportsDirectory>
<properties>
<project.build.sourceEncoding>${project.build.sourceEncoding}</project.build.sourceEncoding>
<project.reporting.outputEncoding>${project.reporting.outputEncoding}</project.reporting.outputEncoding>
Expand All @@ -241,6 +263,16 @@ SPDX-License-Identifier: ${project.licenses[0].name}
<goal>run</goal>
</goals>
</execution>
<execution>
<id>integration-test-maven-target-version</id>
<goals>
<goal>install</goal>
<goal>run</goal>
</goals>
<configuration>
<mavenHome>${project.build.directory}/it/apache-maven-${maven.target.version}</mavenHome>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
Expand Down

0 comments on commit cfa0ee3

Please sign in to comment.