Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 59 Next »

Release 2.3 Upgrade Notes

Findbugs

  • Some findbugs violations have been missing in previous versions (see SONAR-1666). A consequence is that some rules can generate more violations on the same codebase.
  • The profile "Sonar way with Findbugs" includes new rules (see SONAR-1534). Projects using this profile can have much more violations for the same codebase.

PMD

  • The rule CloneMethodMustImplementCloneable was badly configured, so it has never been executed (see SONAR-1805). This rule is activated in the profile "Sonar way", so some projects can have some new violations with the same codebase.

Metric LCOM4

  • Some member variables, for example loggers, are now excluded from LCOM4 (see SONAR-1641). This metric can vary on some classes compared to previous versions.

Not compatible plugins

Plugins Rules Meter and Web (version 0.1 only) are not compatible. They must be uninstalled before starting the SonarQube server. Delete the files from /extensions/plugins/.

Upgrade guide
  • Before upgrading, please read the notes for versions 2.0 , 2.1, 2.2 or 2.3.
  • Stop Sonar :
  • Unzip the new version of Sonar in a fresh directory, let's say {$NEW_SONAR_HOME}
  • Copy sonar.properties and wrapper.conf files from {$OLD_SONAR_HOME}/conf to {$NEW_SONAR_HOME}/conf or configure sonar.properties
  • If you use rules extensions or your own jdbc drivers, copy the corresponding directories into /extensions from {$OLD_SONAR_HOME} to {$NEW_SONAR_HOME}
  • If you are using Sonar plugins, you should copy them to the new instance. Check the compatibility between Sonar core and the plugin before doing so.
  • Backup your database
  • If Sonar is deployed on a JEE application server, repackage the WAR file by executing the script /war/build-war
  • Start the server (or restart the application server)
  • Browse to http://localhost:9000/setup and follow setup instructions.
  • Re-analyze your projects to get fresh measures

Upgrade process

Icon

Upgrade process can take a while depending on the size of projects portfolio. To monitor the process, checks the logs and / or the console.

Migration is completed when an analysis has been run on project. Only at that point will you get new functionality working for sure.

Release 2.3 Upgrade Notes

Findbugs

  • Some findbugs violations have been missing in previous versions (see SONAR-1666). A consequence is that some rules can generate more violations on the same codebase.
  • The profile "Sonar way with Findbugs" includes new rules (see SONAR-1534). Projects using this profile can have much more violations for the same codebase.

PMD

  • The rule CloneMethodMustImplementCloneable was badly configured, so it has never been executed (see SONAR-1805). This rule is activated in the profile "Sonar way", so some projects can have some new violations with the same codebase.

Metric LCOM4

  • Some member variables, for example loggers, are now excluded from LCOM4 (see SONAR-1641). This metric can vary on some classes compared to previous versions.

Not compatible plugins

Plugins Rules Meter and Web (version 0.1 only) are not compatible. They must be uninstalled before starting the SonarQube server. Delete the files from /extensions/plugins/.

Release 2.2 Upgrade Notes

Warning

Icon

The property sonar.host.url MUST NOT end with a slash character. Otherwise, JDBC driver is not found by the Sonar Maven plugin. See SONAR-1685. This issue is fixed in version 2.3.

Required plugin upgrades

The following plugins must be upgraded :

  • Flex 0.2
  • Motion Chart 1.1
  • Cobol 1.2
  • Visual Basic 1.0.1

Other plugins are compatible.

Checkstyle

  • SONAR-1398 : Upgrade Checkstyle from version 5.0 to 5.1. There aren't any new rules.
  • SONAR-992 : Support several source directories. 
  • SONAR-1179 : Support Checkstyle custom checks with Maven 2.1+ 
  • SONAR-1536 : The Checkstyle Maven plugin is not executed anymore, Checkstyle being directly executed by SonarQube. It decreases the coupling with Maven and helps to be more reactive with new Checkstyle versions. A consequence is that the existing Checkstyle configuration in pom is not inherited anymore. 

