Process Warden - Finalized Process

A wrapper for Process/ProcessBuilder that helps to avoid some of the pitfalls of using them directly.

Лицензия

Лицензия

Группа

Группа

com.leacox.process
Идентификатор

Идентификатор

process-warden
Последняя версия

Последняя версия

1.1.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

Process Warden - Finalized Process
A wrapper for Process/ProcessBuilder that helps to avoid some of the pitfalls of using them directly.
Ссылка на сайт

Ссылка на сайт

https://github.com/johnlcox/process-warden
Система контроля версий

Система контроля версий

https://github.com/johnlcox/process-warden

Скачать process-warden

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/com.leacox.process/process-warden/ -->
<dependency>
    <groupId>com.leacox.process</groupId>
    <artifactId>process-warden</artifactId>
    <version>1.1.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.leacox.process/process-warden/
implementation 'com.leacox.process:process-warden:1.1.0'
// https://jarcasting.com/artifacts/com.leacox.process/process-warden/
implementation ("com.leacox.process:process-warden:1.1.0")
'com.leacox.process:process-warden:jar:1.1.0'
<dependency org="com.leacox.process" name="process-warden" rev="1.1.0">
  <artifact name="process-warden" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.leacox.process', module='process-warden', version='1.1.0')
)
libraryDependencies += "com.leacox.process" % "process-warden" % "1.1.0"
[com.leacox.process/process-warden "1.1.0"]

Зависимости

compile (1)

Идентификатор библиотеки Тип Версия
org.slf4j : slf4j-api jar 1.7.5

test (4)

Идентификатор библиотеки Тип Версия
junit : junit jar 4.11
org.mockito : mockito-all jar 1.9.5
org.powermock : powermock-module-junit4 jar 1.5
org.powermock : powermock-api-mockito jar 1.5

Модули Проекта

Данный проект не имеет модулей.

process-warden

Build Status

process-warden provides a safer wrapper around the built in Java Process and ProcessBuilder classes for executing native subprocesses.

Usage

With Java 6:

FinalizedProcessBuilder pb = new FinalizedProcessBuilder("myCommand", "myArg");
FinalizedProcess process = pb.start();
try {
  int returnVal = process.waitFor(5000);
} finally {
  process.close();
}

With Java 7 and try-with-resources:

FinalizedProcessBuilder pb = new FinalizedProcessBuilder("myCommand", "myArg");
try (FinalizedProcess process = pb.start()) {
  int returnVal = process.waitFor(5000);
}

Now With Stream Gobbling. The StreamGobbler will gobble up the input stream, error stream, or both in a separate thread to prevent from blocking your thread.

FinalizedProcessBuilder pb = new FinalizedProcessBuilder("myCommand", "myArg");
pb.gobbleStreams(true);
try (FinalizedProcess process = pb.start()) {
  int returnVal = process.waitFor(5000);
}

Installation

Add it as a maven dependency:

<dependency>
  <groupId>com.leacox.process</groupId>
  <artifactId>process-warden</artifactId>
  <version>1.1.0</version>
</dependency>

License

Copyright 2013 John Leacox

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Версии библиотеки

Версия
1.1.0
1.0.0