aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulien Lancelot <julien.lancelot@sonarsource.com>2018-02-12 17:03:52 +0100
committerStas Vilchik <stas.vilchik@sonarsource.com>2018-02-20 10:06:52 +0100
commitcaf48455f693b76d06ebd2328d8498442cb0c1ab (patch)
tree484d205d34c8e62b7b472a255492a960137c8ef2
parent209c36aefa2c16b5b156b21604664ff32ef13a86 (diff)
downloadsonarqube-caf48455f693b76d06ebd2328d8498442cb0c1ab.tar.gz
sonarqube-caf48455f693b76d06ebd2328d8498442cb0c1ab.zip
SONAR-10299 Drop the project link "developer connection"
-rw-r--r--server/sonar-ce/src/test/java/org/sonar/ce/container/ComputeEngineContainerImplTest.java2
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/computation/task/projectanalysis/step/PersistProjectLinksStep.java1
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/computation/task/projectanalysis/step/PersistProjectLinksStepTest.java3
-rw-r--r--sonar-core/src/main/java/org/sonar/core/config/CorePropertyDefinitions.java6
-rw-r--r--sonar-core/src/main/java/org/sonar/core/config/ScannerProperties.java2
-rw-r--r--sonar-core/src/test/java/org/sonar/core/config/CorePropertyDefinitionsTest.java2
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/CoreProperties.java2
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/batch/scm/ScmProvider.java2
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/report/ComponentsPublisher.java1
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/scm/ScmConfiguration.java3
-rw-r--r--sonar-scanner-protocol/src/main/protobuf/scanner_report.proto13
-rw-r--r--tests/src/test/java/org/sonarqube/tests/analysis/LinksTest.java1
12 files changed, 16 insertions, 22 deletions
diff --git a/server/sonar-ce/src/test/java/org/sonar/ce/container/ComputeEngineContainerImplTest.java b/server/sonar-ce/src/test/java/org/sonar/ce/container/ComputeEngineContainerImplTest.java
index 13a1cb4609d..fa90b0e6620 100644
--- a/server/sonar-ce/src/test/java/org/sonar/ce/container/ComputeEngineContainerImplTest.java
+++ b/server/sonar-ce/src/test/java/org/sonar/ce/container/ComputeEngineContainerImplTest.java
@@ -120,7 +120,7 @@ public class ComputeEngineContainerImplTest {
+ 26 // level 1
+ 52 // content of DaoModule
+ 3 // content of EsSearchModule
- + 60 // content of CorePropertyDefinitions
+ + 59 // content of CorePropertyDefinitions
+ 1 // StopFlagContainer
);
assertThat(
diff --git a/server/sonar-server/src/main/java/org/sonar/server/computation/task/projectanalysis/step/PersistProjectLinksStep.java b/server/sonar-server/src/main/java/org/sonar/server/computation/task/projectanalysis/step/PersistProjectLinksStep.java
index c255ba1189f..7d7127ceea0 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/computation/task/projectanalysis/step/PersistProjectLinksStep.java
+++ b/server/sonar-server/src/main/java/org/sonar/server/computation/task/projectanalysis/step/PersistProjectLinksStep.java
@@ -48,7 +48,6 @@ public class PersistProjectLinksStep implements ComputationStep {
private static final Map<ComponentLinkType, String> typesConverter = ImmutableMap.of(
ComponentLinkType.HOME, ProjectLinkDto.TYPE_HOME_PAGE,
ComponentLinkType.SCM, ProjectLinkDto.TYPE_SOURCES,
- ComponentLinkType.SCM_DEV, ProjectLinkDto.TYPE_SOURCES_DEV,
ComponentLinkType.CI, ProjectLinkDto.TYPE_CI,
ComponentLinkType.ISSUE, ProjectLinkDto.TYPE_ISSUE_TRACKER);
diff --git a/server/sonar-server/src/test/java/org/sonar/server/computation/task/projectanalysis/step/PersistProjectLinksStepTest.java b/server/sonar-server/src/test/java/org/sonar/server/computation/task/projectanalysis/step/PersistProjectLinksStepTest.java
index b13cc434b1a..d5dfa7235d3 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/computation/task/projectanalysis/step/PersistProjectLinksStepTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/computation/task/projectanalysis/step/PersistProjectLinksStepTest.java
@@ -41,7 +41,6 @@ import static org.sonar.scanner.protocol.output.ScannerReport.ComponentLink.Comp
import static org.sonar.scanner.protocol.output.ScannerReport.ComponentLink.ComponentLinkType.HOME;
import static org.sonar.scanner.protocol.output.ScannerReport.ComponentLink.ComponentLinkType.ISSUE;
import static org.sonar.scanner.protocol.output.ScannerReport.ComponentLink.ComponentLinkType.SCM;
-import static org.sonar.scanner.protocol.output.ScannerReport.ComponentLink.ComponentLinkType.SCM_DEV;
public class PersistProjectLinksStepTest extends BaseStepTest {
@@ -77,7 +76,6 @@ public class PersistProjectLinksStepTest extends BaseStepTest {
.addChildRef(2)
.addLink(ScannerReport.ComponentLink.newBuilder().setType(HOME).setHref("http://www.sonarqube.org").build())
.addLink(ScannerReport.ComponentLink.newBuilder().setType(SCM).setHref("https://github.com/SonarSource/sonar").build())
- .addLink(ScannerReport.ComponentLink.newBuilder().setType(SCM_DEV).setHref("scm:git:git@github.com:SonarSource/sonar.git/sonar").build())
.addLink(ScannerReport.ComponentLink.newBuilder().setType(ISSUE).setHref("http://jira.sonarsource.com/").build())
.addLink(ScannerReport.ComponentLink.newBuilder().setType(CI).setHref("http://bamboo.ci.codehaus.org/browse/SONAR").build())
.build());
@@ -89,7 +87,6 @@ public class PersistProjectLinksStepTest extends BaseStepTest {
.containsExactlyInAnyOrder(
tuple("homepage", "http://www.sonarqube.org", null),
tuple("scm", "https://github.com/SonarSource/sonar", null),
- tuple("scm_dev", "scm:git:git@github.com:SonarSource/sonar.git/sonar", null),
tuple("issue", "http://jira.sonarsource.com/", null),
tuple("ci", "http://bamboo.ci.codehaus.org/browse/SONAR", null));
}
diff --git a/sonar-core/src/main/java/org/sonar/core/config/CorePropertyDefinitions.java b/sonar-core/src/main/java/org/sonar/core/config/CorePropertyDefinitions.java
index e7d215f8296..01acaad196a 100644
--- a/sonar-core/src/main/java/org/sonar/core/config/CorePropertyDefinitions.java
+++ b/sonar-core/src/main/java/org/sonar/core/config/CorePropertyDefinitions.java
@@ -91,12 +91,6 @@ public class CorePropertyDefinitions {
.description("HTTP URL of the server which hosts the sources of the project.")
.category(CoreProperties.CATEGORY_GENERAL)
.build(),
- PropertyDefinition.builder(CoreProperties.LINKS_SOURCES_DEV)
- .name("SCM connection for developers")
- .description("HTTP URL used by developers to connect to the SCM server for the project.")
- .category(CoreProperties.CATEGORY_GENERAL)
- .hidden()
- .build(),
PropertyDefinition.builder(CoreProperties.PREVIEW_INCLUDE_PLUGINS)
.name("Plugins accepted for Preview mode")
.description("DEPRECATED - List of plugin keys. Those plugins will be used during preview analyses.")
diff --git a/sonar-core/src/main/java/org/sonar/core/config/ScannerProperties.java b/sonar-core/src/main/java/org/sonar/core/config/ScannerProperties.java
index 854a6ff356b..1cc3bddeef5 100644
--- a/sonar-core/src/main/java/org/sonar/core/config/ScannerProperties.java
+++ b/sonar-core/src/main/java/org/sonar/core/config/ScannerProperties.java
@@ -35,6 +35,8 @@ public class ScannerProperties {
public static final String BRANCH_TARGET = "sonar.branch.target";
public static final String ORGANIZATION = "sonar.organization";
+ public static final String LINKS_SOURCES_DEV = "sonar.links.scm_dev";
+
private ScannerProperties() {
// only static stuff
}
diff --git a/sonar-core/src/test/java/org/sonar/core/config/CorePropertyDefinitionsTest.java b/sonar-core/src/test/java/org/sonar/core/config/CorePropertyDefinitionsTest.java
index 2be463f4364..b3054a31a22 100644
--- a/sonar-core/src/test/java/org/sonar/core/config/CorePropertyDefinitionsTest.java
+++ b/sonar-core/src/test/java/org/sonar/core/config/CorePropertyDefinitionsTest.java
@@ -30,7 +30,7 @@ public class CorePropertyDefinitionsTest {
@Test
public void all() {
List<PropertyDefinition> defs = CorePropertyDefinitions.all();
- assertThat(defs).hasSize(60);
+ assertThat(defs).hasSize(59);
}
@Test
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/CoreProperties.java b/sonar-plugin-api/src/main/java/org/sonar/api/CoreProperties.java
index d0087bfb76d..1e27f1369e0 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/CoreProperties.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/CoreProperties.java
@@ -328,7 +328,9 @@ public interface CoreProperties {
/**
* @since 3.3
+ * @deprecated since 7.1, developer connection link is no more feed
*/
+ @Deprecated
String LINKS_SOURCES_DEV = "sonar.links.scm_dev";
/**
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/scm/ScmProvider.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/scm/ScmProvider.java
index 49cb3305dd0..b698b8974fe 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/scm/ScmProvider.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/scm/ScmProvider.java
@@ -29,7 +29,7 @@ import org.sonar.api.batch.InstantiationStrategy;
import org.sonar.api.batch.ScannerSide;
/**
- * See {@link CoreProperties#LINKS_SOURCES_DEV} to get old Maven URL format.
+ * See {@link LINKS_SOURCES_DEV#LINKS_SOURCES_DEV} to get old Maven URL format.
* @since 5.0
*/
@ScannerSide
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/report/ComponentsPublisher.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/report/ComponentsPublisher.java
index df61662bb9e..c1edd6f92f7 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/report/ComponentsPublisher.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/report/ComponentsPublisher.java
@@ -236,7 +236,6 @@ public class ComponentsPublisher implements ReportPublisherStep {
writeProjectLink(builder, def, linkBuilder, CoreProperties.LINKS_CI, ComponentLinkType.CI);
writeProjectLink(builder, def, linkBuilder, CoreProperties.LINKS_ISSUE_TRACKER, ComponentLinkType.ISSUE);
writeProjectLink(builder, def, linkBuilder, CoreProperties.LINKS_SOURCES, ComponentLinkType.SCM);
- writeProjectLink(builder, def, linkBuilder, CoreProperties.LINKS_SOURCES_DEV, ComponentLinkType.SCM_DEV);
}
}
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scm/ScmConfiguration.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scm/ScmConfiguration.java
index 55931063274..56957d3befd 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scm/ScmConfiguration.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scm/ScmConfiguration.java
@@ -38,6 +38,7 @@ import org.sonar.api.config.Configuration;
import org.sonar.api.utils.MessageException;
import org.sonar.api.utils.log.Logger;
import org.sonar.api.utils.log.Loggers;
+import org.sonar.core.config.ScannerProperties;
@Properties({
@Property(
@@ -112,7 +113,7 @@ public class ScmConfiguration implements Startable {
}
private void considerOldScmUrl() {
- settings.get(CoreProperties.LINKS_SOURCES_DEV).ifPresent(url -> {
+ settings.get(ScannerProperties.LINKS_SOURCES_DEV).ifPresent(url -> {
if (StringUtils.startsWith(url, "scm:")) {
String[] split = url.split(":");
if (split.length > 1) {
diff --git a/sonar-scanner-protocol/src/main/protobuf/scanner_report.proto b/sonar-scanner-protocol/src/main/protobuf/scanner_report.proto
index 75f915b9501..7d3123d24c1 100644
--- a/sonar-scanner-protocol/src/main/protobuf/scanner_report.proto
+++ b/sonar-scanner-protocol/src/main/protobuf/scanner_report.proto
@@ -84,12 +84,13 @@ message ComponentLink {
enum ComponentLinkType {
UNSET = 0;
- HOME = 1;
- SCM = 2;
- SCM_DEV = 3;
- ISSUE = 4;
- CI = 5;
- }
+ HOME = 1;
+ SCM = 2;
+ // SCM_DEV is no more set since 7.1. See SONAR-10299
+ IGNORED_SCM_DEV = 3;
+ ISSUE = 4;
+ CI = 5;
+ }
}
message Component {
diff --git a/tests/src/test/java/org/sonarqube/tests/analysis/LinksTest.java b/tests/src/test/java/org/sonarqube/tests/analysis/LinksTest.java
index fccc755826b..c40de4c9914 100644
--- a/tests/src/test/java/org/sonarqube/tests/analysis/LinksTest.java
+++ b/tests/src/test/java/org/sonarqube/tests/analysis/LinksTest.java
@@ -80,7 +80,6 @@ public class LinksTest {
verifyLink(links, "ci", "http://bamboo.ci.codehaus.org/browse/SIMPLESAMPLE");
verifyLink(links, "issue", "http://jira.codehaus.org/browse/SIMPLESAMPLE");
verifyLink(links, "scm", "https://github.com/SonarSource/simplesample");
- verifyLink(links, "scm_dev", "scm:git:git@github.com:SonarSource/simplesample.git");
}
private void verifyLink(List<ProjectLinks.Link> links, String expectedType, String expectedUrl) {