当前位置: 首页>>代码示例>>Java>>正文


Java VerboseProcess类代码示例

本文整理汇总了Java中com.jcabi.log.VerboseProcess的典型用法代码示例。如果您正苦于以下问题:Java VerboseProcess类的具体用法?Java VerboseProcess怎么用?Java VerboseProcess使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


VerboseProcess类属于com.jcabi.log包,在下文中一共展示了VerboseProcess类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: TkRefresh

import com.jcabi.log.VerboseProcess; //导入依赖的package包/类
/**
 * Ctor.
 * @param path Path
 * @throws IOException If fails
 */
public TkRefresh(final File path) throws IOException {
    this.take =  new TkFork(
        new FkHitRefresh(
            path,
            () -> new VerboseProcess(
                new ProcessBuilder(
                    "mvn",
                    "generate-resources"
                )
            ).stdout(),
            new TkFiles("./target/classes")
        ),
        new FkFixed(new TkClasspath())
    );
}
 
开发者ID:yegor256,项目名称:rehttp,代码行数:21,代码来源:TkRefresh.java

示例2: refresh

import com.jcabi.log.VerboseProcess; //导入依赖的package包/类
/**
 * Ctor.
 * @param path Path of files
 * @return Take
 * @throws IOException If fails
 */
private static Take refresh(final String path) throws IOException {
    return new TkFork(
        new FkHitRefresh(
            new File(path),
            () -> new VerboseProcess(
                new ProcessBuilder(
                    "mvn",
                    "generate-resources"
                )
            ).stdout(),
            new TkFiles("./target/classes")
        ),
        new FkFixed(new TkClasspath())
    );
}
 
开发者ID:yegor256,项目名称:threecopies,代码行数:22,代码来源:TkApp.java

示例3: TkRefresh

import com.jcabi.log.VerboseProcess; //导入依赖的package包/类
/**
 * Ctor.
 * @param path Path of files
 * @throws IOException If fails
 */
TkRefresh(final String path) throws IOException {
    super(
        new TkFork(
            new FkHitRefresh(
                new File(path),
                () -> new VerboseProcess(
                    new ProcessBuilder(
                        "mvn",
                        "generate-resources"
                    )
                ).stdout(),
                new TkFiles("./target/classes")
            ),
            new FkFixed(new TkClasspath())
        )
    );
}
 
开发者ID:yegor256,项目名称:jare,代码行数:23,代码来源:TkRefresh.java

示例4: refresh

import com.jcabi.log.VerboseProcess; //导入依赖的package包/类
/**
 * Hit refresh fork.
 * @param path Path of files
 * @return Fork
 * @throws IOException If fails
 */
private static Take refresh(final String path) throws IOException {
    return new TkFork(
        new FkHitRefresh(
            new File(path),
            () -> new VerboseProcess(
                new ProcessBuilder(
                    "mvn",
                    "generate-resources"
                )
            ).stdout(),
            new TkFiles("./target/classes")
        ),
        new FkFixed(new TkClasspath())
    );
}
 
开发者ID:yegor256,项目名称:wring,代码行数:22,代码来源:TkApp.java

示例5: refresh

import com.jcabi.log.VerboseProcess; //导入依赖的package包/类
/**
 * Hit refresh fork.
 * @param path Path of files
 * @return Fork
 * @throws IOException If fails
 */
@SuppressWarnings("PMD.DoNotUseThreads")
private static Take refresh(final String path) throws IOException {
    return new TkFork(
        new FkHitRefresh(
            new File(path),
            new Runnable() {
                @Override
                public void run() {
                    new VerboseProcess(
                        new ProcessBuilder(
                            "mvn",
                            "generate-resources"
                        )
                    ).stdout();
                }
            },
            new TkFiles("./target/classes")
        ),
        new FkFixed(new TkClasspath())
    );
}
 
开发者ID:yegor256,项目名称:thindeck,代码行数:28,代码来源:TkApp.java

示例6: findbugs

import com.jcabi.log.VerboseProcess; //导入依赖的package包/类
/**
 * Start findbugs and return its output.
 * @param env Environment
 * @return Output of findbugs
 */
private String findbugs(final Environment env) {
    final List<String> args = new LinkedList<>();
    args.add("java");
    args.addAll(this.options());
    args.add(Wrap.class.getName());
    args.add(env.basedir().getPath());
    args.add(env.outdir().getPath());
    // @checkstyle MultipleStringLiteralsCheck (2 lines)
    args.add(
        StringUtils.join(env.classpath(), ",").replace("\\", "/")
    );
    final Iterable<String> excludes = env.excludes("findbugs");
    args.add(this.jar(FBContrib.class).toString());
    if (excludes.iterator().hasNext()) {
        args.add(FindBugsValidator.excludes(env, excludes));
    }
    return new VerboseProcess(
        new ProcessBuilder(args), Level.INFO, Level.INFO
    ).stdout();
}
 
开发者ID:teamed,项目名称:qulice,代码行数:26,代码来源:FindBugsValidator.java

示例7: assumeXsltproc

import com.jcabi.log.VerboseProcess; //导入依赖的package包/类
/**
 * Assume that it is installed.
 */
private static void assumeXsltproc() {
    String ver;
    try {
        ver = new VerboseProcess(
            new ProcessBuilder()
                .command(CompilerTest.BIN, "-version")
                .redirectErrorStream(true)
        ).stdoutQuietly();
    } catch (final IllegalStateException ex) {
        ver = "";
    }
    Assume.assumeThat(
        ver,
        Matchers.containsString("libxml")
    );
}
 
开发者ID:yegor256,项目名称:requs,代码行数:20,代码来源:CompilerTest.java

示例8: data

