Class SonargraphBuildRunner

java.lang.Object
com.hello2morrow.sonargraph.build.client.SonargraphBuildRunner
All Implemented Interfaces:
ILogger, ISonargraphBuildClient

public final class SonargraphBuildRunner extends Object implements ISonargraphBuildClient
  • Constructor Details

    • SonargraphBuildRunner

      public SonargraphBuildRunner()
  • Method Details

    • getClientName

      public String getClientName()
      Specified by:
      getClientName in interface ISonargraphBuildClient
    • info

      public void info(String msg)
      Description copied from interface: ILogger
      Log an informational message regarding progress
      Specified by:
      info in interface ILogger
      Parameters:
      msg - Message to be logged
    • error

      public void error(String msg)
      Description copied from interface: ILogger
      Log an error message regarding progress
      Specified by:
      error in interface ILogger
      Parameters:
      msg - Message to be logged
    • getDefaultOutputDirectory

      public File getDefaultOutputDirectory()
      Specified by:
      getDefaultOutputDirectory in interface ISonargraphBuildClient
    • getProjectDirectory

      public File getProjectDirectory()
      Specified by:
      getProjectDirectory in interface ISonargraphBuildClient
    • getVersion

      public ISonargraphBuild.Version getVersion()
      Specified by:
      getVersion in interface ISonargraphBuildClient
    • main

      public static void main(String[] args)
      Executes the following actions:
      1. Starts SonargraphBuild
      2. Opens software system
      3. Refreshes software system
      4. Sets virtual model
      5. Creates report
      6. Creates snapshot if at least one of snapshotDirectory or snapshotFileName are specified
      7. Checks for issues (if specified)
      Terminates normally, if no error occurs during operation. Exits with -1 if an error occurs or issues match the failset.
      Sample configuration file:
       
           <sonargraphBuild
          activationCode="_your activation code_"
          licenseFileLocation="path to your license file"
          languages="Java"
          installationDirectory="../.."
          systemDirectory="../javaProject/AlarmClock.sonargraph"
          virtualModel="Modifiable.vm"
          reportDirectory="./_temp/report"
          reportFileName=""
          reportType="full"
          reportFormat="xml,html"
          snapshotDirectory=""
          snapshotFileName="AlarmClock_Snapshot"
          proxyHost=""
          proxyPort=""
          proxyUsername=""
          proxyPassword=""
          logLevel="info"
          progressInfo="detailed">
      
          <failSet failOnEmptyWorkspace="false">
             <include issueType="any" severity="error" resolution="none"/>
             <exclude issueType="ScriptCompilationError" resolution="none"/>
             <include issueType="any" severity="warning"/>
             <include issueType="ArchitectureViolation"/>
             <exclude issueType="Supertype uses subtype" resolution="none"/>
             <exclude issueType="ThresholdViolation"/>
          </failSet>
          </sonargraphBuild>
       
      Parameters:
      args - Path to the configuration file is expected as the first parameter. The second parameter specifies the operation, i.e. "createReport" (default) or "resendFailedUploads".