Generates SCoverage report.

@throws MojoExecutionException if unexpected problem occurs
183992
@Override
    public void execute()
        throws MojoExecutionException
    {
        if ( !canGenerateReport() )
        {
            getLog().info( "Skipping SCoverage report generation" );
            return;
        }

        try
        {
            RenderingContext context = new RenderingContext( outputDirectory, getOutputName() + ".html" );
            SiteRendererSink sink = new SiteRendererSink( context );
            Locale locale = Locale.getDefault();
            generate( sink, locale );
        }
        catch ( MavenReportException e )
        {
            String prefix = "An error has occurred in " + getName( Locale.ENGLISH ) + " report generation";
            throw new MojoExecutionException( prefix + ": " + e.getMessage(), e );
        }
    }
1104170
@Override
    protected void runCheck() throws MojoExecutionException, MojoFailureException {

        if (getConnectionString() != null && !getConnectionString().isEmpty()) {
            final String msg = "Unable to purge the local NVD when using a non-default connection string";
            if (this.isFailOnError()) {
                throw new MojoFailureException(msg);
            }
            getLog().error(msg);
        } else {
            populateSettings();
            final File db;
            try {
                db = new File(getSettings().getDataDirectory(), getSettings().getString(Settings.KEYS.DB_FILE_NAME, "odc.mv.db"));
                if (db.exists()) {
                    if (db.delete()) {
                        getLog().info("Database file purged; local copy of the NVD has been removed");
                    } else {
                        final String msg = String.format("Unable to delete '%s'; please delete the file manually", db.getAbsolutePath());
                        if (this.isFailOnError()) {
                            throw new MojoFailureException(msg);
                        }
                        getLog().error(msg);
                    }
                } else {
                    final String msg = String.format("Unable to purge database; the database file does not exist: %s", db.getAbsolutePath());
                    if (this.isFailOnError()) {
                        throw new MojoFailureException(msg);
                    }
                    getLog().error(msg);
                }
            } catch (IOException ex) {
                final String msg = "Unable to delete the database";
                if (this.isFailOnError()) {
                    throw new MojoExecutionException(msg, ex);
                }
                getLog().error(msg);
            }
            getSettings().cleanup();
        }
    }
900954
private void generateExternalReports(Engine engine, File outDirectory) throws ScanAgentException {
        try {
            engine.writeReports(applicationName, outDirectory, this.reportFormat.name());
        } catch (ReportException ex) {
            LOGGER.debug("Unexpected exception occurred during analysis; please see the verbose error log for more details.", ex);
            throw new ScanAgentException("Error generating the report", ex);
        }
    }
1321311
public void execute()
            throws MojoExecutionException {

        if (! watch) {
            removeFromWatching();
        }

        if (extensions == null || extensions.isEmpty()) {
            extensions = ImmutableList.of("ad", "asciidoc", "adoc");
        }

        if (instance == null) {
            instance = getAsciidoctorInstance();
        }

        final OptionsBuilder optionsBuilderExternals = OptionsBuilder.options().compact(compact)
                .safe(SafeMode.UNSAFE).eruby(eruby).backend(backend).docType(doctype).headerFooter(headerFooter).inPlace(true);

        final OptionsBuilder optionsBuilderInternals = OptionsBuilder.options().compact(compact)
                .safe(SafeMode.UNSAFE).eruby(eruby).backend(backend).docType(doctype).headerFooter(headerFooter).inPlace(true);

        if (templateEngine != null) {
            optionsBuilderExternals.templateEngine(templateEngine);
            optionsBuilderInternals.templateEngine(templateEngine);
        }

        if (templateDir != null) {
            optionsBuilderExternals.templateDir(templateDir);
            optionsBuilderInternals.templateDir(templateDir);
        }

        if (sourceHighlighter != null) {
            attributes.put("source-highlighter", sourceHighlighter);
        }

        if (embedAssets) {
            attributes.put("linkcss!", true);
            attributes.put("data-uri", true);
        }

        if (imagesDir != null) {
            attributes.put("imagesdir", imagesDir);
        }

        if (stylesheet != null) {
            attributes.put(Attributes.STYLESHEET_NAME, stylesheet);
            attributes.put(Attributes.LINK_CSS, true);
        }

        if (stylesheetDir != null) {
            attributes.put(Attributes.STYLES_DIR, stylesheetDir);
        }

        optionsBuilderExternals.attributes(attributes);
        optionsBuilderInternals.attributes(attributes);

        IOFileFilter filter = null;
        if (includes != null && includes.length != 0) {
            filter = new WildcardFileFilter(includes);
            if (excludes != null && excludes.length != 0) {
                filter = new AndFileFilter(filter, new NotFileFilter(new WildcardFileFilter(excludes)));
            }
        }
        try {
            for (File file : getResources(extensions)) {
                if (filter == null || filter.accept(file)) {
                    renderFile(optionsBuilderExternals.asMap(), file);
                }
            }
        } catch (IOException e) {
            throw new MojoExecutionException("Error while compiling AsciiDoc file", e);
        }

    }
