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 ) ; } }
Run MSBuild for each platform and configuration pair .