Skip to content

Commit

Permalink
use java 21 + spotless plugin
Browse files Browse the repository at this point in the history
Signed-off-by: Attila Mészáros <[email protected]>
  • Loading branch information
csviri committed Mar 29, 2024
1 parent 0f00d96 commit 166e602
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 79 deletions.
8 changes: 2 additions & 6 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
java-version: 21
cache: 'maven'
- name: Check code format
run: |
Expand All @@ -32,17 +32,13 @@ jobs:

build_with_integration_tests:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ 17 ]
kubernetes: [ 'v1.26.12', 'v1.27.9', 'v1.28.5' ]
steps:
- uses: actions/checkout@v4
- name: Set up Java and Maven
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: ${{ matrix.java }}
java-version: 21
cache: 'maven'
- name: Run integration tests
run: ./mvnw ${MAVEN_ARGS} clean install
98 changes: 25 additions & 73 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,19 @@
</repositories>

<properties>
<java.version>17</java.version>
<maven.compiler.release>17</maven.compiler.release>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>21</java.version>
<maven.compiler.release>${java.version}</maven.compiler.release>
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<surefire-plugin.version>3.2.5</surefire-plugin.version>
<fabric8-client.version>6.11.0</fabric8-client.version>
<directory-maven-plugin.version>1.0</directory-maven-plugin.version>
<impsort-maven-plugin.version>1.9.0</impsort-maven-plugin.version>
<formatter-maven-plugin.version>2.23.0</formatter-maven-plugin.version>
<graalvm.version>24.0.0</graalvm.version>
<mokito.version>5.11.0</mokito.version>
<mustache.version>0.9.11</mustache.version>
<qosdk.version>6.6.7</qosdk.version>
<assertj.version>3.25.3</assertj.version>
<spotless.version>2.43.0</spotless.version>
</properties>

<dependencyManagement>
Expand Down Expand Up @@ -140,30 +138,6 @@
</dependencies>

<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>net.revelc.code</groupId>
<artifactId>impsort-maven-plugin</artifactId>
<version>${impsort-maven-plugin.version}</version>
<configuration>
<cachedir>.cache</cachedir>
<groups>java.,javax.,org.,io.,com.</groups>
<staticGroups>*</staticGroups>
<staticAfter>true</staticAfter>
<removeUnused>true</removeUnused>
</configuration>
</plugin>
<plugin>
<groupId>net.revelc.code.formatter</groupId>
<artifactId>formatter-maven-plugin</artifactId>
<version>${formatter-maven-plugin.version}</version>
<configuration>
<cachedir>.cache</cachedir>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>io.quarkus</groupId>
Expand Down Expand Up @@ -212,49 +186,27 @@
<version>3.13.0</version>
</plugin>
<plugin>
<groupId>org.commonjava.maven.plugins</groupId>
<artifactId>directory-maven-plugin</artifactId>
<version>${directory-maven-plugin.version}</version>
<executions>
<execution>
<id>directories</id>
<goals>
<goal>highest-basedir</goal>
</goals>
<phase>initialize</phase>
<configuration>
<property>resourceglueoperator.project.root</property>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>net.revelc.code.formatter</groupId>
<artifactId>formatter-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>format</goal>
</goals>
<configuration>
<!--suppress UnresolvedMavenProperty -->
<configFile>${resourceglueoperator.project.root}/contributing/eclipse-google-style.xml
</configFile>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>net.revelc.code</groupId>
<artifactId>impsort-maven-plugin</artifactId>
<executions>
<execution>
<id>sort</id>
<goals>
<goal>sort</goal>
</goals>
</execution>
</executions>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<version>${spotless.version}</version>
<configuration>
<pom>
<includes>
<include>pom.xml</include>
<inclide>./**/pom.xml</inclide>
</includes>
<sortPom></sortPom>
</pom>
<java>
<eclipse>
<file>contributing/eclipse-google-style.xml</file>
</eclipse>
<importOrder>
<file>contributing/eclipse.importorder</file>
</importOrder>
<removeUnusedImports></removeUnusedImports>
</java>
</configuration>
</plugin>
</plugins>
</build>
Expand Down

0 comments on commit 166e602

Please sign in to comment.