984873
public void execute()
        throws MojoExecutionException, MojoFailureException
    {
        if ( isSkipping() )
        {
            getLog().debug( "Skipping execution, as demanded by user." );
            return;
        }

        final ValidationErrorHandler errorHandler = new ValidationErrorHandler();
        if ( validationSets == null || validationSets.length == 0 )
        {
            throw new MojoFailureException( "No ValidationSets configured." );
        }
        checkCatalogHandling();

        Object oldProxySettings = activateProxy();
        try
        {
            Resolver resolver = getResolver();
            for ( int i = 0; i < validationSets.length; i++ )
            {
                ValidationSet validationSet = validationSets[i];
                resolver.setXincludeAware(validationSet.isValidating() );
                resolver.setValidating( validationSet.isValidating() );
                validate( resolver, validationSet ,errorHandler);
            }
            List<ValidationErrorHandler.ErrorRecord> errorRecords=errorHandler.getErrors();
            if (!errorRecords.isEmpty()){
                final StringBuffer message=new StringBuffer();
                for(ValidationErrorHandler.ErrorRecord error:errorRecords){
                    appendMessage(message,error);
                }
                if (errorHandler.getErrorCount()+errorHandler.getFatalCount()>0){
                    throw new MojoExecutionException( message.toString());
                }
                else{
                    getLog().warn(message.toString());
                }
            }
        }
        finally
        {
            passivateProxy( oldProxySettings );
        }
    }
344643
void createTotalSpecifications(final File dir, final String packageDirectory) throws MojoExecutionException {

        if (dir.equals(null)) {
            throw new MojoExecutionException("Could not read from directory " + dir.getPath());
        }
        final File[] files = dir.listFiles();
        if (files == null) {
            return;
        }
        final File[] providedContextFiles = dir.listFiles((java.io.FileFilter) FileFilterUtils.andFileFilter(FileFilterUtils.fileFileFilter(), FileFilterUtils.nameFileFilter("providedcontext.json")));
        if (providedContextFiles.length == 1) {
            final File parent = providedContextFiles[0].getParentFile();
            final File outputDir = new File(getSpecificationOutput() + File.separator + packageDirectory.substring(0,packageDirectory.lastIndexOf(File.separator)));
            outputDir.mkdirs();
            try {
                generateTotalSpecification(parent, outputDir);
            } catch (final CodeGenException e) {
                throw new MojoExecutionException("Couldn't create total specification",e);
            }
        }
        for (File entry : dir.listFiles()) {
            if (entry.isDirectory()) {
                createTotalSpecifications(entry, (packageDirectory == null) ? entry.getName() : packageDirectory + File.separator + entry.getName());
            }
        }
    }
1275253
public function onDeployCommandCompletedOutputReport()
    {
        $report = new DeployReport($this->eventDataCollector, $this->dataCollectors);
        $report->generate($this->logger);
    }
