diff --git a/.github/workflows/sonarCloud-scan.yaml b/.github/workflows/sonarCloud-scan.yaml
new file mode 100644
index 00000000000..a9497b80a2f
--- /dev/null
+++ b/.github/workflows/sonarCloud-scan.yaml
@@ -0,0 +1,49 @@
+name: Sonar Scan
+
+on:
+ # Trigger analysis when pushing to your main branches, and when creating a pull request.
+ push:
+ branches:
+ - develop
+ - fix-sonarCloudAnalysisViagutHubActions
+ - 'releases/**'
+ pull_request:
+ types: [opened, synchronize, reopened]
+
+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 org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -DskipTests -Dsonar.projectKey=eclipse_kapua -Dsonar.organization=eclipse-github
+
diff --git a/pom.xml b/pom.xml
index 5f2c0c56321..f0e00f9d99b 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
@@ -501,6 +502,11 @@
+
+ org.sonarsource.scanner.maven
+ sonar-maven-plugin
+ ${sonar-maven-plugin.version}
+
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