aboutsummaryrefslogtreecommitdiffstats
path: root/it/it-projects/maven
diff options
context:
space:
mode:
authorDuarte Meneses <duarte.meneses@sonarsource.com>2015-08-14 14:49:49 +0200
committerDuarte Meneses <duarte.meneses@sonarsource.com>2015-08-18 09:36:10 +0200
commit2a5eea17c29c46566a13f84eead54b202a9bae83 (patch)
tree6e360aeea61672f86d090e52f281f6319953d4e2 /it/it-projects/maven
parent48bb07308a21354e7f904a03b0c593158bde82b5 (diff)
downloadsonarqube-2a5eea17c29c46566a13f84eead54b202a9bae83.tar.gz
sonarqube-2a5eea17c29c46566a13f84eead54b202a9bae83.zip
Migrate batch ITs
Diffstat (limited to 'it/it-projects/maven')
-rw-r--r--it/it-projects/maven/inclusions_apply_to_source_dirs/pom.xml22
-rw-r--r--it/it-projects/maven/inclusions_apply_to_source_dirs/src/main/java/Hello.java5
-rw-r--r--it/it-projects/maven/inclusions_apply_to_source_dirs/src/main/java/Hello2.java5
-rw-r--r--it/it-projects/maven/jee/ear-module/pom.xml61
-rw-r--r--it/it-projects/maven/jee/ejb-module/pom.xml28
-rw-r--r--it/it-projects/maven/jee/ejb-module/src/main/java/org/sonar/tests/App.java13
-rw-r--r--it/it-projects/maven/jee/ejb-module/src/main/resources/META-INF/ejb-jar.xml13
-rw-r--r--it/it-projects/maven/jee/ejb-module/src/test/java/org/sonar/tests/AppTest.java38
-rw-r--r--it/it-projects/maven/jee/java-module/pom.xml12
-rw-r--r--it/it-projects/maven/jee/java-module/src/main/java/org/sonar/tests/App.java13
-rw-r--r--it/it-projects/maven/jee/java-module/src/test/java/org/sonar/tests/AppTest.java38
-rw-r--r--it/it-projects/maven/jee/pom.xml24
-rw-r--r--it/it-projects/maven/jee/web-module/pom.xml50
-rw-r--r--it/it-projects/maven/jee/web-module/src/main/webapp/WEB-INF/web.xml7
-rw-r--r--it/it-projects/maven/jee/web-module/src/main/webapp/index.jsp5
-rw-r--r--it/it-projects/maven/maven-bad-parameters/module_a/pom.xml13
-rw-r--r--it/it-projects/maven/maven-bad-parameters/module_a/src/main/java/org/sonar/tests/Hello.java10
-rw-r--r--it/it-projects/maven/maven-bad-parameters/module_b/pom.xml13
-rw-r--r--it/it-projects/maven/maven-bad-parameters/module_b/src/main/java/org/sonar/tests/Hello.java10
-rw-r--r--it/it-projects/maven/maven-bad-parameters/pom.xml47
-rw-r--r--it/it-projects/maven/maven-bad-sources-property/pom.xml22
-rw-r--r--it/it-projects/maven/maven-bad-sources-property/src/main/java/Hello.java5
-rw-r--r--it/it-projects/maven/maven-bad-tests-property/pom.xml22
-rw-r--r--it/it-projects/maven/maven-bad-tests-property/src/main/java/Hello.java5
-rw-r--r--it/it-projects/maven/maven-bad-tests-property/src/test/java/HelloTest.java3
-rw-r--r--it/it-projects/maven/maven-extensions/pom.xml25
-rw-r--r--it/it-projects/maven/maven-extensions/src/main/java/org/sonar/tests/mavenExtensions/Hello.java13
-rw-r--r--it/it-projects/maven/maven-only-test-dir/pom.xml18
-rw-r--r--it/it-projects/maven/maven-only-test-dir/src/test/java/HelloTest.java10
-rw-r--r--it/it-projects/maven/maven-override-sources/pom.xml22
-rw-r--r--it/it-projects/maven/maven-override-sources/src/main/java/Hello.java5
-rw-r--r--it/it-projects/maven/maven-override-sources/src/main/java2/Hello2.java5
-rw-r--r--it/it-projects/maven/modules-declaration/module_a/pom.xml14
-rw-r--r--it/it-projects/maven/modules-declaration/module_a/src/main/java/HelloA.java2
-rw-r--r--it/it-projects/maven/modules-declaration/module_b/pom.xml14
-rw-r--r--it/it-projects/maven/modules-declaration/module_b/src/main/java/HelloB.java2
-rw-r--r--it/it-projects/maven/modules-declaration/module_c/pom.xml14
-rw-r--r--it/it-projects/maven/modules-declaration/module_c/src/main/java/HelloC.java2
-rw-r--r--it/it-projects/maven/modules-declaration/module_d/mypom.xml14
-rw-r--r--it/it-projects/maven/modules-declaration/module_d/src/main/java/HelloD.java2
-rw-r--r--it/it-projects/maven/modules-declaration/module_e/mypom14
-rw-r--r--it/it-projects/maven/modules-declaration/module_e/src/main/java/HelloE.java2
-rw-r--r--it/it-projects/maven/modules-declaration/pom.xml27
-rw-r--r--it/it-projects/maven/modules-order/README.txt5
-rw-r--r--it/it-projects/maven/modules-order/module_a/pom.xml14
-rw-r--r--it/it-projects/maven/modules-order/module_a/src/main/java/HelloA.java2
-rw-r--r--it/it-projects/maven/modules-order/module_b/pom.xml14
-rw-r--r--it/it-projects/maven/modules-order/module_b/src/main/java/HelloB.java2
-rw-r--r--it/it-projects/maven/modules-order/parent/pom.xml10
-rw-r--r--it/it-projects/maven/modules-order/pom.xml17
-rw-r--r--it/it-projects/maven/project-with-module-without-sources/pom.xml14
-rw-r--r--it/it-projects/maven/project-with-module-without-sources/with-sources/pom.xml15
-rw-r--r--it/it-projects/maven/project-with-module-without-sources/with-sources/src/main/java/sample/Sample.java12
-rw-r--r--it/it-projects/maven/project-with-module-without-sources/without-sources/pom.xml15
-rw-r--r--it/it-projects/maven/shade-with-dependency-reduced-pom/child1/pom.xml13
-rw-r--r--it/it-projects/maven/shade-with-dependency-reduced-pom/child2/pom.xml47
-rw-r--r--it/it-projects/maven/shade-with-dependency-reduced-pom/pom.xml19
57 files changed, 888 insertions, 0 deletions
diff --git a/it/it-projects/maven/inclusions_apply_to_source_dirs/pom.xml b/it/it-projects/maven/inclusions_apply_to_source_dirs/pom.xml
new file mode 100644
index 00000000000..7727b4aa943
--- /dev/null
+++ b/it/it-projects/maven/inclusions_apply_to_source_dirs/pom.xml
@@ -0,0 +1,22 @@
+<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>com.sonarsource.it.samples</groupId>
+ <artifactId>inclusions_apply_to_source_dirs</artifactId>
+ <version>1.0-SNAPSHOT</version>
+
+ <properties>
+ <sonar.inclusions>src/main/java/**/Hello2.java</sonar.inclusions>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.11</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+</project>
diff --git a/it/it-projects/maven/inclusions_apply_to_source_dirs/src/main/java/Hello.java b/it/it-projects/maven/inclusions_apply_to_source_dirs/src/main/java/Hello.java
new file mode 100644
index 00000000000..224a668297d
--- /dev/null
+++ b/it/it-projects/maven/inclusions_apply_to_source_dirs/src/main/java/Hello.java
@@ -0,0 +1,5 @@
+public class Hello {
+ public String hello() {
+ return "hello";
+ }
+}
diff --git a/it/it-projects/maven/inclusions_apply_to_source_dirs/src/main/java/Hello2.java b/it/it-projects/maven/inclusions_apply_to_source_dirs/src/main/java/Hello2.java
new file mode 100644
index 00000000000..4bb53827bb6
--- /dev/null
+++ b/it/it-projects/maven/inclusions_apply_to_source_dirs/src/main/java/Hello2.java
@@ -0,0 +1,5 @@
+public class Hello2 {
+ public String hello() {
+ return "hello";
+ }
+}
diff --git a/it/it-projects/maven/jee/ear-module/pom.xml b/it/it-projects/maven/jee/ear-module/pom.xml
new file mode 100644
index 00000000000..b432a49d0c2
--- /dev/null
+++ b/it/it-projects/maven/jee/ear-module/pom.xml
@@ -0,0 +1,61 @@
+<?xml version="1.0"?>
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>com.sonarsource.it.samples.jee</groupId>
+ <artifactId>parent</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </parent>
+ <artifactId>ear-module</artifactId>
+ <name>ear-module</name>
+ <packaging>ear</packaging>
+
+ <dependencies>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>java-module</artifactId>
+ <version>${project.version}</version>
+ <type>jar</type>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>ejb-module</artifactId>
+ <version>${project.version}</version>
+ <type>ejb</type>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>web-module</artifactId>
+ <version>${project.version}</version>
+ <type>war</type>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-ear-plugin</artifactId>
+ <version>2.3.1</version>
+ <configuration>
+ <modules>
+ <javaModule>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>java-module</artifactId>
+ </javaModule>
+ <ejbModule>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>ejb-module</artifactId>
+ </ejbModule>
+ <webModule>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>web-module</artifactId>
+ <contextRoot>jee-sample</contextRoot>
+ </webModule>
+ </modules>
+ </configuration>
+ </plugin>
+
+ </plugins>
+ </build>
+</project> \ No newline at end of file
diff --git a/it/it-projects/maven/jee/ejb-module/pom.xml b/it/it-projects/maven/jee/ejb-module/pom.xml
new file mode 100644
index 00000000000..c2aafad18d6
--- /dev/null
+++ b/it/it-projects/maven/jee/ejb-module/pom.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0"?>
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>com.sonarsource.it.samples.jee</groupId>
+ <artifactId>parent</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </parent>
+ <artifactId>ejb-module</artifactId>
+ <name>ejb-module</name>
+ <packaging>ejb</packaging>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-ejb_2.1_spec</artifactId>
+ <version>1.1</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>java-module</artifactId>
+ <version>${project.version}</version>
+ <scope>runtime</scope>
+ </dependency>
+ </dependencies>
+</project> \ No newline at end of file
diff --git a/it/it-projects/maven/jee/ejb-module/src/main/java/org/sonar/tests/App.java b/it/it-projects/maven/jee/ejb-module/src/main/java/org/sonar/tests/App.java
new file mode 100644
index 00000000000..ddc6d08253b
--- /dev/null
+++ b/it/it-projects/maven/jee/ejb-module/src/main/java/org/sonar/tests/App.java
@@ -0,0 +1,13 @@
+package org.sonar.tests;
+
+/**
+ * Hello world!
+ *
+ */
+public class App
+{
+ public static void main( String[] args )
+ {
+ System.out.println( "Hello World!" );
+ }
+}
diff --git a/it/it-projects/maven/jee/ejb-module/src/main/resources/META-INF/ejb-jar.xml b/it/it-projects/maven/jee/ejb-module/src/main/resources/META-INF/ejb-jar.xml
new file mode 100644
index 00000000000..f97427d26aa
--- /dev/null
+++ b/it/it-projects/maven/jee/ejb-module/src/main/resources/META-INF/ejb-jar.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+
+<!DOCTYPE ejb-jar PUBLIC
+ '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN'
+ 'http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd'>
+
+<ejb-jar>
+ <enterprise-beans>
+
+
+ </enterprise-beans>
+ <assembly-descriptor></assembly-descriptor>
+</ejb-jar>
diff --git a/it/it-projects/maven/jee/ejb-module/src/test/java/org/sonar/tests/AppTest.java b/it/it-projects/maven/jee/ejb-module/src/test/java/org/sonar/tests/AppTest.java
new file mode 100644
index 00000000000..ce03155a801
--- /dev/null
+++ b/it/it-projects/maven/jee/ejb-module/src/test/java/org/sonar/tests/AppTest.java
@@ -0,0 +1,38 @@
+package org.sonar.tests;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+/**
+ * Unit test for simple App.
+ */
+public class AppTest
+ extends TestCase
+{
+ /**
+ * Create the test case
+ *
+ * @param testName name of the test case
+ */
+ public AppTest( String testName )
+ {
+ super( testName );
+ }
+
+ /**
+ * @return the suite of tests being tested
+ */
+ public static Test suite()
+ {
+ return new TestSuite( AppTest.class );
+ }
+
+ /**
+ * Rigourous Test :-)
+ */
+ public void testApp()
+ {
+ assertTrue( true );
+ }
+}
diff --git a/it/it-projects/maven/jee/java-module/pom.xml b/it/it-projects/maven/jee/java-module/pom.xml
new file mode 100644
index 00000000000..44dd3ae593c
--- /dev/null
+++ b/it/it-projects/maven/jee/java-module/pom.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>com.sonarsource.it.samples.jee</groupId>
+ <artifactId>parent</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </parent>
+ <artifactId>java-module</artifactId>
+ <name>java-module</name>
+
+</project> \ No newline at end of file
diff --git a/it/it-projects/maven/jee/java-module/src/main/java/org/sonar/tests/App.java b/it/it-projects/maven/jee/java-module/src/main/java/org/sonar/tests/App.java
new file mode 100644
index 00000000000..ddc6d08253b
--- /dev/null
+++ b/it/it-projects/maven/jee/java-module/src/main/java/org/sonar/tests/App.java
@@ -0,0 +1,13 @@
+package org.sonar.tests;
+
+/**
+ * Hello world!
+ *
+ */
+public class App
+{
+ public static void main( String[] args )
+ {
+ System.out.println( "Hello World!" );
+ }
+}
diff --git a/it/it-projects/maven/jee/java-module/src/test/java/org/sonar/tests/AppTest.java b/it/it-projects/maven/jee/java-module/src/test/java/org/sonar/tests/AppTest.java
new file mode 100644
index 00000000000..ce03155a801
--- /dev/null
+++ b/it/it-projects/maven/jee/java-module/src/test/java/org/sonar/tests/AppTest.java
@@ -0,0 +1,38 @@
+package org.sonar.tests;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+/**
+ * Unit test for simple App.
+ */
+public class AppTest
+ extends TestCase
+{
+ /**
+ * Create the test case
+ *
+ * @param testName name of the test case
+ */
+ public AppTest( String testName )
+ {
+ super( testName );
+ }
+
+ /**
+ * @return the suite of tests being tested
+ */
+ public static Test suite()
+ {
+ return new TestSuite( AppTest.class );
+ }
+
+ /**
+ * Rigourous Test :-)
+ */
+ public void testApp()
+ {
+ assertTrue( true );
+ }
+}
diff --git a/it/it-projects/maven/jee/pom.xml b/it/it-projects/maven/jee/pom.xml
new file mode 100644
index 00000000000..d5dfb916675
--- /dev/null
+++ b/it/it-projects/maven/jee/pom.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>com.sonarsource.it.samples.jee</groupId>
+ <artifactId>parent</artifactId>
+ <packaging>pom</packaging>
+ <version>1.0-SNAPSHOT</version>
+ <name>JEE project</name>
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.8.2</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ <modules>
+ <module>java-module</module>
+ <module>ejb-module</module>
+ <module>web-module</module>
+ <module>ear-module</module>
+ </modules>
+</project> \ No newline at end of file
diff --git a/it/it-projects/maven/jee/web-module/pom.xml b/it/it-projects/maven/jee/web-module/pom.xml
new file mode 100644
index 00000000000..9751d52f2b1
--- /dev/null
+++ b/it/it-projects/maven/jee/web-module/pom.xml
@@ -0,0 +1,50 @@
+<?xml version="1.0"?>
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>com.sonarsource.it.samples.jee</groupId>
+ <artifactId>parent</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </parent>
+ <artifactId>web-module</artifactId>
+ <packaging>war</packaging>
+ <name>web-module Maven Webapp</name>
+
+ <build>
+ <finalName>web-module</finalName>
+ </build>
+
+ <dependencies>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <version>2.4</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>jsp-api</artifactId>
+ <version>2.0</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-ejb_2.1_spec</artifactId>
+ <version>1.1</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>java-module</artifactId>
+ <version>${project.version}</version>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>ejb-module</artifactId>
+ <version>${project.version}</version>
+ <scope>runtime</scope>
+ <type>ejb</type>
+ </dependency>
+ </dependencies>
+</project> \ No newline at end of file
diff --git a/it/it-projects/maven/jee/web-module/src/main/webapp/WEB-INF/web.xml b/it/it-projects/maven/jee/web-module/src/main/webapp/WEB-INF/web.xml
new file mode 100644
index 00000000000..9f88c1f9632
--- /dev/null
+++ b/it/it-projects/maven/jee/web-module/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,7 @@
+<!DOCTYPE web-app PUBLIC
+ "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+ "http://java.sun.com/dtd/web-app_2_3.dtd" >
+
+<web-app>
+ <display-name>Archetype Created Web Application</display-name>
+</web-app>
diff --git a/it/it-projects/maven/jee/web-module/src/main/webapp/index.jsp b/it/it-projects/maven/jee/web-module/src/main/webapp/index.jsp
new file mode 100644
index 00000000000..c38169bb958
--- /dev/null
+++ b/it/it-projects/maven/jee/web-module/src/main/webapp/index.jsp
@@ -0,0 +1,5 @@
+<html>
+<body>
+<h2>Hello World!</h2>
+</body>
+</html>
diff --git a/it/it-projects/maven/maven-bad-parameters/module_a/pom.xml b/it/it-projects/maven/maven-bad-parameters/module_a/pom.xml
new file mode 100644
index 00000000000..e74835222cc
--- /dev/null
+++ b/it/it-projects/maven/maven-bad-parameters/module_a/pom.xml
@@ -0,0 +1,13 @@
+<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>
+ <artifactId>module_a</artifactId>
+ <packaging>jar</packaging>
+ <name>Module A</name>
+
+ <parent>
+ <groupId>com.sonarsource.it.samples.maven-bad-parameters</groupId>
+ <artifactId>parent</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </parent>
+</project> \ No newline at end of file
diff --git a/it/it-projects/maven/maven-bad-parameters/module_a/src/main/java/org/sonar/tests/Hello.java b/it/it-projects/maven/maven-bad-parameters/module_a/src/main/java/org/sonar/tests/Hello.java
new file mode 100644
index 00000000000..4d61fb482fd
--- /dev/null
+++ b/it/it-projects/maven/maven-bad-parameters/module_a/src/main/java/org/sonar/tests/Hello.java
@@ -0,0 +1,10 @@
+package org.sonar.tests;
+
+public class Hello {
+ public static String s=null;
+
+ public String toString() {
+ while(true)
+ s="hello";
+ }
+} \ No newline at end of file
diff --git a/it/it-projects/maven/maven-bad-parameters/module_b/pom.xml b/it/it-projects/maven/maven-bad-parameters/module_b/pom.xml
new file mode 100644
index 00000000000..84194b9c290
--- /dev/null
+++ b/it/it-projects/maven/maven-bad-parameters/module_b/pom.xml
@@ -0,0 +1,13 @@
+<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>
+ <artifactId>module_b</artifactId>
+ <packaging>jar</packaging>
+ <name>Module B</name>
+
+ <parent>
+ <groupId>com.sonarsource.it.samples.maven-bad-parameters</groupId>
+ <artifactId>parent</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </parent>
+</project> \ No newline at end of file
diff --git a/it/it-projects/maven/maven-bad-parameters/module_b/src/main/java/org/sonar/tests/Hello.java b/it/it-projects/maven/maven-bad-parameters/module_b/src/main/java/org/sonar/tests/Hello.java
new file mode 100644
index 00000000000..4d61fb482fd
--- /dev/null
+++ b/it/it-projects/maven/maven-bad-parameters/module_b/src/main/java/org/sonar/tests/Hello.java
@@ -0,0 +1,10 @@
+package org.sonar.tests;
+
+public class Hello {
+ public static String s=null;
+
+ public String toString() {
+ while(true)
+ s="hello";
+ }
+} \ No newline at end of file
diff --git a/it/it-projects/maven/maven-bad-parameters/pom.xml b/it/it-projects/maven/maven-bad-parameters/pom.xml
new file mode 100644
index 00000000000..a38b06c51b9
--- /dev/null
+++ b/it/it-projects/maven/maven-bad-parameters/pom.xml
@@ -0,0 +1,47 @@
+<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>com.sonarsource.it.samples.maven-bad-parameters</groupId>
+ <artifactId>parent</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <packaging>pom</packaging>
+ <name>Sonar tests - maven-bad-parameters</name>
+ <modules>
+ <module>module_a</module>
+ <module>module_b</module>
+ </modules>
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-pmd-plugin</artifactId>
+ <configuration>
+ <aggregate>true</aggregate>
+ <!-- SONAR-518 -->
+ <skip>true</skip>
+ <!-- SONAR-593 -->
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ <configuration>
+ <skip>true</skip>
+ <!-- SONAR-519 -->
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>findbugs-maven-plugin</artifactId>
+ <configuration>
+ <skip>true</skip>
+ <!-- SONAR-593 -->
+ </configuration>
+ </plugin>
+
+ </plugins>
+ </build>
+
+</project> \ No newline at end of file
diff --git a/it/it-projects/maven/maven-bad-sources-property/pom.xml b/it/it-projects/maven/maven-bad-sources-property/pom.xml
new file mode 100644
index 00000000000..daab137db14
--- /dev/null
+++ b/it/it-projects/maven/maven-bad-sources-property/pom.xml
@@ -0,0 +1,22 @@
+<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>com.sonarsource.it.samples</groupId>
+ <artifactId>maven-bad-sources-property</artifactId>
+ <version>1.0-SNAPSHOT</version>
+
+ <properties>
+ <sonar.sources>src/main/java2</sonar.sources>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.11</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+</project>
diff --git a/it/it-projects/maven/maven-bad-sources-property/src/main/java/Hello.java b/it/it-projects/maven/maven-bad-sources-property/src/main/java/Hello.java
new file mode 100644
index 00000000000..224a668297d
--- /dev/null
+++ b/it/it-projects/maven/maven-bad-sources-property/src/main/java/Hello.java
@@ -0,0 +1,5 @@
+public class Hello {
+ public String hello() {
+ return "hello";
+ }
+}
diff --git a/it/it-projects/maven/maven-bad-tests-property/pom.xml b/it/it-projects/maven/maven-bad-tests-property/pom.xml
new file mode 100644
index 00000000000..024b8505d0d
--- /dev/null
+++ b/it/it-projects/maven/maven-bad-tests-property/pom.xml
@@ -0,0 +1,22 @@
+<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>com.sonarsource.it.samples</groupId>
+ <artifactId>maven-bad-tests-property</artifactId>
+ <version>1.0-SNAPSHOT</version>
+
+ <properties>
+ <sonar.tests>src/test/java2</sonar.tests>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.11</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+</project>
diff --git a/it/it-projects/maven/maven-bad-tests-property/src/main/java/Hello.java b/it/it-projects/maven/maven-bad-tests-property/src/main/java/Hello.java
new file mode 100644
index 00000000000..224a668297d
--- /dev/null
+++ b/it/it-projects/maven/maven-bad-tests-property/src/main/java/Hello.java
@@ -0,0 +1,5 @@
+public class Hello {
+ public String hello() {
+ return "hello";
+ }
+}
diff --git a/it/it-projects/maven/maven-bad-tests-property/src/test/java/HelloTest.java b/it/it-projects/maven/maven-bad-tests-property/src/test/java/HelloTest.java
new file mode 100644
index 00000000000..ffa7ea2109e
--- /dev/null
+++ b/it/it-projects/maven/maven-bad-tests-property/src/test/java/HelloTest.java
@@ -0,0 +1,3 @@
+public class HelloTest {
+
+}
diff --git a/it/it-projects/maven/maven-extensions/pom.xml b/it/it-projects/maven/maven-extensions/pom.xml
new file mode 100644
index 00000000000..1634b63e61b
--- /dev/null
+++ b/it/it-projects/maven/maven-extensions/pom.xml
@@ -0,0 +1,25 @@
+<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>com.sonarsource.it.samples</groupId>
+ <artifactId>maven-extensions</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <packaging>jar</packaging>
+ <name>Sonar tests - maven extensions</name>
+ <description>http://jira.codehaus.org/browse/SONAR-222</description>
+ <build>
+ <extensions>
+ <extension>
+ <groupId>org.jvnet.wagon-svn</groupId>
+ <artifactId>wagon-svn</artifactId>
+ <version>1.9</version>
+ </extension>
+
+ <extension>
+ <groupId>org.apache.maven.wagon</groupId>
+ <artifactId>wagon-webdav</artifactId>
+ <version>1.0-beta-2</version>
+ </extension>
+ </extensions>
+ </build>
+</project> \ No newline at end of file
diff --git a/it/it-projects/maven/maven-extensions/src/main/java/org/sonar/tests/mavenExtensions/Hello.java b/it/it-projects/maven/maven-extensions/src/main/java/org/sonar/tests/mavenExtensions/Hello.java
new file mode 100644
index 00000000000..5967512fb80
--- /dev/null
+++ b/it/it-projects/maven/maven-extensions/src/main/java/org/sonar/tests/mavenExtensions/Hello.java
@@ -0,0 +1,13 @@
+package org.sonar.tests.mavenExtensions;
+
+public class Hello {
+ private String hello;
+
+ public Hello(String s){
+ this.hello = s;
+ }
+
+ public String say() {
+ return hello;
+ }
+}
diff --git a/it/it-projects/maven/maven-only-test-dir/pom.xml b/it/it-projects/maven/maven-only-test-dir/pom.xml
new file mode 100644
index 00000000000..e1b343f6b53
--- /dev/null
+++ b/it/it-projects/maven/maven-only-test-dir/pom.xml
@@ -0,0 +1,18 @@
+<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>com.sonarsource.it.samples</groupId>
+ <artifactId>maven-only-test-dir</artifactId>
+ <version>1.0-SNAPSHOT</version>
+
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.11</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+</project>
diff --git a/it/it-projects/maven/maven-only-test-dir/src/test/java/HelloTest.java b/it/it-projects/maven/maven-only-test-dir/src/test/java/HelloTest.java
new file mode 100644
index 00000000000..bef477b4c1c
--- /dev/null
+++ b/it/it-projects/maven/maven-only-test-dir/src/test/java/HelloTest.java
@@ -0,0 +1,10 @@
+import org.junit.Test;
+
+import static org.junit.Assert.assertNotSame;
+
+public class HelloTest {
+ @Test
+ public void hiho() {
+ assertNotSame("hi", "ho");
+ }
+}
diff --git a/it/it-projects/maven/maven-override-sources/pom.xml b/it/it-projects/maven/maven-override-sources/pom.xml
new file mode 100644
index 00000000000..a8fbbac3cde
--- /dev/null
+++ b/it/it-projects/maven/maven-override-sources/pom.xml
@@ -0,0 +1,22 @@
+<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>com.sonarsource.it.samples</groupId>
+ <artifactId>maven-override-sources</artifactId>
+ <version>1.0-SNAPSHOT</version>
+
+ <properties>
+ <sonar.sources>src/main/java2</sonar.sources>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.11</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+</project>
diff --git a/it/it-projects/maven/maven-override-sources/src/main/java/Hello.java b/it/it-projects/maven/maven-override-sources/src/main/java/Hello.java
new file mode 100644
index 00000000000..224a668297d
--- /dev/null
+++ b/it/it-projects/maven/maven-override-sources/src/main/java/Hello.java
@@ -0,0 +1,5 @@
+public class Hello {
+ public String hello() {
+ return "hello";
+ }
+}
diff --git a/it/it-projects/maven/maven-override-sources/src/main/java2/Hello2.java b/it/it-projects/maven/maven-override-sources/src/main/java2/Hello2.java
new file mode 100644
index 00000000000..4bb53827bb6
--- /dev/null
+++ b/it/it-projects/maven/maven-override-sources/src/main/java2/Hello2.java
@@ -0,0 +1,5 @@
+public class Hello2 {
+ public String hello() {
+ return "hello";
+ }
+}
diff --git a/it/it-projects/maven/modules-declaration/module_a/pom.xml b/it/it-projects/maven/modules-declaration/module_a/pom.xml
new file mode 100644
index 00000000000..73191c11f29
--- /dev/null
+++ b/it/it-projects/maven/modules-declaration/module_a/pom.xml
@@ -0,0 +1,14 @@
+<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>
+
+ <parent>
+ <groupId>org.sonar.tests.modules-declaration</groupId>
+ <artifactId>root</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>module_a</artifactId>
+
+ <name>Module A</name>
+
+</project>
diff --git a/it/it-projects/maven/modules-declaration/module_a/src/main/java/HelloA.java b/it/it-projects/maven/modules-declaration/module_a/src/main/java/HelloA.java
new file mode 100644
index 00000000000..ac7c3f94636
--- /dev/null
+++ b/it/it-projects/maven/modules-declaration/module_a/src/main/java/HelloA.java
@@ -0,0 +1,2 @@
+public class HelloA {
+}
diff --git a/it/it-projects/maven/modules-declaration/module_b/pom.xml b/it/it-projects/maven/modules-declaration/module_b/pom.xml
new file mode 100644
index 00000000000..b31c90d4731
--- /dev/null
+++ b/it/it-projects/maven/modules-declaration/module_b/pom.xml
@@ -0,0 +1,14 @@
+<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>
+
+ <parent>
+ <groupId>org.sonar.tests.modules-declaration</groupId>
+ <artifactId>root</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>module_b</artifactId>
+
+ <name>Module B</name>
+
+</project>
diff --git a/it/it-projects/maven/modules-declaration/module_b/src/main/java/HelloB.java b/it/it-projects/maven/modules-declaration/module_b/src/main/java/HelloB.java
new file mode 100644
index 00000000000..4ee68d3ed39
--- /dev/null
+++ b/it/it-projects/maven/modules-declaration/module_b/src/main/java/HelloB.java
@@ -0,0 +1,2 @@
+public class HelloB {
+}
diff --git a/it/it-projects/maven/modules-declaration/module_c/pom.xml b/it/it-projects/maven/modules-declaration/module_c/pom.xml
new file mode 100644
index 00000000000..ab027ada34b
--- /dev/null
+++ b/it/it-projects/maven/modules-declaration/module_c/pom.xml
@@ -0,0 +1,14 @@
+<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>
+
+ <parent>
+ <groupId>org.sonar.tests.modules-declaration</groupId>
+ <artifactId>root</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>module_c</artifactId>
+
+ <name>Module C</name>
+
+</project>
diff --git a/it/it-projects/maven/modules-declaration/module_c/src/main/java/HelloC.java b/it/it-projects/maven/modules-declaration/module_c/src/main/java/HelloC.java
new file mode 100644
index 00000000000..242abb3a77f
--- /dev/null
+++ b/it/it-projects/maven/modules-declaration/module_c/src/main/java/HelloC.java
@@ -0,0 +1,2 @@
+public class HelloC {
+}
diff --git a/it/it-projects/maven/modules-declaration/module_d/mypom.xml b/it/it-projects/maven/modules-declaration/module_d/mypom.xml
new file mode 100644
index 00000000000..13a86363e0e
--- /dev/null
+++ b/it/it-projects/maven/modules-declaration/module_d/mypom.xml
@@ -0,0 +1,14 @@
+<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>
+
+ <parent>
+ <groupId>org.sonar.tests.modules-declaration</groupId>
+ <artifactId>root</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>module_d</artifactId>
+
+ <name>Module D</name>
+
+</project>
diff --git a/it/it-projects/maven/modules-declaration/module_d/src/main/java/HelloD.java b/it/it-projects/maven/modules-declaration/module_d/src/main/java/HelloD.java
new file mode 100644
index 00000000000..b01a5d8d3ba
--- /dev/null
+++ b/it/it-projects/maven/modules-declaration/module_d/src/main/java/HelloD.java
@@ -0,0 +1,2 @@
+public class HelloD {
+}
diff --git a/it/it-projects/maven/modules-declaration/module_e/mypom b/it/it-projects/maven/modules-declaration/module_e/mypom
new file mode 100644
index 00000000000..de92d8431ec
--- /dev/null
+++ b/it/it-projects/maven/modules-declaration/module_e/mypom
@@ -0,0 +1,14 @@
+<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>
+
+ <parent>
+ <groupId>org.sonar.tests.modules-declaration</groupId>
+ <artifactId>root</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>module_e</artifactId>
+
+ <name>Module E</name>
+
+</project>
diff --git a/it/it-projects/maven/modules-declaration/module_e/src/main/java/HelloE.java b/it/it-projects/maven/modules-declaration/module_e/src/main/java/HelloE.java
new file mode 100644
index 00000000000..041f6e8984b
--- /dev/null
+++ b/it/it-projects/maven/modules-declaration/module_e/src/main/java/HelloE.java
@@ -0,0 +1,2 @@
+public class HelloE {
+}
diff --git a/it/it-projects/maven/modules-declaration/pom.xml b/it/it-projects/maven/modules-declaration/pom.xml
new file mode 100644
index 00000000000..0d4eedf4e96
--- /dev/null
+++ b/it/it-projects/maven/modules-declaration/pom.xml
@@ -0,0 +1,27 @@
+<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>org.sonar.tests.modules-declaration</groupId>
+ <artifactId>root</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <packaging>pom</packaging>
+
+ <name>Root</name>
+
+ <modules>
+ <!-- Standard/normal way - directory name -->
+ <module>module_a</module>
+
+ <!-- Just in case - trailing slash in a directory name -->
+ <module>module_b/</module>
+
+ <!-- File with usual name -->
+ <module>module_c/pom.xml</module>
+
+ <!-- Strange use case, but seems valid (tested with Maven 2.0.11, 2.2.1 and 3.0.3) - file with unusual name -->
+ <module>module_d/mypom.xml</module>
+ <module>module_e/mypom</module>
+ </modules>
+
+</project>
diff --git a/it/it-projects/maven/modules-order/README.txt b/it/it-projects/maven/modules-order/README.txt
new file mode 100644
index 00000000000..0401f824428
--- /dev/null
+++ b/it/it-projects/maven/modules-order/README.txt
@@ -0,0 +1,5 @@
+Order of modules during build would look as following :
+parent
+module_a
+module_b
+root
diff --git a/it/it-projects/maven/modules-order/module_a/pom.xml b/it/it-projects/maven/modules-order/module_a/pom.xml
new file mode 100644
index 00000000000..9fe82af9acb
--- /dev/null
+++ b/it/it-projects/maven/modules-order/module_a/pom.xml
@@ -0,0 +1,14 @@
+<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>
+
+ <parent>
+ <groupId>org.sonar.tests.modules-order</groupId>
+ <artifactId>parent</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <relativePath>../parent</relativePath>
+ </parent>
+
+ <artifactId>module_a</artifactId>
+
+ <name>Module A</name>
+</project>
diff --git a/it/it-projects/maven/modules-order/module_a/src/main/java/HelloA.java b/it/it-projects/maven/modules-order/module_a/src/main/java/HelloA.java
new file mode 100644
index 00000000000..ac7c3f94636
--- /dev/null
+++ b/it/it-projects/maven/modules-order/module_a/src/main/java/HelloA.java
@@ -0,0 +1,2 @@
+public class HelloA {
+}
diff --git a/it/it-projects/maven/modules-order/module_b/pom.xml b/it/it-projects/maven/modules-order/module_b/pom.xml
new file mode 100644
index 00000000000..00883638007
--- /dev/null
+++ b/it/it-projects/maven/modules-order/module_b/pom.xml
@@ -0,0 +1,14 @@
+<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>
+
+ <parent>
+ <groupId>org.sonar.tests.modules-order</groupId>
+ <artifactId>parent</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <relativePath>../parent</relativePath>
+ </parent>
+
+ <artifactId>module_b</artifactId>
+
+ <name>Module B</name>
+</project>
diff --git a/it/it-projects/maven/modules-order/module_b/src/main/java/HelloB.java b/it/it-projects/maven/modules-order/module_b/src/main/java/HelloB.java
new file mode 100644
index 00000000000..4ee68d3ed39
--- /dev/null
+++ b/it/it-projects/maven/modules-order/module_b/src/main/java/HelloB.java
@@ -0,0 +1,2 @@
+public class HelloB {
+}
diff --git a/it/it-projects/maven/modules-order/parent/pom.xml b/it/it-projects/maven/modules-order/parent/pom.xml
new file mode 100644
index 00000000000..54873b339db
--- /dev/null
+++ b/it/it-projects/maven/modules-order/parent/pom.xml
@@ -0,0 +1,10 @@
+<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>org.sonar.tests.modules-order</groupId>
+ <artifactId>parent</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <packaging>pom</packaging>
+
+ <name>Parent</name>
+</project>
diff --git a/it/it-projects/maven/modules-order/pom.xml b/it/it-projects/maven/modules-order/pom.xml
new file mode 100644
index 00000000000..4b646b849c8
--- /dev/null
+++ b/it/it-projects/maven/modules-order/pom.xml
@@ -0,0 +1,17 @@
+<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>org.sonar.tests.modules-order</groupId>
+ <artifactId>root</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <packaging>pom</packaging>
+
+ <name>Sonar tests - modules order</name>
+
+ <modules>
+ <module>parent</module>
+ <module>module_a</module>
+ <module>module_b</module>
+ </modules>
+</project>
diff --git a/it/it-projects/maven/project-with-module-without-sources/pom.xml b/it/it-projects/maven/project-with-module-without-sources/pom.xml
new file mode 100644
index 00000000000..afb83f459ea
--- /dev/null
+++ b/it/it-projects/maven/project-with-module-without-sources/pom.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>com.sonarsource.it.samples.project-with-module-without-sources</groupId>
+ <artifactId>parent</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <packaging>pom</packaging>
+
+ <modules>
+ <module>with-sources</module>
+ <module>without-sources</module>
+ </modules>
+</project>
diff --git a/it/it-projects/maven/project-with-module-without-sources/with-sources/pom.xml b/it/it-projects/maven/project-with-module-without-sources/with-sources/pom.xml
new file mode 100644
index 00000000000..393f9202bd7
--- /dev/null
+++ b/it/it-projects/maven/project-with-module-without-sources/with-sources/pom.xml
@@ -0,0 +1,15 @@
+<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>
+
+ <parent>
+ <groupId>com.sonarsource.it.samples.project-with-module-without-sources</groupId>
+ <artifactId>parent</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>with-sources</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <name>Module with sources</name>
+
+</project>
diff --git a/it/it-projects/maven/project-with-module-without-sources/with-sources/src/main/java/sample/Sample.java b/it/it-projects/maven/project-with-module-without-sources/with-sources/src/main/java/sample/Sample.java
new file mode 100644
index 00000000000..b1210973dd9
--- /dev/null
+++ b/it/it-projects/maven/project-with-module-without-sources/with-sources/src/main/java/sample/Sample.java
@@ -0,0 +1,12 @@
+package sample;
+
+public class Sample {
+
+ public Sample(int i) {
+ int j = i++;
+ }
+
+ private String myMethod() {
+ return "hello";
+ }
+}
diff --git a/it/it-projects/maven/project-with-module-without-sources/without-sources/pom.xml b/it/it-projects/maven/project-with-module-without-sources/without-sources/pom.xml
new file mode 100644
index 00000000000..cdd2f0096a1
--- /dev/null
+++ b/it/it-projects/maven/project-with-module-without-sources/without-sources/pom.xml
@@ -0,0 +1,15 @@
+<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>
+
+ <parent>
+ <groupId>com.sonarsource.it.samples.project-with-module-without-sources</groupId>
+ <artifactId>parent</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>without-sources</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <name>Module without sources</name>
+
+</project>
diff --git a/it/it-projects/maven/shade-with-dependency-reduced-pom/child1/pom.xml b/it/it-projects/maven/shade-with-dependency-reduced-pom/child1/pom.xml
new file mode 100644
index 00000000000..2c0049a65de
--- /dev/null
+++ b/it/it-projects/maven/shade-with-dependency-reduced-pom/child1/pom.xml
@@ -0,0 +1,13 @@
+<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>
+
+
+ <parent>
+ <groupId>org.foo.bar</groupId>
+ <artifactId>parent</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </parent>
+ <artifactId>child1</artifactId>
+
+</project>
diff --git a/it/it-projects/maven/shade-with-dependency-reduced-pom/child2/pom.xml b/it/it-projects/maven/shade-with-dependency-reduced-pom/child2/pom.xml
new file mode 100644
index 00000000000..a25279f1f8b
--- /dev/null
+++ b/it/it-projects/maven/shade-with-dependency-reduced-pom/child2/pom.xml
@@ -0,0 +1,47 @@
+<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>
+
+
+ <parent>
+ <groupId>org.foo.bar</groupId>
+ <artifactId>parent</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>child2</artifactId>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-shade-plugin</artifactId>
+ <version>1.7.1</version>
+ <executions>
+ <execution>
+ <configuration>
+ <shadedArtifactAttached>false</shadedArtifactAttached>
+ <!-- here lies a problem, (true is the default) -->
+ <createDependencyReducedPom>true</createDependencyReducedPom>
+ </configuration>
+ <phase>package</phase>
+ <goals>
+ <goal>shade</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ </plugins>
+ </build>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.foo.bar</groupId>
+ <artifactId>child1</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </dependency>
+ </dependencies>
+
+
+</project>
diff --git a/it/it-projects/maven/shade-with-dependency-reduced-pom/pom.xml b/it/it-projects/maven/shade-with-dependency-reduced-pom/pom.xml
new file mode 100644
index 00000000000..af12af572e3
--- /dev/null
+++ b/it/it-projects/maven/shade-with-dependency-reduced-pom/pom.xml
@@ -0,0 +1,19 @@
+<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>org.foo.bar</groupId>
+ <artifactId>parent</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <packaging>pom</packaging>
+
+ <modules>
+ <module>child1</module>
+ <module>child2</module>
+ </modules>
+
+
+
+</project>
+