001/*
002 * SonarQube
003 * Copyright (C) 2009-2016 SonarSource SA
004 * mailto:contact AT sonarsource DOT com
005 *
006 * This program 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 * This program 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 License
017 * along with this program; if not, write to the Free Software Foundation,
018 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
019 */
020package org.sonar.api;
021
022import org.sonar.api.batch.fs.FileSystem;
023import org.sonar.api.platform.Server;
024
025/**
026 * Non-exhaustive list of constants of core properties.
027 *
028 * @since 1.11
029 */
030public interface CoreProperties {
031
032  /**
033   * @since 3.0
034   */
035  String ENCRYPTION_SECRET_KEY_PATH = "sonar.secretKeyPath";
036
037  /**
038   * @since 2.11
039   */
040  String CATEGORY_GENERAL = "general";
041
042  /**
043   * @since 4.0
044   */
045  String SUBCATEGORY_DATABASE_CLEANER = "databaseCleaner";
046
047  /**
048   * @since 4.0
049   */
050  String SUBCATEGORY_DUPLICATIONS = "duplications";
051
052  /**
053   * @since 4.0
054   */
055  String SUBCATEGORY_DIFFERENTIAL_VIEWS = "differentialViews";
056
057  /**
058   * @since 5.1
059   */
060  String SUBCATEGORY_LOOKNFEEL = "looknfeel";
061
062  /**
063   * @since 5.1
064   */
065  String SUBCATEGORY_ISSUES = "issues";
066
067  /**
068   * @since 4.0
069   */
070  String SUBCATEGORY_L10N = "localization";
071
072  /**
073   * @since 2.11
074   */
075  String CATEGORY_CODE_COVERAGE = "codeCoverage";
076
077  /**
078   * @since 2.11
079   */
080  String CATEGORY_SECURITY = "security";
081
082  /**
083   * @since 2.11
084   * @deprecated since 6.0
085   */
086  @Deprecated
087  String CATEGORY_JAVA = "java";
088
089  /**
090   * @since 3.3
091   */
092  String CATEGORY_EXCLUSIONS = "exclusions";
093
094  /**
095   * @since 4.0
096   */
097  String SUBCATEGORY_FILES_EXCLUSIONS = "files";
098
099  /**
100   * @since 4.0
101   */
102  String SUBCATEGORY_DUPLICATIONS_EXCLUSIONS = "duplications";
103
104  /**
105   * @since 4.0
106   */
107  String SUBCATEGORY_COVERAGE_EXCLUSIONS = "coverage";
108
109  /**
110   * @since 6.1
111   */
112  String SUBCATEGORY_EMAIL = "email";
113
114  /**
115   * @since 3.7
116   */
117  String CATEGORY_LICENSES = "licenses";
118
119  /**
120   * @since 4.0
121   */
122  String CATEGORY_TECHNICAL_DEBT = "technicalDebt";
123
124  /* Global settings */
125  String SONAR_HOME = "SONAR_HOME";
126  String PROJECT_BRANCH_PROPERTY = "sonar.branch";
127  String PROJECT_VERSION_PROPERTY = "sonar.projectVersion";
128
129  /**
130   * @since 2.6
131   */
132  String PROJECT_KEY_PROPERTY = "sonar.projectKey";
133
134  /**
135   * @since 2.6
136   */
137  String PROJECT_NAME_PROPERTY = "sonar.projectName";
138
139  /**
140   * @since 2.6
141   */
142  String PROJECT_DESCRIPTION_PROPERTY = "sonar.projectDescription";
143
144  /**
145   * To determine value of this property use {@link FileSystem#encoding()}.
146   *
147   * @since 2.6
148   */
149  String ENCODING_PROPERTY = "sonar.sourceEncoding";
150
151  /**
152   * Value format is yyyy-MM-dd
153   */
154  String PROJECT_DATE_PROPERTY = "sonar.projectDate";
155
156  /**
157   * @deprecated since 4.2 projects are now multi-language
158   */
159  @Deprecated
160  String PROJECT_LANGUAGE_PROPERTY = "sonar.language";
161
162  /* Exclusions */
163  String PROJECT_INCLUSIONS_PROPERTY = "sonar.inclusions";
164  String PROJECT_EXCLUSIONS_PROPERTY = "sonar.exclusions";
165
166  /* Coverage exclusions */
167  String PROJECT_COVERAGE_EXCLUSIONS_PROPERTY = "sonar.coverage.exclusions";
168
169  /**
170   * @since 3.3
171   */
172  String PROJECT_TEST_INCLUSIONS_PROPERTY = "sonar.test.inclusions";
173  String PROJECT_TEST_EXCLUSIONS_PROPERTY = "sonar.test.exclusions";
174  String GLOBAL_EXCLUSIONS_PROPERTY = "sonar.global.exclusions";
175  String GLOBAL_TEST_EXCLUSIONS_PROPERTY = "sonar.global.test.exclusions";
176
177  /* Sonar Core */
178
179  String CORE_FORCE_AUTHENTICATION_PROPERTY = "sonar.forceAuthentication";
180  boolean CORE_FORCE_AUTHENTICATION_DEFAULT_VALUE = false;
181  String CORE_ALLOW_USERS_TO_SIGNUP_PROPERTY = "sonar.allowUsersToSignUp";
182  String CORE_DEFAULT_GROUP = "sonar.defaultGroup";
183  String CORE_DEFAULT_GROUP_DEFAULT_VALUE = "sonar-users";
184  boolean CORE_ALLOW_USERS_TO_SIGNUP_DEAULT_VALUE = false;
185
186  /**
187   * @deprecated since 2.14. See http://jira.sonarsource.com/browse/SONAR-3153. Replaced by {@link #CORE_AUTHENTICATOR_REALM}.
188   */
189  @Deprecated
190  String CORE_AUTHENTICATOR_CLASS = "sonar.authenticator.class";
191
192  /**
193   * @since 2.14
194   */
195  String CORE_AUTHENTICATOR_REALM = "sonar.security.realm";
196
197  String CORE_AUTHENTICATOR_IGNORE_STARTUP_FAILURE = "sonar.authenticator.ignoreStartupFailure";
198  String CORE_AUTHENTICATOR_CREATE_USERS = "sonar.authenticator.createUsers";
199
200  /**
201   * @since 3.6
202   * @deprecated since 5.4. This feature is not supported anymore. See http://jira.sonarsource.com/browse/SONAR-7219
203   */
204  @Deprecated
205  String CORE_AUTHENTICATOR_UPDATE_USER_ATTRIBUTES = "sonar.security.updateUserAttributes";
206
207  String SERVER_VERSION = "sonar.core.version";
208  String SERVER_ID = "sonar.core.id";
209
210  // format is yyyy-MM-dd'T'HH:mm:ssZ
211  String SERVER_STARTTIME = "sonar.core.startTime";
212
213  /**
214   * This property defines the SonarQubeServer base url, such as <i>http://yourhost.yourdomain/sonar</i>.
215   * When this property is not set, the base url of the SonarQube server is provided by {@link Server#getURL()}.
216   *
217   * @since 2.10
218   */
219  String SERVER_BASE_URL = "sonar.core.serverBaseURL";
220
221  /**
222   * @see #SERVER_BASE_URL
223   * @since 2.10
224   * @deprecated since 5.6. This constant default value is incorrect if a host and/or a port and/or a context have been configured.
225   *             The correct default value when {@link #SERVER_BASE_URL} is not set is provided by {@link Server#getURL()}.
226   */
227  @Deprecated
228  String SERVER_BASE_URL_DEFAULT_VALUE = "http://localhost:9000";
229
230  /* CPD */
231  String CPD_PLUGIN = "cpd";
232
233  /**
234   * @since 2.11
235   */
236  String CPD_CROSS_PROJECT = "sonar.cpd.cross_project";
237
238  /**
239   * @see #CPD_CROSS_PROJECT
240   * @since 2.11
241   */
242  boolean CPD_CROSS_PROJECT_DEFAULT_VALUE = false;
243
244  /**
245   * @since 3.5
246   */
247  String CPD_EXCLUSIONS = "sonar.cpd.exclusions";
248
249  /* Design */
250
251  /**
252   * Indicates whether Java bytecode analysis should be skipped.
253   *
254   * @since 2.0
255   */
256  String DESIGN_SKIP_DESIGN_PROPERTY = "sonar.skipDesign";
257  boolean DESIGN_SKIP_DESIGN_DEFAULT_VALUE = false;
258
259  /**
260   * Indicates whether Package Design Analysis should be skipped.
261   *
262   * @since 2.9
263   */
264  String DESIGN_SKIP_PACKAGE_DESIGN_PROPERTY = "sonar.skipPackageDesign";
265  boolean DESIGN_SKIP_PACKAGE_DESIGN_DEFAULT_VALUE = false;
266
267  /* Google Analytics */
268  String GOOGLE_ANALYTICS_PLUGIN = "google-analytics";
269  String GOOGLE_ANALYTICS_ACCOUNT_PROPERTY = "sonar.google-analytics.account";
270
271  /**
272   * @since 2.11
273   */
274  String ORGANISATION = "sonar.organisation";
275
276  /**
277   * @since 2.11
278   */
279  String PERMANENT_SERVER_ID = "sonar.server_id";
280
281  /**
282   * @since 2.11
283   */
284  String SERVER_ID_IP_ADDRESS = "sonar.server_id.ip_address";
285
286  /**
287   * @since 3.3
288   */
289  String LINKS_HOME_PAGE = "sonar.links.homepage";
290
291  /**
292   * @since 3.3
293   */
294  String LINKS_CI = "sonar.links.ci";
295
296  /**
297   * @since 3.3
298   */
299  String LINKS_ISSUE_TRACKER = "sonar.links.issue";
300
301  /**
302   * @since 3.3
303   */
304  String LINKS_SOURCES = "sonar.links.scm";
305
306  /**
307   * @since 3.3
308   */
309  String LINKS_SOURCES_DEV = "sonar.links.scm_dev";
310
311  /**
312   * @since 3.4
313   */
314  String LOGIN = "sonar.login";
315
316  /**
317   * @since 3.4
318   */
319  String PASSWORD = "sonar.password";
320
321  /**
322   * @since 3.5
323   */
324  String TASK = "sonar.task";
325
326  /**
327   * @since 3.6
328   */
329  String SCAN_TASK = "scan";
330
331  /**
332   * @since 3.6
333   */
334  String PROFILING_LOG_PROPERTY = "sonar.showProfiling";
335
336  /**
337   * @since 4.0
338   * @deprecated in 5.1 no more used
339   */
340  @Deprecated
341  String PREVIEW_READ_TIMEOUT_SEC = "sonar.preview.readTimeout";
342
343  /**
344   * @since 4.0
345   * @deprecated replaced in 5.2 by the permission 'provisioning'
346   */
347  @Deprecated
348  String CORE_PREVENT_AUTOMATIC_PROJECT_CREATION = "sonar.preventAutoProjectCreation";
349
350  /**
351   * @since 4.0
352   */
353  String ANALYSIS_MODE = "sonar.analysis.mode";
354
355  /**
356   * @since 4.0
357   * @deprecated since 5.2 the default mode is publish
358   */
359  @Deprecated
360  String ANALYSIS_MODE_ANALYSIS = "analysis";
361
362  /**
363   * @since 4.0
364   */
365  String ANALYSIS_MODE_PREVIEW = "preview";
366
367  /**
368   * @since 5.2
369   */
370  String ANALYSIS_MODE_ISSUES = "issues";
371
372  /**
373   * @since 5.2
374   */
375  String ANALYSIS_MODE_PUBLISH = "publish";
376
377  /**
378   * @since 4.0
379   * @deprecated since 5.2
380   */
381  @Deprecated
382  String ANALYSIS_MODE_INCREMENTAL = "incremental";
383
384  /**
385   * @since 4.0
386   */
387  String PREVIEW_INCLUDE_PLUGINS = "sonar.preview.includePlugins";
388  String PREVIEW_INCLUDE_PLUGINS_DEFAULT_VALUE = "";
389
390  /**
391   * @since 4.0
392   */
393  String PREVIEW_EXCLUDE_PLUGINS = "sonar.preview.excludePlugins";
394
395  // SONAR-6704 add scmstats to the list
396  String PREVIEW_EXCLUDE_PLUGINS_DEFAULT_VALUE = "buildstability,devcockpit,pdfreport,report,views,jira,buildbreaker,scmstats";
397
398  /**
399   * @since 4.0
400   */
401  String WORKING_DIRECTORY = "sonar.working.directory";
402
403  String WORKING_DIRECTORY_DEFAULT_VALUE = ".sonar";
404
405  /**
406   * @since 5.2
407   */
408  String GLOBAL_WORKING_DIRECTORY = "sonar.globalWorking.directory";
409  String GLOBAL_WORKING_DIRECTORY_DEFAULT_VALUE = "";
410
411  /**
412   * @since 4.2
413   * @deprecated no more used since 5.5
414   */
415  @Deprecated
416  String CORE_AUTHENTICATOR_LOCAL_USERS = "sonar.security.localUsers";
417
418  /**
419   * @since 4.0
420   */
421  String HOURS_IN_DAY = "sonar.technicalDebt.hoursInDay";
422
423  /**
424   * @since 4.5
425   * @deprecated no used anymore since 5.2
426   */
427  @Deprecated
428  String SIZE_METRIC = "sonar.technicalDebt.sizeMetric";
429
430  /**
431   * @since 4.5
432   */
433  String DEVELOPMENT_COST = "sonar.technicalDebt.developmentCost";
434
435  /**
436   * @since 4.5
437   */
438  String DEVELOPMENT_COST_DEF_VALUE = "30";
439
440  /**
441   * @since 4.5
442   */
443  String RATING_GRID = "sonar.technicalDebt.ratingGrid";
444
445  /**
446   * @since 4.5
447   */
448  String RATING_GRID_DEF_VALUES = "0.05,0.1,0.2,0.5";
449
450  /**
451   * @since 4.5
452   */
453  String LANGUAGE_SPECIFIC_PARAMETERS = "languageSpecificParameters";
454
455  /**
456   * @since 4.5
457   */
458  String LANGUAGE_SPECIFIC_PARAMETERS_LANGUAGE_KEY = "language";
459
460  /**
461   * @since 4.5
462   */
463  String LANGUAGE_SPECIFIC_PARAMETERS_MAN_DAYS_KEY = "man_days";
464
465  /**
466   * @since 4.5
467   */
468  String LANGUAGE_SPECIFIC_PARAMETERS_SIZE_METRIC_KEY = "size_metric";
469
470  /**
471   * @since 5.0
472   */
473  String CATEGORY_SCM = "scm";
474
475  /**
476   * @since 5.0
477   */
478  String SCM_DISABLED_KEY = "sonar.scm.disabled";
479
480  /**
481   * @since 5.0
482   */
483  String SCM_PROVIDER_KEY = "sonar.scm.provider";
484
485  /**
486   * @since 5.1
487   */
488  String IMPORT_UNKNOWN_FILES_KEY = "sonar.import_unknown_files";
489
490  /**
491   * @since 5.1
492   */
493  String DEFAULT_ISSUE_ASSIGNEE = "sonar.issues.defaultAssigneeLogin";
494
495}