diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/integration/tests/custom-projects/invalid-java-source-dir/pom.xml | 24 | ||||
-rw-r--r-- | tests/integration/tests/custom-projects/invalid-java-source-dir/src/main/java/com/foo/Bar.java | 8 |
2 files changed, 32 insertions, 0 deletions
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 index 00000000000..814f2a8f99e --- /dev/null +++ b/tests/integration/tests/custom-projects/invalid-java-source-dir/pom.xml @@ -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 index 00000000000..94482bf6d3b --- /dev/null +++ b/tests/integration/tests/custom-projects/invalid-java-source-dir/src/main/java/com/foo/Bar.java @@ -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 |