744917
public void execute() throws MojoExecutionException {
        getLog().debug("starting packaging");
        
        AbstractConfiguration[] configurations= (AbstractConfiguration[]) getPluginContext().get(ConfiguratorMojo.GENERATED_CONFIGURATIONS_KEY);
        
        try {
            for(AbstractConfiguration configuration : configurations) {
                if(!(configuration instanceof NodeConfiguration)) {
                    continue;
                }
                
                String classifier= configuration.className.substring(configuration.className.lastIndexOf('.') + 1);
                File jarFile= checkJarFile(classifier);
                JavaApplicationDescriptor descriptor= getDescriptor();
                descriptor.setNodeConfiguration(configuration.className);
                descriptor.setJarFile(jarFile);
                File jadFile= getJadFile(classifier);
                getDescriptor().writeDescriptor(jadFile);
                getProjectHelper().attachArtifact(getProject(), "jad", classifier, jadFile);
            }
        } catch (IOException ioe) {
            throw new MojoExecutionException("could not create .jad file", ioe);
        } catch (RuntimeException e) {
            throw new MojoExecutionException("could not create .jad file", e);
        }
        getLog().debug("finished packaging");
    }
627624
void process() {
        fixImports();
        if (insertRegion != null) {
            data.ensureImport(BeanDefinition.class);
            if (properties.size() > 0) {
                data.ensureImport(PropertyDefinition.class);
            }
            removeOld();
            if (data.isRootClass() && data.isExtendsDirectBean()) {
                data.ensureImport(DirectBean.class);
            }
            generateMeta();
            generateSerializationVersionId();
            generatePropertyChangeSupportField();
            generateHashCodeField();
            generateFactory();
            generateImmutableBuilderMethod();
            generateArgBasedConstructor();
            generateBuilderBasedConstructor();
            generateMetaBean();
            generateGettersSetters();
            generateSeparator();
            generateImmutableToBuilder();
            generateClone();
            generateEquals();
            generateHashCode();
            generateToString();
            generateMetaClass();
            generateBuilderClass();
            resolveImports();
            resolveIndents();
        }
    }
133259
@Override
	protected void cleanup() throws MojoExecutionException {
		if (verbose) {
			getLog().info("Clean the rox configuration files");
		}
		
		if (roxActive) {
			// Cleanup the rox configuration files
			useCleanPlugin(
				element("filesets", 
					element("fileset",
						element("directory", getWorkingDirectory().getAbsolutePath()),
						element("followSymlinks", "false"),
						element("includes",
							element("include", ROX_PROPERTIES_FILENAME) // Clean ROX configuration file
						)
					)
				)
			);
		}
	}
1067335
private void prepWsdlXsl() throws MojoExecutionException {
        try {
            wsdlXsl = new File(getBaseDir(), wsdlXslFile);
            initOutputDir(wsdlXsl.getParentFile());
            writeWsdlStylesheet(wsdlXsl);
        } catch (Exception e) {
            throw new MojoExecutionException("Failed to write local copy of WSDL stylesheet: " + e, e);
        }
    }
385480
public void run() throws MojoExecutionException {
    try {
      runMojo
          .getAppEngineFactory()
          .devServerRunSync()
          .run(configBuilder.buildRunConfiguration(processServices(), processProjectId()));
    } catch (AppEngineException ex) {
      throw new MojoExecutionException("Failed to run devappserver", ex);
    }
  }
1321779
@Override
    public void execute()
        throws MojoExecutionException, MojoFailureException
    {
        if ( !"pom".equals( project.getPackaging() ) )
        {
            long ts = System.currentTimeMillis();
            try
            {
                internalExecute();
            }
            finally
            {
                long te = System.currentTimeMillis();
                getLog().debug( String.format( "Mojo execution time: %d ms", te - ts ) );
            }
        }
    }
