Skip to content

Commit

Permalink
Use the new verify goal of the bnd-resolver-maven-plugin in CI
Browse files Browse the repository at this point in the history
When running CI builds we want to validate the -runbundles present in bndrun files. This is best done using the new verify goal of the bnd-resolver-maven-plugin, which is less brittle than the resolve goal.

Signed-off-by: Tim Ward <timothyjward@apache.org>
  • Loading branch information
timothyjward committed Jan 31, 2024
1 parent 9ee83a5 commit b80b716
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 3 deletions.
27 changes: 25 additions & 2 deletions distribution/launcher/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@
</parent>
<artifactId>launcher</artifactId>
<name>Eclipse sensiNact Feature Launcher</name>
<description>This project contains code for launching sensiNact gateway
features</description>
<description>This project contains code for launching sensiNact gateway features</description>

<properties>
<verify.test.bndruns>true</verify.test.bndruns>
Expand Down Expand Up @@ -87,6 +86,30 @@
<plugin>
<groupId>biz.aQute.bnd</groupId>
<artifactId>bnd-resolver-maven-plugin</artifactId>
<executions>
<execution>
<id>verify-export</id>
<phase>package</phase>
<goals>
<goal>verify</goal>
</goals>
<configuration>
<includeDependencyManagement>true</includeDependencyManagement>
<scopes>
<scope>compile</scope>
<scope>runtime</scope>
</scopes>
<bundles>
<bundle>
${project.build.directory}/${project.build.finalName}.jar
</bundle>
</bundles>
<bndruns>
<bndrun>export.bndrun</bndrun>
</bndruns>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>
Expand Down
45 changes: 44 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@

<!-- plugin dependency versions -->
<bnd.version>7.0.0</bnd.version>
<bnd.resolver.version>7.1.0-SNAPSHOT</bnd.resolver.version>

<!-- Default properties for resolver setup in development -->
<save.test.bndrun.changes>true</save.test.bndrun.changes>
Expand Down Expand Up @@ -589,7 +590,7 @@
<plugin>
<groupId>biz.aQute.bnd</groupId>
<artifactId>bnd-resolver-maven-plugin</artifactId>
<version>${bnd.version}</version>
<version>${bnd.resolver.version}</version>
<executions>
<execution>
<id>resolve-test</id>
Expand Down Expand Up @@ -689,6 +690,48 @@
<save.test.bndrun.changes>false</save.test.bndrun.changes>
<verify.test.bndruns>false</verify.test.bndruns>
</properties>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>biz.aQute.bnd</groupId>
<artifactId>bnd-resolver-maven-plugin</artifactId>
<version>${bnd.resolver.version}</version>
<executions>
<execution>
<id>resolve-test</id>
<configuration>
<skip>true</skip>
</configuration>
</execution>
<execution>
<id>verify-test</id>
<phase>pre-integration-test</phase>
<goals>
<goal>verify</goal>
</goals>
<configuration>
<includeDependencyManagement>true</includeDependencyManagement>
<scopes>
<scope>compile</scope>
<scope>runtime</scope>
<scope>test</scope>
</scopes>
<bundles>
<bundle>
${project.build.directory}/${project.build.finalName}-tests.jar
</bundle>
</bundles>
<bndruns>
<include>*-test.bndrun</include>
</bndruns>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
</build>
</profile>
<!-- Used by developers to quickly update bndruns for dependabot updates -->
<profile>
Expand Down

0 comments on commit b80b716

Please sign in to comment.