import com.jcabi.log.VerboseProcess; //导入依赖的package包/类
/**
 * Prepare and return data directory.
 * @param dist Path to MySQL distribution
 * @param target Where to create it
 * @return Directory created
 * @throws IOException If fails
 */
private File data(final File dist, final File target) throws IOException {
    final File dir = new File(target, Instances.DATA_SUB_DIR);
    if (!dir.exists()) {
        final File cnf = new File(
            new File(dist, "share"),
            "my-default.cnf"
        );
        FileUtils.writeStringToFile(
            cnf,
            "[mysql]\n# no defaults..."
        );
        new VerboseProcess(
            this.builder(
                dist,
                "scripts/mysql_install_db",
                String.format("--defaults-file=%s", cnf),
                "--force",
                "--innodb_use_native_aio=0",
                String.format("--datadir=%s", dir),
                String.format("--basedir=%s", dist)
            )
        ).stdout();
    }
    return dir;
}
 
开发者ID:jcabi,项目名称:jcabi-mysql-maven-plugin,代码行数:33,代码来源:Instances.java

示例9: chmod

import com.jcabi.log.VerboseProcess; //导入依赖的package包/类
/**
 * Change file permissions.
 * @param file The file to change
 * @param mode Permissions to set
 * @throws IOException If some error inside
 * @see http://stackoverflow.com/questions/664432
 * @see http://stackoverflow.com/questions/1556119
 */
private void chmod(final File file, final int mode) throws IOException {
    new VerboseProcess(
        new ProcessBuilder(
            "chmod",
            String.format("%04o", mode),
            file.getAbsolutePath()
        )
    ).stdout();
    Logger.debug(
        this,
        "chmod(%s, %3o): succeeded",
        file,
        mode
    );
}
 
开发者ID:jcabi,项目名称:jcabi-heroku-maven-plugin,代码行数:24,代码来源:Git.java

示例10: imprt

import com.jcabi.log.VerboseProcess; //导入依赖的package包/类
/**
 * Import certificate into this store.
 * @param file The file to import
 * @param pwd The password there
 * @throws IOException If fails
 */
@Loggable(Loggable.DEBUG)
public void imprt(final File file, final String pwd) throws IOException {
    new VerboseProcess(
        this.proc(
            "-importkeystore",
            "-srckeystore",
            file.getAbsolutePath(),
            "-srcstorepass",
            pwd,
            "-destkeystore",
            this.keystore,
            "-deststorepass",
            this.password
        )
    ).stdout();
}
 
开发者ID:jcabi,项目名称:jcabi-ssl-maven-plugin,代码行数:23,代码来源:Keytool.java

示例11: login

import com.jcabi.log.VerboseProcess; //导入依赖的package包/类
/**
 * Get user name to login.
 * @return User name
 */
@SuppressWarnings("PMD.ProhibitPublicStaticMethods")
public static String login() {
    return new VerboseProcess(
        new ProcessBuilder().command("id", "-n", "-u")
    ).stdout().trim();
}
 
开发者ID:jcabi,项目名称:jcabi-ssh,代码行数:11,代码来源:Sshd.java

示例12: host

import com.jcabi.log.VerboseProcess; //导入依赖的package包/类
/**
 * Get host of SSH.
 * @return Hostname
 * @since 1.1
 */
@SuppressWarnings("PMD.ProhibitPublicStaticMethods")
public static String host() {
    return new VerboseProcess(
        new ProcessBuilder().command("hostname")
    ).stdout().trim();
}
 
开发者ID:jcabi,项目名称:jcabi-ssh,代码行数:12,代码来源:Sshd.java

示例13: isInstalled

import com.jcabi.log.VerboseProcess; //导入依赖的package包/类
/**
 * PhantomJS binary is installed?
 * @return TRUE if installed
 * @since 0.2
 */
public static boolean isInstalled() {
    String stdout;
    try {
        stdout = new VerboseProcess(
            new ProcessBuilder(Phandom.BIN, "--version"),
            Level.FINE, Level.FINE
        ).stdoutQuietly().trim();
    } catch (final IllegalStateException ex) {
        stdout = ex.getLocalizedMessage();
    }
    return Phandom.VERSION.matcher(stdout).matches();
}
 
开发者ID:yegor256,项目名称:phandom,代码行数:18,代码来源:Phandom.java

示例14: dom

import com.jcabi.log.VerboseProcess; //导入依赖的package包/类
/**
 * Get DOM.
 * @return DOM
 * @throws IOException If fails
 */
public Document dom() throws IOException {
    final Process process = this.builder().start();
    process.getOutputStream().close();
    return Phandom.parse(
        new VerboseProcess(process, Level.FINE, Level.FINE).stdout()
    );
}
 
开发者ID:yegor256,项目名称:phandom,代码行数:13,代码来源:Phandom.java

示例15: exec

import com.jcabi.log.VerboseProcess; //导入依赖的package包/类
/**
 * Execute git with these arguments.
 * @param dir In which directory to run it
 * @param args Arguments to pass to it
 * @return Stdout
 * @checkstyle MagicNumber (2 lines)
 */
@RetryOnFailure(delay = 3000, attempts = 2)
public String exec(@NotNull final File dir, @NotNull final String... args) {
    final List<String> commands = new ArrayList<String>(args.length + 1);
    commands.add("git");
    for (final String arg : args) {
        commands.add(arg);
    }
    Logger.info(this, "%s:...", StringUtils.join(commands, " "));
    final ProcessBuilder builder = new ProcessBuilder(commands);
    builder.directory(dir);
    builder.environment().put("GIT_SSH", this.script);
    return new VerboseProcess(builder).stdout();
}
 
开发者ID:jcabi,项目名称:jcabi-heroku-maven-plugin,代码行数:21,代码来源:Git.java


注:本文中的com.jcabi.log.VerboseProcess类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。