458165
public void execute() throws MojoExecutionException, MojoFailureException {
    if (skip) {
      getLog().info("Skipping format check");
      return;
    }
    if ("pom".equals(packaging)) {
      getLog().info("Skipping format check: project uses 'pom' packaging");
      return;
    }
    if (skipSortingImports) {
      getLog().info("Skipping sorting imports");
    }
    List<File> directoriesToFormat = new ArrayList<File>();
    if (sourceDirectory.exists()) {
      directoriesToFormat.add(sourceDirectory);
    } else {
      handleMissingDirectory("Source", sourceDirectory);
    }
    if (testSourceDirectory.exists()) {
      directoriesToFormat.add(testSourceDirectory);
    } else {
      handleMissingDirectory("Test source", testSourceDirectory);
    }

    for (File additionalSourceDirectory : additionalSourceDirectories) {
      if (additionalSourceDirectory.exists()) {
        directoriesToFormat.add(additionalSourceDirectory);
      } else {
        handleMissingDirectory("Additional source", additionalSourceDirectory);
      }
    }

    Formatter formatter = getFormatter();

    for (File directoryToFormat : directoriesToFormat) {
      formatSourceFilesInDirectory(directoryToFormat, formatter);
    }

    logNumberOfFilesProcessed();
    postExecute(this.filesProcessed, this.nonComplyingFiles);
  }
638390
public void execute() throws MojoExecutionException, MojoFailureException {
        try {
            final List<String> command = createCommand();
            checkWorkingDirectory();
            final int status = execute(command);
            if (failOnAnsibleError && status != 0){
                throw new MojoFailureException("Non-zero exit status returned");
            }
        } catch (IOException e) {
            throw new MojoExecutionException("Unable to run playbook", e);
        } catch (InterruptedException e) {
            throw new MojoExecutionException("Run interrupted", e);
        }
    }
374214
public void execute()
        throws MojoExecutionException, MojoFailureException
    {
        File jarFile = new File( outputDirectory, finalName + ".jar" );
        File origJarFile = new File( outputDirectory, finalName + "-b4gwt.jar" );
        if ( origJarFile.exists() )
        {
            if ( !origJarFile.delete() )
            {
                throw new MojoExecutionException( "Error removing " + origJarFile );
            }
        }
        if ( !jarFile.renameTo( origJarFile ) )
        {
            throw new MojoExecutionException( "Error renaming " + jarFile + " to " + origJarFile );
        }

        MavenArchiver archiver = new MavenArchiver();

        archiver.setArchiver( jarArchiver );
        archiver.setOutputFile( jarFile );
        archive.setForced( false );
        // It is already created by maven-jar-plugin
        archive.setAddMavenDescriptor( false );

        Collection<ResourceFile> files = getAllResourceFiles();
        try
        {

            // Avoid annoying messages in log "com/package/Ccc.java already added, skipping"
            List<String> jarExcludes = new Vector<String>();

            // Add Sources first since they may already be present in jar from previous run and changed.
            for ( ResourceFile file : files )
            {
                jarArchiver.addFile( new File( file.basedir, file.fileRelativeName ), file.fileRelativeName );
                jarExcludes.add( file.fileRelativeName );
            }

            // Add the context of original jar excluding resources that we just added base on GWT descriptors
            jarArchiver.addArchivedFileSet( origJarFile, null, jarExcludes.toArray( new String[jarExcludes.size()] ) );

            archiver.createArchive( session , getProject(), archive );
        }
        catch ( Exception e )
        {
            throw new MojoExecutionException( "Error assembling JAR", e );
        }

    }
1213995
public void execute()
        throws MojoExecutionException, MojoFailureException
    {
        try
        {
            for ( String name : getModules() )
            {
                File output = new File( getOutputDirectory(), readModule( name ).getPath() );
                clean( output );
            }
            clean( new File( getOutputDirectory(), ".gwt-tmp" ) );
        }
        catch ( GwtModuleReaderException e )
        {
            throw new MojoExecutionException( e.getMessage(), e );
        }
    }