diff --git a/.github/workflows/sonarCloud-scan.yaml b/.github/workflows/sonarCloud-scan.yaml
new file mode 100644
index 00000000000..17519fb5245
--- /dev/null
+++ b/.github/workflows/sonarCloud-scan.yaml
@@ -0,0 +1,49 @@
+name: Sonar Scan
+
+on:
+ push:
+ branches:
+ - 'develop'
+ - 'release-**'
+ pull_request:
+ branches:
+ - 'develop'
+ - 'release-**'
+
+jobs:
+ build:
+ name: Analyze
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ with:
+ fetch-depth: 0
+ - name: Set up JDK 11
+ uses: actions/setup-java@v4
+ with:
+ java-version: 11
+ distribution: 'zulu'
+ - name: Set up Node 16
+ uses: actions/setup-node@v4
+ with:
+ node-version: 16
+ - name: Install Swagger CLI # Installs Swagger CLI to bundle OpenAPI files
+ run: 'npm install -g @apidevtools/swagger-cli'
+ - name: Cache SonarQube packages
+ uses: actions/cache@v4
+ with:
+ path: ~/.sonar/cache
+ key: ${{ runner.os }}-sonar
+ restore-keys: ${{ runner.os }}-sonar
+ - name: Cache Maven packages
+ uses: actions/cache@v4
+ with:
+ path: ~/.m2
+ key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
+ restore-keys: ${{ runner.os }}-m2
+ - name: Build and analyze
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
+ run: mvn -B compile -PsonarScan
+
diff --git a/pom.xml b/pom.xml
index 5f2c0c56321..484b09d6240 100644
--- a/pom.xml
+++ b/pom.xml
@@ -169,6 +169,7 @@
4.4.2
1.9
1.6.5
+ 5.0.0.4389
1.5
3.0.0-M7
@@ -177,7 +178,10 @@
yyyy-MM-dd
${maven.build.timestamp}
+
https://sonarcloud.io
+ eclipse_kapua
+ eclipse-github
@@ -501,6 +505,11 @@
+
+ org.sonarsource.scanner.maven
+ sonar-maven-plugin
+ ${sonar-maven-plugin.version}
+
@@ -2837,6 +2846,27 @@
+
+
+ sonarScan
+
+
+
+ org.sonarsource.scanner.maven
+ sonar-maven-plugin
+
+
+ compile
+
+ sonar
+
+
+
+
+
+
+
+
diff --git a/simulator-kura/pom.xml b/simulator-kura/pom.xml
index f22f8bc56ad..1929cf82af1 100644
--- a/simulator-kura/pom.xml
+++ b/simulator-kura/pom.xml
@@ -19,14 +19,12 @@
org.eclipse.kapua
kapua
2.1.0-SNAPSHOT
- ..
kapua-simulator-kura
This is a framework for simulating Eclipse Kura IoT gateway instances
- UTF-8
kapua
6.0.0