diff options
author | simonbrandhof <simon.brandhof@gmail.com> | 2011-01-24 23:33:42 +0100 |
---|---|---|
committer | simonbrandhof <simon.brandhof@gmail.com> | 2011-01-24 23:33:42 +0100 |
commit | 10b9b9914cb775cb892036d4ae895c47ff602946 (patch) | |
tree | 5c7a68b669c72f54c2af0298f84e16c143d8f6b0 /tests | |
parent | 27a3f17cffabac5af504c14538e63e885d710e05 (diff) | |
download | sonarqube-10b9b9914cb775cb892036d4ae895c47ff602946.tar.gz sonarqube-10b9b9914cb775cb892036d4ae895c47ff602946.zip |
SONAR-791 add a project with invalid source dir in IT
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 |