Skip to content

Commit

Permalink
[SCANMAVEN-220] Revert "SCANMAVEN-220: Enable sonar.scanner.scanAll b…
Browse files Browse the repository at this point in the history
…y default (#219)". To be delivered in a future version.

This reverts commit 990c59d
  • Loading branch information
ADarko22 committed May 28, 2024
1 parent f4ad3da commit 23439fa
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions its/src/test/java/com/sonar/maven/it/suite/MavenTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,8 @@ void shouldSupportJeeProjects() {
ORCHESTRATOR.executeBuild(build);

// src/main/webapp is analyzed by web and xml plugin
// scanning all files, so 2 more files (ejb-module/src/main/resources/META-INF/ejb-jar.xml and web-module/src/main/webapp/index.jsp)
assertThat(getMeasureAsInteger("com.sonarsource.it.samples.jee:parent", "files")).isEqualTo(10);
// including resources, so one more file (ejb-module/src/main/resources/META-INF/ejb-jar.xml)
assertThat(getMeasureAsInteger("com.sonarsource.it.samples.jee:parent", "files")).isEqualTo(9);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/it/java-multi-module/verify.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ def sources = 'sonar.sources'
def module1Sources = "org.codehaus.sonar:sample-project-module1.$sources"

assert properties."$module1Sources" == properties."$projectBaseDir" + "/module1/pom.xml"
assert properties."$sources" == properties."$projectBaseDir" + "/pom.xml" + "," + properties."$projectBaseDir" + "/verify.groovy"
assert properties."$sources" == properties."$projectBaseDir" + "/pom.xml"
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,7 @@ Map<String, String> collectProperties()
}

private static boolean shouldCollectAllSources(Properties userProperties) {
String sonarScanAll = userProperties.getProperty(MavenScannerProperties.PROJECT_SCAN_ALL_SOURCES, Boolean.TRUE.toString());
return Boolean.TRUE.equals(Boolean.parseBoolean(sonarScanAll));
return Boolean.TRUE.equals(Boolean.parseBoolean(userProperties.getProperty(MavenScannerProperties.PROJECT_SCAN_ALL_SOURCES)));
}

private static String notCollectingAdditionalSourcesBecauseOf(String overriddenProperty) {
Expand Down

0 comments on commit 23439fa

Please sign in to comment.