PMD

  • SONAR-1179 : Support PMD custom checks with Maven 2.1+
  • SONAR-1537 : Upgrade PMD from 4.2.2 to 4.2.5
  • SONAR-1542 : The PMD Maven plugin is not executed anymore, PMD being directly executed by SonarQube. It decreases the coupling with Maven and helps to be more reactive with new PMD versions. A consequence is that the existing PMD configuration in pom is not inherited anymore.
  • New rules :
    • Simplify Boolean Expressions
    • Avoid Throwing New Instance of Same Exception
    • Four new rules for Android

Duplicated code

When more than 2 files are involved in the same duplication, all duplicated blocks are reported while only 2 were reported before. It potentially increases the number of duplicated blocks, duplicated lines and density of duplicated lines.

When a line is involved in several different duplications, it is now counted only once as a duplicated line. It potentially decreases the number of duplicated lines and density of duplicated lines.

Cobertura

  • SONAR-1277 : New property "max memory"
  • SONAR-1421 : Upgrade to Cobertura 1.9.4.1 (performance improvements)

Clover 

Clover 3 is now supported and Clover 1 has been removed. The default used version is upgraded to 2.6.3.

Deploy SonarQube WAR in JEE server

The WAR file is now linked to the Sonar directory (the directory where the distribution is unzipped). It implies :

  • No need to rebuild the WAR when installing/uninstalling plugins or rule extensions
  • The WAR file must be deployed on the host which contains the Sonar directory
  • The WAR file must be rebuilt when the Sonar directory is moved
  • The WAR file must be rebuilt when a configuration file is updated (directory conf/)
  • The property sonar.rules.extensionsPath is not supported anymore
 

Release 2.1 Upgrade Notes

Findbugs plugin

Findbugs is executed in a forked process. The new property "sonar.findbugs.timeout" is the amount of time, in milliseconds, that Findbugs may run before it is assumed to be hung and terminated. The default value is 600 000 (ten minutes). This property can be set in the Settings page or in the Maven pom.

Duplications (CPD) plugin

Detection of duplicated code is memory hungry. It can be deactivated on big projects with the new property "sonar.cpd.skip", configurable in the Settings page or in the Maven pom.

New page System Info

The page "System info" in the configuration section displays detailed information about the system configuration : installed plugins, Java VM memory statistics, system info, database statistics, system properties.

New page Libraries

The page "Libraries", in the project section, displays all the libraries used by the project. It requires the project to be built with Maven, else the page is empty.

Release 2.0 Upgrade Notes

Database migration form has a new URL

See SONAR-1276 : The setup form is not available in the homepage anymore. Administrators must explicitly browse to http://<server>/setup.

Upgrade to Checkstyle 5.0

New rules (not activated in default Quality profiles) :

If some of the following rules are activated in your quality profiles, then you have to manually deactivate them :

Upgrade to Findbugs 1.3.9

See SONAR-1343 : Findbugs has now its own parameter to define the max memory heap size. It is not executed in the Maven process anymore. The parameter is "sonar.findbugs.maxHeap", the default value is 512 (Mo) and it can be defined online in SonarQube settings.

Better Complexity/class

See SONAR-1327 : the complexity distribution by class was badly calculated. It now covers all classes, but not only public classes.

Overridable Cobertura version

The version of the Cobertura Maven plugin can be overridden. Default value is 2.3. The new version must be set in the definition of the cobertura plugin in pom.xml.

Log HTTP requests

See SONAR-1364 to log all HTTP requests to SonarQube server. This feature is deactivated by default and is ignored when SonarQube is deployed to a JEE server.

User management

  1. See SONAR-1334 : users can be automatically created on external authentication mode. This feature is deactivated by default. The parameter is "sonar.authenticator.createUsers" (true|false), to be set in the file conf/sonar.properties
  2. The default group affected to new users can be defined online, in SonarQubegeneral settings. The default value is "sonar-users".

Design analysis

The main functionality of version 2.0 is about byte code analysis to report on design and architecture. It is however possible to not activate this new feature by using the advanced parameter

or through the UI.

  • No labels