Skip to content

Commit

Permalink
Update build plugin configuration to improve bndrun management
Browse files Browse the repository at this point in the history
Fixes eclipse#301

Introduces build profiles for sensiNact to enforce consistent bndrun resolutions in CI and a profile for rapid turnaround of dependabot updates

Signed-off-by: Tim Ward <timorthyjward@apache.org>
  • Loading branch information
timothyjward committed Jan 16, 2024
1 parent 3b4aa1d commit 4c44f84
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
distribution: 'temurin'
cache: maven
- name: Build with Maven
run: mvn -B verify --file pom.xml
run: mvn -P ci-build -B verify --file pom.xml

# Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive
- name: Update dependency graph
Expand Down
34 changes: 32 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,11 @@

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

<!-- Default properties for resolver setup in development -->
<save.test.bndrun.changes>true</save.test.bndrun.changes>
<verify.test.bndruns>false</verify.test.bndruns>

</properties>

<repositories>
Expand Down Expand Up @@ -586,8 +591,8 @@
<goal>resolve</goal>
</goals>
<configuration>
<writeOnChanges>true</writeOnChanges>
<failOnChanges>false</failOnChanges>
<writeOnChanges>${save.test.bndrun.changes}</writeOnChanges>
<failOnChanges>${verify.test.bndruns}</failOnChanges>
<includeDependencyManagement>true</includeDependencyManagement>
<scopes>
<scope>compile</scope>
Expand Down Expand Up @@ -668,6 +673,31 @@


<profiles>
<!-- Used in CI to treat bndruns as immutable source -->
<profile>
<id>ci-build</id>
<properties>
<save.test.bndrun.changes>false</save.test.bndrun.changes>
<verify.test.bndruns>true</verify.test.bndruns>
</properties>
</profile>
<!-- Used by developers to quickly update bndruns for dependabot updates -->
<profile>
<id>dependabot</id>
<properties>
<save.test.bndrun.changes>true</save.test.bndrun.changes>
<verify.test.bndruns>false</verify.test.bndruns>
<skipTests>true</skipTests>
</properties>
</profile>
<!-- Used by developers for normal development (restating the default) -->
<profile>
<id>dev</id>
<properties>
<save.test.bndrun.changes>true</save.test.bndrun.changes>
<verify.test.bndruns>false</verify.test.bndruns>
</properties>
</profile>
<profile>
<id>eclipse-licenses-check</id>
<activation>
Expand Down

0 comments on commit 4c44f84

Please sign in to comment.