/** * Releases the current factory and re-installs the original factory. */ public static final void release() { Log log = LOGS.get(LOGS.size() - 1); StaticLoggerBinder.getSingleton().setMavenLog(log); }
@Override public void execute() throws MojoExecutionException, MojoFailureException { StaticLoggerBinder.getSingleton().setMavenLog(this.getLog()); }
/** * Initializes the {@link LogFactory} to use the {@link MavenLogAdapter}. The * specified {@link org.apache.maven.plugin.logging.Log} instance is used when * later initializing the individual log instances. * * @param log The {@link org.apache.maven.plugin.logging.Log} instance to use. */ public static final void initialize(Log log) { LOGS.add(StaticLoggerBinder.getSingleton().getMavenLog()); StaticLoggerBinder.getSingleton().setMavenLog(log); }
@Override public void execute() throws MojoExecutionException { StaticLoggerBinder.getSingleton().setMavenLog(this.getLog()); if (this.skip) { Logger.info(this, "Execution skipped"); return; } final long start = System.currentTimeMillis(); final Model model = this.model(); if (this.xmi.getParentFile().mkdirs()) { Logger.info(this, "Directory %s created", this.xmi.getParentFile()); } try { final OutputStream output = new FileOutputStream(this.xmi); try { model.save(output); Logger.info( this, "XMI generated and saved to %s in %[ms]s", this.xmi, System.currentTimeMillis() - start ); } finally { output.close(); } } catch (final IOException ex) { throw new MojoExecutionException("IO failure saving the model", ex); } }
@Override public void execute() throws MojoFailureException { StaticLoggerBinder.getSingleton().setMavenLog(this.getLog()); if (this.targetDirectory.mkdirs()) { Logger.info(this, "Directory created: %s", this.targetDirectory); } try { Files.walk(this.sourceDirectory.toPath()) .filter(file -> !file.toFile().isDirectory()) .forEach(this::compile); } catch (final IOException ex) { throw new MojoFailureException( new UncheckedText( new FormattedText( "Can't list EO files in %s", this.sourceDirectory ) ).asString(), ex ); } this.project.addCompileSourceRoot( this.targetDirectory.getAbsolutePath() ); Logger.info( this, "Directory added to sources: %s", this.targetDirectory ); }
@Override public void execute() throws MojoFailureException { StaticLoggerBinder.getSingleton().setMavenLog(this.getLog()); if (this.skip) { Logger.info(this, "execution skipped because of 'skip' option"); return; } this.environment(); this.run(AbstractDynamoMojo.INSTANCES); }
@Override public final void execute() throws MojoFailureException { StaticLoggerBinder.getSingleton().setMavenLog(this.getLog()); if (this.skip) { this.getLog().info("Execution skipped"); return; } this.environment.setProperty("license", this.license); this.environment.setProject(this.project); this.environment.setMojoExecutor( new MojoExecutor(this.manager, this.sess) ); this.environment.setExcludes(this.excludes); this.environment.setAsser(this.asserts); final long start = System.nanoTime(); this.doExecute(); Logger.info( this, "Qulice quality check completed in %[nano]s", System.nanoTime() - start ); }
public void execute () throws MojoExecutionException, MojoFailureException StaticLoggerBinder.getSingleton ().setMavenLog (getLog ()); if (m_aSchematronDirectory == null) throw new MojoExecutionException ("No Schematron directory specified!");
@Override public void execute() throws MojoFailureException { StaticLoggerBinder.getSingleton().setMavenLog(this.getLog()); if (this.skip) { Logger.info(this, "execution skipped because of 'skip' option"); return; } this.run(AbstractMysqlMojo.instances()); if (this.project == null) { Logger.warn( this, "MavenProject not initialized, unable to set property %s", AbstractMysqlMojo.PROPERTY_REUSED ); } else { Logger.info( this, "set Maven property %s = %s ", AbstractMysqlMojo.PROPERTY_REUSED, AbstractMysqlMojo.instances().reusedExistingDatabase() ); this.project.getProperties().setProperty( AbstractMysqlMojo.PROPERTY_REUSED, Boolean.toString( AbstractMysqlMojo.instances().reusedExistingDatabase() ) ); } }
public void execute () throws MojoExecutionException, MojoFailureException StaticLoggerBinder.getSingleton ().setMavenLog (getLog ()); if (m_aSchematronFile == null) throw new MojoExecutionException ("No Schematron file specified!");