001/*
002 * Sonar, open source software quality management tool.
003 * Copyright (C) 2008-2012 SonarSource
004 * mailto:contact AT sonarsource DOT com
005 *
006 * Sonar is free software; you can redistribute it and/or
007 * modify it under the terms of the GNU Lesser General Public
008 * License as published by the Free Software Foundation; either
009 * version 3 of the License, or (at your option) any later version.
010 *
011 * Sonar is distributed in the hope that it will be useful,
012 * but WITHOUT ANY WARRANTY; without even the implied warranty of
013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
014 * Lesser General Public License for more details.
015 *
016 * You should have received a copy of the GNU Lesser General Public
017 * License along with Sonar; if not, write to the Free Software
018 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
019 */
020package org.sonar.api;
021
022/**
023 * CoreProperties is used to group various properties of Sonar as well
024 * as default values of configuration in a single place
025 *
026 * @since 1.11
027 */
028public interface CoreProperties {
029
030  /**
031   * @since 3.0
032   */
033  String ENCRYPTION_SECRET_KEY_PATH = "sonar.secretKeyPath";
034
035  /**
036   * @since 2.11
037   */
038  String CATEGORY_GENERAL = "general";
039
040  /**
041   * @since 2.11
042   */
043  String CATEGORY_CODE_COVERAGE = "codeCoverage";
044
045  /**
046   * @since 2.11
047   */
048  String CATEGORY_DUPLICATIONS = "duplications";
049
050  /**
051   * @since 2.11
052   */
053  String CATEGORY_SECURITY = "security";
054
055  /**
056   * @since 2.11
057   */
058  String CATEGORY_L10N = "localization";
059
060  /**
061   * @since 2.11
062   */
063  String CATEGORY_JAVA = "java";
064
065  /**
066   * @since 2.11
067   */
068  String CATEGORY_DIFFERENTIAL_VIEWS = "differentialViews";
069
070  /**
071   * @since 3.3
072   */
073  String CATEGORY_EXCLUSIONS = "exclusions";
074
075  /* Global settings */
076  String SONAR_HOME = "SONAR_HOME";
077  String PROJECT_BRANCH_PROPERTY = "sonar.branch";
078  String PROJECT_VERSION_PROPERTY = "sonar.projectVersion";
079
080  /**
081   * @since 2.6
082   */
083  String PROJECT_KEY_PROPERTY = "sonar.projectKey";
084
085  /**
086   * @since 2.6
087   */
088  String PROJECT_NAME_PROPERTY = "sonar.projectName";
089
090  /**
091   * @since 2.6
092   */
093  String PROJECT_DESCRIPTION_PROPERTY = "sonar.projectDescription";
094
095  /**
096   * To determine value of this property use {@link org.sonar.api.resources.ProjectFileSystem#getSourceCharset()}.
097   *
098   * @since 2.6
099   */
100  String ENCODING_PROPERTY = "sonar.sourceEncoding";
101
102  /**
103   * Value format is yyyy-MM-dd
104   */
105  String PROJECT_DATE_PROPERTY = "sonar.projectDate";
106
107  String PROJECT_LANGUAGE_PROPERTY = "sonar.language";
108  String DYNAMIC_ANALYSIS_PROPERTY = "sonar.dynamicAnalysis";
109
110  /* Exclusions */
111  String PROJECT_EXCLUSIONS_PROPERTY = "sonar.exclusions";
112
113  /**
114   * @since 3.3
115   */
116  String PROJECT_TEST_EXCLUSIONS_PROPERTY = "sonar.test.exclusions";
117  String GLOBAL_EXCLUSIONS_PROPERTY = "sonar.global.exclusions";
118  String GLOBAL_TEST_EXCLUSIONS_PROPERTY = "sonar.global.test.exclusions";
119  String GLOBAL_TEST_EXCLUSIONS_DEFAULT = "**/package-info.java";
120
121  /**
122   * @deprecated since 2.5. See discussion from http://jira.codehaus.org/browse/SONAR-1873
123   */
124  @Deprecated
125  String REUSE_RULES_CONFIGURATION_PROPERTY = "sonar.reuseExistingRulesConfiguration";
126
127  /* Checkstyle */
128  String CHECKSTYLE_PLUGIN = "checkstyle";
129
130  /* Cobertura */
131  String COBERTURA_PLUGIN = "cobertura";
132  String COBERTURA_REPORT_PATH_PROPERTY = "sonar.cobertura.reportPath";
133  String COBERTURA_MAXMEM_PROPERTY = "sonar.cobertura.maxmem";
134  String COBERTURA_MAXMEM_DEFAULT_VALUE = "64m";
135
136  /* Sonar Core */
137  String CORE_PLUGIN = "core";
138  String CORE_VIOLATION_LOCALE_PROPERTY = "sonar.violationLocale";
139  String CORE_VIOLATION_LOCALE_DEFAULT_VALUE = "en";
140  String CORE_IMPORT_SOURCES_PROPERTY = "sonar.importSources";
141  boolean CORE_IMPORT_SOURCES_DEFAULT_VALUE = true;
142  String CORE_SKIPPED_MODULES_PROPERTY = "sonar.skippedModules";
143  String CORE_RULE_WEIGHTS_PROPERTY = "sonar.core.rule.weight";
144  String CORE_RULE_WEIGHTS_DEFAULT_VALUE = "INFO=0;MINOR=1;MAJOR=3;CRITICAL=5;BLOCKER=10";
145  String CORE_TENDENCY_DEPTH_PROPERTY = "tendency.depth";
146  int CORE_TENDENCY_DEPTH_DEFAULT_VALUE = 30;
147  String CORE_FORCE_AUTHENTICATION_PROPERTY = "sonar.forceAuthentication";
148  boolean CORE_FORCE_AUTHENTICATION_DEFAULT_VALUE = false;
149  String CORE_ALLOW_USERS_TO_SIGNUP_PROPERTY = "sonar.allowUsersToSignUp";
150  String CORE_DEFAULT_GROUP = "sonar.defaultGroup";
151  String CORE_DEFAULT_GROUP_DEFAULT_VALUE = "sonar-users";
152  boolean CORE_ALLOW_USERS_TO_SIGNUP_DEAULT_VALUE = false;
153  String CORE_AUTHENTICATOR_CLASS = "sonar.authenticator.class";
154  String CORE_AUTHENTICATOR_IGNORE_STARTUP_FAILURE = "sonar.authenticator.ignoreStartupFailure";
155  String CORE_AUTHENTICATOR_CREATE_USERS = "sonar.authenticator.createUsers";
156  String SERVER_VERSION = "sonar.core.version";
157  String SERVER_ID = "sonar.core.id";
158  String SERVER_STARTTIME = "sonar.core.startTime"; // format is yyyy-MM-dd'T'HH:mm:ssZ
159  String SKIP_TENDENCIES_PROPERTY = "sonar.skipTendencies";
160  boolean SKIP_TENDENCIES_DEFAULT_VALUE = false;
161  String BATCH_INCLUDE_PLUGINS = "sonar.includePlugins";
162  String BATCH_EXCLUDE_PLUGINS = "sonar.excludePlugins";
163
164
165  /**
166   * @since 3.4
167   */
168  String DRY_RUN_INCLUDE_PLUGINS = "sonar.dryRun.includePlugins";
169  String DRY_RUN_INCLUDE_PLUGINS_DEFAULT_VALUE = "";
170
171  /**
172   * @since 3.4
173   */
174  String DRY_RUN_EXCLUDE_PLUGINS = "sonar.dryRun.excludePlugins";
175  String DRY_RUN_EXCLUDE_PLUGINS_DEFAULT_VALUE = "devcockpit,pdfreport,report,scmactivity,views";
176
177  /**
178   * @since 2.10
179   */
180  String SERVER_BASE_URL = "sonar.core.serverBaseURL";
181
182  /**
183   * @see #SERVER_BASE_URL
184   * @since 2.10
185   */
186  String SERVER_BASE_URL_DEFAULT_VALUE = "http://localhost:9000";
187
188  /* CPD */
189  String CPD_PLUGIN = "cpd";
190
191  /**
192   * @deprecated in 3.1
193   */
194  @Deprecated
195  String CPD_MINIMUM_TOKENS_PROPERTY = "sonar.cpd.minimumTokens";
196
197  /**
198   * @deprecated in 3.1
199   */
200  @Deprecated
201  int CPD_MINIMUM_TOKENS_DEFAULT_VALUE = 100;
202
203  /**
204   * @deprecated in 3.1
205   */
206  @Deprecated
207  String CPD_IGNORE_LITERALS_PROPERTY = "sonar.cpd.ignore_literals";
208
209  /**
210   * @deprecated in 3.1
211   */
212  @Deprecated
213  String CPD_IGNORE_LITERALS_DEFAULT_VALUE = "true";
214
215  /**
216   * @deprecated in 3.1
217   */
218  @Deprecated
219  String CPD_IGNORE_IDENTIFIERS_PROPERTY = "sonar.cpd.ignore_identifiers";
220
221  /**
222   * @deprecated in 3.1
223   */
224  @Deprecated
225  String CPD_IGNORE_IDENTIFIERS_DEFAULT_VALUE = "false";
226
227  String CPD_SKIP_PROPERTY = "sonar.cpd.skip";
228
229  /**
230   * @since 2.11
231   * @deprecated in 3.1
232   */
233  @Deprecated
234  String CPD_ENGINE = "sonar.cpd.engine";
235
236  /**
237   * @see #CPD_ENGINE
238   * @since 2.11
239   * @deprecated in 3.1
240   */
241  @Deprecated
242  String CPD_ENGINE_DEFAULT_VALUE = "sonar";
243
244  /**
245   * @since 2.11
246   */
247  String CPD_CROSS_RPOJECT = "sonar.cpd.cross_project";
248
249  /**
250   * @see #CPD_CROSS_RPOJECT
251   * @since 2.11
252   */
253  boolean CPD_CROSS_RPOJECT_DEFAULT_VALUE = false;
254
255  /* Design */
256
257  /**
258   * Indicates whether Java bytecode analysis should be skipped.
259   *
260   * @since 2.0
261   */
262  String DESIGN_SKIP_DESIGN_PROPERTY = "sonar.skipDesign";
263  boolean DESIGN_SKIP_DESIGN_DEFAULT_VALUE = false;
264
265  /**
266   * Indicates whether Package Design Analysis should be skipped.
267   *
268   * @since 2.9
269   */
270  String DESIGN_SKIP_PACKAGE_DESIGN_PROPERTY = "sonar.skipPackageDesign";
271  boolean DESIGN_SKIP_PACKAGE_DESIGN_DEFAULT_VALUE = false;
272
273  /* Findbugs */
274  String FINDBUGS_PLUGIN = "findbugs";
275  String FINDBUGS_EFFORT_PROPERTY = "sonar.findbugs.effort";
276  String FINDBUGS_EFFORT_DEFAULT_VALUE = "Default";
277  String FINDBUGS_CONFIDENCE_LEVEL_PROPERTY = "sonar.findbugs.confidenceLevel";
278  String FINDBUGS_CONFIDENCE_LEVEL_DEFAULT_VALUE = "medium";
279  String FINDBUGS_TIMEOUT_PROPERTY = "sonar.findbugs.timeout";
280  long FINDBUGS_TIMEOUT_DEFAULT_VALUE = 600000;
281
282  /**
283   * @deprecated in 3.4
284   */
285  @Deprecated
286  String FINDBUGS_REPORT_PATH = "sonar.findbugs.reportPath";
287
288  /* Google Analytics */
289  String GOOGLE_ANALYTICS_PLUGIN = "google-analytics";
290  String GOOGLE_ANALYTICS_ACCOUNT_PROPERTY = "sonar.google-analytics.account";
291
292  /* PMD */
293  String PMD_PLUGIN = "pmd";
294
295  /* Squid */
296  String SQUID_PLUGIN = "squid";
297
298  /* Surefire */
299  String SUREFIRE_PLUGIN = "surefire";
300  String SUREFIRE_REPORTS_PATH_PROPERTY = "sonar.surefire.reportsPath";
301
302  /* Time machine periods */
303  String TIMEMACHINE_PERIOD_PREFIX = "sonar.timemachine.period";
304  String TIMEMACHINE_MODE_PREVIOUS_ANALYSIS = "previous_analysis";
305  String TIMEMACHINE_MODE_DATE = "date";
306  String TIMEMACHINE_MODE_VERSION = "version";
307  String TIMEMACHINE_MODE_DAYS = "days";
308  String TIMEMACHINE_MODE_PREVIOUS_VERSION = "previous_version";
309  String TIMEMACHINE_DEFAULT_PERIOD_1 = TIMEMACHINE_MODE_PREVIOUS_ANALYSIS;
310  String TIMEMACHINE_DEFAULT_PERIOD_2 = "5";
311  String TIMEMACHINE_DEFAULT_PERIOD_3 = "30";
312  String TIMEMACHINE_DEFAULT_PERIOD_4 = "";
313  String TIMEMACHINE_DEFAULT_PERIOD_5 = "";
314
315  /**
316   * @since 2.11
317   */
318  String ORGANISATION = "sonar.organisation";
319
320  /**
321   * @since 2.11
322   */
323  String PERMANENT_SERVER_ID = "sonar.server_id";
324
325  /**
326   * @since 2.11
327   */
328  String SERVER_ID_IP_ADDRESS = "sonar.server_id.ip_address";
329
330  /**
331   * @since 3.3
332   */
333  String LINKS_HOME_PAGE = "sonar.links.homepage";
334
335  /**
336   * @since 3.3
337   */
338  String LINKS_CI = "sonar.links.ci";
339
340  /**
341   * @since 3.3
342   */
343  String LINKS_ISSUE_TRACKER = "sonar.links.issue";
344
345  /**
346   * @since 3.3
347   */
348  String LINKS_SOURCES = "sonar.links.scm";
349
350  /**
351   * @since 3.3
352   */
353  String LINKS_SOURCES_DEV = "sonar.links.scm_dev";
354
355  /**
356   * @since 3.4
357   */
358  String LOGIN = "sonar.login";
359
360  /**
361   * @since 3.4
362   */
363  String PASSWORD = "sonar.password";
364
365  /**
366   * @since 3.4
367   */
368  String DRY_RUN = "sonar.dryRun";
369
370  /**
371   * @since 3.4
372   */
373  String FORCE_ANALYSIS = "sonar.forceAnalysis";
374
375  /**
376   * @deprecated replaced in v3.4 by properties specific to languages, for example sonar.java.coveragePlugin
377   * See http://jira.codehaus.org/browse/SONARJAVA-39 for more details.
378   */
379  @Deprecated
380  String CORE_COVERAGE_PLUGIN_PROPERTY = "sonar.core.codeCoveragePlugin";
381}