001    /*
002     * Sonar, open source software quality management tool.
003     * Copyright (C) 2008-2011 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     */
020    package 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     */
028    public interface CoreProperties {
029    
030      /**
031       * @since 2.11
032       */
033      String CATEGORY_GENERAL = "general";
034    
035      /**
036       * @since 2.11
037       */
038      String CATEGORY_CODE_COVERAGE = "codeCoverage";
039    
040      /**
041       * @since 2.11
042       */
043      String CATEGORY_DUPLICATIONS = "duplications";
044    
045      /**
046       * @since 2.11
047       */
048      String CATEGORY_SECURITY = "security";
049    
050      /**
051       * @since 2.11
052       */
053      String CATEGORY_L10N = "localization";
054    
055      /**
056       * @since 2.11
057       */
058      String CATEGORY_JAVA = "java";
059    
060      /**
061       * @since 2.11
062       */
063      String CATEGORY_DIFFERENTIAL_VIEWS = "differentialViews";
064    
065    
066      /* Global settings */
067      String SONAR_HOME = "sonar.home";
068      String PROJECT_BRANCH_PROPERTY = "sonar.branch";
069      String PROJECT_VERSION_PROPERTY = "sonar.projectVersion";
070    
071      /**
072       * @since 2.6
073       */
074      String PROJECT_KEY_PROPERTY = "sonar.projectKey";
075    
076      /**
077       * @since 2.6
078       */
079      String PROJECT_NAME_PROPERTY = "sonar.projectName";
080    
081      /**
082       * @since 2.6
083       */
084      String PROJECT_DESCRIPTION_PROPERTY = "sonar.projectDescription";
085    
086      /**
087       * To determine value of this property use {@link org.sonar.api.resources.ProjectFileSystem#getSourceCharset()}.
088       * 
089       * @since 2.6
090       */
091      String ENCODING_PROPERTY = "sonar.sourceEncoding";
092    
093      /**
094       * Value format is yyyy-MM-dd
095       */
096      String PROJECT_DATE_PROPERTY = "sonar.projectDate";
097      String PROJECT_LANGUAGE_PROPERTY = "sonar.language";
098      String DYNAMIC_ANALYSIS_PROPERTY = "sonar.dynamicAnalysis";
099      String PROJECT_EXCLUSIONS_PROPERTY = "sonar.exclusions";
100    
101      /**
102       * @deprecated since 2.5. See discussion from http://jira.codehaus.org/browse/SONAR-1873
103       */
104      @Deprecated
105      String REUSE_RULES_CONFIGURATION_PROPERTY = "sonar.reuseExistingRulesConfiguration";
106    
107      /* Checkstyle */
108      String CHECKSTYLE_PLUGIN = "checkstyle";
109    
110      /* Cobertura */
111      String COBERTURA_PLUGIN = "cobertura";
112      String COBERTURA_REPORT_PATH_PROPERTY = "sonar.cobertura.reportPath";
113      String COBERTURA_MAXMEM_PROPERTY = "sonar.cobertura.maxmen";
114      String COBERTURA_MAXMEM_DEFAULT_VALUE = "64m";
115    
116      /* Sonar Core */
117      String CORE_PLUGIN = "core";
118      String CORE_VIOLATION_LOCALE_PROPERTY = "sonar.violationLocale";
119      String CORE_VIOLATION_LOCALE_DEFAULT_VALUE = "en";
120      String CORE_COVERAGE_PLUGIN_PROPERTY = "sonar.core.codeCoveragePlugin";
121      String CORE_IMPORT_SOURCES_PROPERTY = "sonar.importSources";
122      boolean CORE_IMPORT_SOURCES_DEFAULT_VALUE = true;
123      String CORE_SKIPPED_MODULES_PROPERTY = "sonar.skippedModules";
124      String CORE_RULE_WEIGHTS_PROPERTY = "sonar.core.rule.weight";
125      String CORE_RULE_WEIGHTS_DEFAULT_VALUE = "INFO=0;MINOR=1;MAJOR=3;CRITICAL=5;BLOCKER=10";
126      String CORE_TENDENCY_DEPTH_PROPERTY = "tendency.depth";
127      int CORE_TENDENCY_DEPTH_DEFAULT_VALUE = 30;
128      String CORE_FORCE_AUTHENTICATION_PROPERTY = "sonar.forceAuthentication";
129      boolean CORE_FORCE_AUTHENTICATION_DEFAULT_VALUE = false;
130      String CORE_ALLOW_USERS_TO_SIGNUP_PROPERTY = "sonar.allowUsersToSignUp";
131      String CORE_DEFAULT_GROUP = "sonar.defaultGroup";
132      String CORE_DEFAULT_GROUP_DEFAULT_VALUE = "sonar-users";
133      boolean CORE_ALLOW_USERS_TO_SIGNUP_DEAULT_VALUE = false;
134      String CORE_AUTHENTICATOR_CLASS = "sonar.authenticator.class";
135      String CORE_AUTHENTICATOR_IGNORE_STARTUP_FAILURE = "sonar.authenticator.ignoreStartupFailure";
136      String CORE_AUTHENTICATOR_CREATE_USERS = "sonar.authenticator.createUsers";
137      String SERVER_VERSION = "sonar.core.version";
138      String SERVER_ID = "sonar.core.id";
139      String SERVER_STARTTIME = "sonar.core.startTime"; // format is yyyy-MM-dd'T'HH:mm:ssZ
140      String SKIP_TENDENCIES_PROPERTY = "sonar.skipTendencies";
141      boolean SKIP_TENDENCIES_DEFAULT_VALUE = false;
142      String BATCH_INCLUDE_PLUGINS = "sonar.includePlugins";
143      String BATCH_EXCLUDE_PLUGINS = "sonar.excludePlugins";
144    
145      /**
146       * @since 2.10
147       */
148      String SERVER_BASE_URL = "sonar.core.serverBaseURL";
149    
150      /**
151       * @since 2.10
152       * @see #SERVER_BASE_URL
153       */
154      String SERVER_BASE_URL_DEFAULT_VALUE = "http://localhost:9000";
155    
156      /* CPD */
157      String CPD_PLUGIN = "cpd";
158      String CPD_MINIMUM_TOKENS_PROPERTY = "sonar.cpd.minimumTokens";
159      int CPD_MINIMUM_TOKENS_DEFAULT_VALUE = 100;
160      String CPD_IGNORE_LITERALS_PROPERTY = "sonar.cpd.ignore_literals";
161      String CPD_IGNORE_LITERALS_DEFAULT_VALUE = "true";
162      String CPD_IGNORE_IDENTIFIERS_PROPERTY = "sonar.cpd.ignore_identifiers";
163      String CPD_IGNORE_IDENTIFIERS_DEFAULT_VALUE = "false";
164      String CPD_SKIP_PROPERTY = "sonar.cpd.skip";
165    
166      /**
167       * @since 2.11
168       */
169      String CPD_ENGINE = "sonar.cpd.engine";
170    
171      /**
172       * @since 2.11
173       * @see #CPD_ENGINE
174       */
175      String CPD_ENGINE_DEFAULT_VALUE = "sonar";
176    
177      /**
178       * @since 2.11
179       */
180      String CPD_CROSS_RPOJECT = "sonar.cpd.cross_project";
181    
182      /**
183       * @since 2.11
184       * @see #CPD_CROSS_RPOJECT
185       */
186      boolean CPD_CROSS_RPOJECT_DEFAULT_VALUE = false;
187    
188      /* Design */
189    
190      /**
191       * Indicates whether Java bytecode analysis should be skipped.
192       * 
193       * @since 2.0
194       */
195      String DESIGN_SKIP_DESIGN_PROPERTY = "sonar.skipDesign";
196      boolean DESIGN_SKIP_DESIGN_DEFAULT_VALUE = false;
197    
198      /**
199       * Indicates whether Package Design Analysis should be skipped.
200       * 
201       * @since 2.9
202       */
203      String DESIGN_SKIP_PACKAGE_DESIGN_PROPERTY = "sonar.skipPackageDesign";
204      boolean DESIGN_SKIP_PACKAGE_DESIGN_DEFAULT_VALUE = false;
205    
206      /* Findbugs */
207      String FINDBUGS_PLUGIN = "findbugs";
208      String FINDBUGS_EFFORT_PROPERTY = "sonar.findbugs.effort";
209      String FINDBUGS_EFFORT_DEFAULT_VALUE = "Default";
210      String FINDBUGS_REPORT_PATH = "sonar.findbugs.reportPath";
211      String FINDBUGS_TIMEOUT_PROPERTY = "sonar.findbugs.timeout";
212      long FINDBUGS_TIMEOUT_DEFAULT_VALUE = 600000;
213    
214      /* Google Analytics */
215      String GOOGLE_ANALYTICS_PLUGIN = "google-analytics";
216      String GOOGLE_ANALYTICS_ACCOUNT_PROPERTY = "sonar.google-analytics.account";
217    
218      /* PMD */
219      String PMD_PLUGIN = "pmd";
220    
221      /* Squid */
222      String SQUID_PLUGIN = "squid";
223    
224      /* Surefire */
225      String SUREFIRE_PLUGIN = "surefire";
226      String SUREFIRE_REPORTS_PATH_PROPERTY = "sonar.surefire.reportsPath";
227    
228      /* Time machine periods */
229      String TIMEMACHINE_PERIOD_PREFIX = "sonar.timemachine.period";
230      String TIMEMACHINE_MODE_PREVIOUS_ANALYSIS = "previous_analysis";
231      String TIMEMACHINE_MODE_DATE = "date";
232      String TIMEMACHINE_MODE_VERSION = "version";
233      String TIMEMACHINE_MODE_DAYS = "days";
234      String TIMEMACHINE_DEFAULT_PERIOD_1 = TIMEMACHINE_MODE_PREVIOUS_ANALYSIS;
235      String TIMEMACHINE_DEFAULT_PERIOD_2 = "5";
236      String TIMEMACHINE_DEFAULT_PERIOD_3 = "30";
237      String TIMEMACHINE_DEFAULT_PERIOD_4 = "";
238      String TIMEMACHINE_DEFAULT_PERIOD_5 = "";
239    
240      /**
241       * @since 2.11
242       */
243      String ORGANISATION = "sonar.organisation";
244    
245      /**
246       * @since 2.11
247       */
248      String PERMANENT_SERVER_ID = "sonar.server_id";
249    
250      /**
251       * @since 2.11
252       */
253      String SERVER_ID_IP_ADDRESS = "sonar.server_id.ip_address";
254    }