+ 26 // level 1
+ 52 // content of DaoModule
+ 3 // content of EsSearchModule
- + 60 // content of CorePropertyDefinitions
+ + 59 // content of CorePropertyDefinitions
+ 1 // StopFlagContainer
);
assertThat(
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);
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 {
.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());
.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));
}
.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.")
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
}
@Test
public void all() {
List<PropertyDefinition> defs = CorePropertyDefinitions.all();
- assertThat(defs).hasSize(60);
+ assertThat(defs).hasSize(59);
}
@Test
/**
* @since 3.3
+ * @deprecated since 7.1, developer connection link is no more feed
*/
+ @Deprecated
String LINKS_SOURCES_DEV = "sonar.links.scm_dev";
/**
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
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);
}
}
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(
}
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) {
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 {
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) {