code: protected void runMSBuild( List<String> targets, Map<String, String> environment ) 
              throws MojoExecutionException, MojoFailureException
      {
          try
          {
              MSBuildExecutor msbuild = new MSBuildExecutor( getLog(), msbuildPath, msbuildMaxCpuCount, projectFile );
              msbuild.setPlatforms( platforms );
              msbuild.setTargets( targets );
              msbuild.setEnvironment( environment );
              if ( msbuild.execute() != 0 )
              {
                  throw new MojoFailureException(
                          "MSBuild execution failed, see log for details." );
              }
          }
          catch ( IOException ioe ) 
          {
              throw new MojoExecutionException(
                      "MSBUild execution failed", ioe );
          }
          catch ( InterruptedException ie )
          {
              throw new MojoExecutionException( "Interrupted waiting for "
                      + "MSBUild execution to complete", ie );
          }
      }
docs: Run MSBuild for each platform and configuration pair.
  @param targets the build targets to pass to MSBuild
  @param environment optional environment variable Map (my be null)
  @throws MojoExecutionException if there is a problem running MSBuild
  @throws MojoFailureException if MSBuild returns a non-zero exit code