aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-scanner-engine/test-resources
diff options
context:
space:
mode:
authorPhilippe Perrin <philippe.perrin@sonarsource.com>2022-06-27 14:44:33 +0200
committersonartech <sonartech@sonarsource.com>2022-07-12 14:30:04 +0000
commitd1f2df5d7c34fb35d00053919752cf593a05d549 (patch)
tree3e6e5883f104645c0a1637beec81926bc93b559e /sonar-scanner-engine/test-resources
parent201d5326c5e4471a1a77243cd2bd4ac71c9d4ada (diff)
downloadsonarqube-d1f2df5d7c34fb35d00053919752cf593a05d549.tar.gz
sonarqube-d1f2df5d7c34fb35d00053919752cf593a05d549.zip
SONAR-16554 fix scanner failing to create report for multi-modules projects with no code to analyse
Diffstat (limited to 'sonar-scanner-engine/test-resources')
-rw-r--r--sonar-scanner-engine/test-resources/mediumtest/xoo/multi-modules-sample2/sonar-project.properties22
-rw-r--r--sonar-scanner-engine/test-resources/mediumtest/xoo/multi-modules-sample3/module_a/a.xoo0
-rw-r--r--sonar-scanner-engine/test-resources/mediumtest/xoo/multi-modules-sample3/module_a/aaasonar-project.properties.bk22
-rw-r--r--sonar-scanner-engine/test-resources/mediumtest/xoo/multi-modules-sample3/module_a/buildpom.xml16
-rw-r--r--sonar-scanner-engine/test-resources/mediumtest/xoo/multi-modules-sample3/module_a/sonar-project.properties24
-rw-r--r--sonar-scanner-engine/test-resources/mediumtest/xoo/multi-modules-sample3/module_a/src/main/xoo/com/sonar/it/samples/modules/a1/HelloA1.xoo16
-rw-r--r--sonar-scanner-engine/test-resources/mediumtest/xoo/multi-modules-sample3/module_a/src2/main/xoo/com/sonar/it/samples/modules/a1/HelloA1.xoo1
-rw-r--r--sonar-scanner-engine/test-resources/mediumtest/xoo/multi-modules-sample3/module_b/b.xoo0
-rw-r--r--sonar-scanner-engine/test-resources/mediumtest/xoo/multi-modules-sample3/module_b/pom.xml9
-rw-r--r--sonar-scanner-engine/test-resources/mediumtest/xoo/multi-modules-sample3/module_b/src/main/xoo/com/sonar/it/samples/modules/a1/HelloB.xoo1
10 files changed, 111 insertions, 0 deletions
diff --git a/sonar-scanner-engine/test-resources/mediumtest/xoo/multi-modules-sample2/sonar-project.properties b/sonar-scanner-engine/test-resources/mediumtest/xoo/multi-modules-sample2/sonar-project.properties
new file mode 100644
index 00000000000..8e9516ae86b
--- /dev/null
+++ b/sonar-scanner-engine/test-resources/mediumtest/xoo/multi-modules-sample2/sonar-project.properties
@@ -0,0 +1,22 @@
+# Root project information
+sonar.projectKey=com.sonarsource.it.samples:multi-modules-sample
+sonar.projectName=Sonar :: Integration Tests :: Multi-modules Sample
+sonar.projectVersion=1.0-SNAPSHOT
+
+# Some properties that will be inherited by the modules
+#sonar.sources=src/main
+
+# List of the module identifiers
+sonar.modules=module_a,module_b
+
+module_a.sonar.projectKey=module_a
+module_a.sonar.projectName=Module A
+
+
+module_b.sonar.projectKey=module_b
+module_b.sonar.projectName=Module B
+
+
+sonar.working.directory=module_a/target
+module_a.sonar.working.directory=target
+module_b.sonar.working.directory=target
diff --git a/sonar-scanner-engine/test-resources/mediumtest/xoo/multi-modules-sample3/module_a/a.xoo b/sonar-scanner-engine/test-resources/mediumtest/xoo/multi-modules-sample3/module_a/a.xoo
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/sonar-scanner-engine/test-resources/mediumtest/xoo/multi-modules-sample3/module_a/a.xoo
diff --git a/sonar-scanner-engine/test-resources/mediumtest/xoo/multi-modules-sample3/module_a/aaasonar-project.properties.bk b/sonar-scanner-engine/test-resources/mediumtest/xoo/multi-modules-sample3/module_a/aaasonar-project.properties.bk
new file mode 100644
index 00000000000..32c30f6c20f
--- /dev/null
+++ b/sonar-scanner-engine/test-resources/mediumtest/xoo/multi-modules-sample3/module_a/aaasonar-project.properties.bk
@@ -0,0 +1,22 @@
+# Root project information
+sonar.projectKey=com.sonarsource.it.samples:multi-modules-sample
+sonar.projectName=Sonar :: Integration Tests :: Multi-modules Sample
+sonar.projectVersion=1.0-SNAPSHOT
+
+# Some properties that will be inherited by the modules
+
+
+
+# List of the module identifiers
+sonar.modules=., ../module_b
+
+sonar.working.directory=target
+..sonar.working.directory=target
+../module_b.working.directory=../module_b/targetC
+
+..sonar.projectKey=
+..sonar.projectName=Module A
+
+../module_b.sonar.projectKey=module_b
+../module_b.sonar.projectName=Module B
+
diff --git a/sonar-scanner-engine/test-resources/mediumtest/xoo/multi-modules-sample3/module_a/buildpom.xml b/sonar-scanner-engine/test-resources/mediumtest/xoo/multi-modules-sample3/module_a/buildpom.xml
new file mode 100644
index 00000000000..a588e760f94
--- /dev/null
+++ b/sonar-scanner-engine/test-resources/mediumtest/xoo/multi-modules-sample3/module_a/buildpom.xml
@@ -0,0 +1,16 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>xyz.test.project</groupId>
+ <artifactId>test-project</artifactId>
+ <version>1.0.LOCAL.RELEASE</version>
+ <name>test-project</name>
+ <description>test-project</description>
+ <packaging>pom</packaging>
+
+ <modules>
+ <module>../module_b</module>
+ <module>.</module>
+ </modules>
+
+</project>
diff --git a/sonar-scanner-engine/test-resources/mediumtest/xoo/multi-modules-sample3/module_a/sonar-project.properties b/sonar-scanner-engine/test-resources/mediumtest/xoo/multi-modules-sample3/module_a/sonar-project.properties
new file mode 100644
index 00000000000..5d916ab417e
--- /dev/null
+++ b/sonar-scanner-engine/test-resources/mediumtest/xoo/multi-modules-sample3/module_a/sonar-project.properties
@@ -0,0 +1,24 @@
+# Root project information
+sonar.projectKey=com.sonarsource.it.samples:multi-modules-sample
+sonar.projectName=Sonar :: Integration Tests :: Multi-modules Sample
+sonar.projectVersion=1.0-SNAPSHOT
+
+# Some properties that will be inherited by the modules
+sonar.sources=module_a/src2/main/xoo
+module_a.sonar.sources=src/main/xoo
+module_b.sonar.sources=src/main/xoo
+
+
+# List of the module identifiers
+sonar.modules=module_a, module_b
+
+sonar.working.directory=module_a/target/sonar
+module_a.sonar.working.directory=target/sonar
+module_b.sonar.working.directory=targetC/sonar
+
+module_a.sonar.projectKey=
+module_a.sonar.projectName=Module A
+
+module_b.sonar.projectKey=module_b
+module_b.sonar.projectName=Module B
+
diff --git a/sonar-scanner-engine/test-resources/mediumtest/xoo/multi-modules-sample3/module_a/src/main/xoo/com/sonar/it/samples/modules/a1/HelloA1.xoo b/sonar-scanner-engine/test-resources/mediumtest/xoo/multi-modules-sample3/module_a/src/main/xoo/com/sonar/it/samples/modules/a1/HelloA1.xoo
new file mode 100644
index 00000000000..74d29a4fa08
--- /dev/null
+++ b/sonar-scanner-engine/test-resources/mediumtest/xoo/multi-modules-sample3/module_a/src/main/xoo/com/sonar/it/samples/modules/a1/HelloA1.xoo
@@ -0,0 +1,16 @@
+package com.sonar.it.samples.modules.a1;
+
+public class HelloA1 {
+ private int i;
+ private HelloA1() {
+
+ }
+
+ public void hello() {
+ System.out.println("hello" + " xoo");
+ }
+
+ protected String getHello() {
+ return "hello";
+ }
+} \ No newline at end of file
diff --git a/sonar-scanner-engine/test-resources/mediumtest/xoo/multi-modules-sample3/module_a/src2/main/xoo/com/sonar/it/samples/modules/a1/HelloA1.xoo b/sonar-scanner-engine/test-resources/mediumtest/xoo/multi-modules-sample3/module_a/src2/main/xoo/com/sonar/it/samples/modules/a1/HelloA1.xoo
new file mode 100644
index 00000000000..9339e13010d
--- /dev/null
+++ b/sonar-scanner-engine/test-resources/mediumtest/xoo/multi-modules-sample3/module_a/src2/main/xoo/com/sonar/it/samples/modules/a1/HelloA1.xoo
@@ -0,0 +1 @@
+Root
diff --git a/sonar-scanner-engine/test-resources/mediumtest/xoo/multi-modules-sample3/module_b/b.xoo b/sonar-scanner-engine/test-resources/mediumtest/xoo/multi-modules-sample3/module_b/b.xoo
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/sonar-scanner-engine/test-resources/mediumtest/xoo/multi-modules-sample3/module_b/b.xoo
diff --git a/sonar-scanner-engine/test-resources/mediumtest/xoo/multi-modules-sample3/module_b/pom.xml b/sonar-scanner-engine/test-resources/mediumtest/xoo/multi-modules-sample3/module_b/pom.xml
new file mode 100644
index 00000000000..9f4e04bc53e
--- /dev/null
+++ b/sonar-scanner-engine/test-resources/mediumtest/xoo/multi-modules-sample3/module_b/pom.xml
@@ -0,0 +1,9 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>xyz.test.war</groupId>
+ <artifactId>module_b</artifactId>
+ <version>1.0.1.RELEASE</version>
+ <packaging>war</packaging>
+
+</project>
diff --git a/sonar-scanner-engine/test-resources/mediumtest/xoo/multi-modules-sample3/module_b/src/main/xoo/com/sonar/it/samples/modules/a1/HelloB.xoo b/sonar-scanner-engine/test-resources/mediumtest/xoo/multi-modules-sample3/module_b/src/main/xoo/com/sonar/it/samples/modules/a1/HelloB.xoo
new file mode 100644
index 00000000000..b3267d7b012
--- /dev/null
+++ b/sonar-scanner-engine/test-resources/mediumtest/xoo/multi-modules-sample3/module_b/src/main/xoo/com/sonar/it/samples/modules/a1/HelloB.xoo
@@ -0,0 +1 @@
+public class Hellob