]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-791 add a project with invalid source dir in IT
authorsimonbrandhof <simon.brandhof@gmail.com>
Mon, 24 Jan 2011 22:33:42 +0000 (23:33 +0100)
committersimonbrandhof <simon.brandhof@gmail.com>
Mon, 24 Jan 2011 22:33:42 +0000 (23:33 +0100)
tests/integration/tests/custom-projects/invalid-java-source-dir/pom.xml [new file with mode: 0644]
tests/integration/tests/custom-projects/invalid-java-source-dir/src/main/java/com/foo/Bar.java [new file with mode: 0644]

diff --git a/tests/integration/tests/custom-projects/invalid-java-source-dir/pom.xml b/tests/integration/tests/custom-projects/invalid-java-source-dir/pom.xml
new file mode 100644 (file)
index 0000000..814f2a8
--- /dev/null
@@ -0,0 +1,24 @@
+<!-- this maven file is used by sonar only. Project is built with ant (see build.xml). -->
+
+<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</groupId>
+  <artifactId>invalid-java-source-dir</artifactId>
+  <name>invalid-java-source-dir</name>
+  <version>1.0-SNAPSHOT</version>  
+  <description>
+       SONAR-791 When the source directory is not exactly the java package root, Sonar should stop the analysis.
+       See http://jira.codehaus.org/browse/SONAR-791
+  </description>
+  
+  <build>
+       <!-- source directory should be src/main/java. 
+            The class com.foo.Bar should not be considered in Sonar as the class main.java.com.foo.Bar
+       -->
+       <sourceDirectory>src</sourceDirectory>
+  </build> 
+
+  <properties>
+       <sonar.dynamicAnalysis>false</sonar.dynamicAnalysis>
+  </properties>
+</project>
\ No newline at end of file
diff --git a/tests/integration/tests/custom-projects/invalid-java-source-dir/src/main/java/com/foo/Bar.java b/tests/integration/tests/custom-projects/invalid-java-source-dir/src/main/java/com/foo/Bar.java
new file mode 100644 (file)
index 0000000..94482bf
--- /dev/null
@@ -0,0 +1,8 @@
+package com.foo;
+
+public class Bar {
+       public void hello(String param) {
+               String s="hello";
+               int i=3000;
+       }
+}
\ No newline at end of file