Minor cleanup
This commit is contained in:
parent
609b34784e
commit
f73526bc20
4 changed files with 44 additions and 19 deletions
1
.idea/libraries/bld.xml
generated
1
.idea/libraries/bld.xml
generated
|
@ -6,6 +6,7 @@
|
|||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="file://$PROJECT_DIR$/lib/bld" />
|
||||
<root url="jar://$USER_HOME$/.bld/dist/bld-1.7.5-sources.jar!/" />
|
||||
</SOURCES>
|
||||
<excluded>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
bld.downloadExtensionJavadoc=false
|
||||
bld.downloadExtensionSources=true
|
||||
bld.extension-pmd=com.uwyn.rife2:bld-pmd:0.9.3
|
||||
bld.extension-pmd=com.uwyn.rife2:bld-pmd:0.9.4
|
||||
bld.extension-jacoco=com.uwyn.rife2:bld-jacoco-report:0.9.1
|
||||
bld.repositories=MAVEN_LOCAL,MAVEN_CENTRAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES
|
||||
bld.downloadLocation=
|
||||
|
|
|
@ -35,7 +35,7 @@ public class ExecOperationBuild extends Project {
|
|||
public ExecOperationBuild() {
|
||||
pkg = "rife.bld.extension";
|
||||
name = "ExecOperation";
|
||||
version = version(0, 9, 0);
|
||||
version = version(0, 9, 1, "SNAPSHOT");
|
||||
|
||||
javaRelease = 17;
|
||||
downloadSources = true;
|
||||
|
@ -45,13 +45,13 @@ public class ExecOperationBuild extends Project {
|
|||
scope(compile)
|
||||
.include(dependency("com.uwyn.rife2", "bld", version(1, 7, 5)));
|
||||
scope(test)
|
||||
.include(dependency("org.jsoup", "jsoup", version(1, 16, 2)))
|
||||
.include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 10, 0)))
|
||||
.include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 10, 0)))
|
||||
.include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 10, 1)))
|
||||
.include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 10, 1)))
|
||||
.include(dependency("org.assertj", "assertj-core", version(3, 24, 2)));
|
||||
|
||||
javadocOperation()
|
||||
.javadocOptions()
|
||||
.author()
|
||||
.docLint(NO_MISSING)
|
||||
.link("https://rife2.github.io/bld/")
|
||||
.link("https://rife2.github.io/rife2/");
|
||||
|
@ -61,15 +61,26 @@ public class ExecOperationBuild extends Project {
|
|||
.info()
|
||||
.groupId("com.uwyn.rife2")
|
||||
.artifactId("bld-exec")
|
||||
.description("Command Line Execution Extension for bld ")
|
||||
.description("Command Line Execution Extension for bld")
|
||||
.url("https://github.com/rife2/bld-exec")
|
||||
.developer(new PublishDeveloper().id("ethauvin").name("Erik C. Thauvin").email("erik@thauvin.net")
|
||||
.url("https://erik.thauvin.net/"))
|
||||
.license(new PublishLicense().name("The Apache License, Version 2.0")
|
||||
.url("http://www.apache.org/licenses/LICENSE-2.0.txt"))
|
||||
.scm(new PublishScm().connection("scm:git:https://github.com/rife2/bld-exec.git")
|
||||
.developerConnection("scm:git:git@github.com:rife2/bld-exec.git")
|
||||
.url("https://github.com/rife2/bld-exec"))
|
||||
.developer(
|
||||
new PublishDeveloper()
|
||||
.id("ethauvin")
|
||||
.name("Erik C. Thauvin")
|
||||
.email("erik@thauvin.net")
|
||||
.url("https://erik.thauvin.net/")
|
||||
)
|
||||
.license(
|
||||
new PublishLicense()
|
||||
.name("The Apache License, Version 2.0")
|
||||
.url("http://www.apache.org/licenses/LICENSE-2.0.txt")
|
||||
)
|
||||
.scm(
|
||||
new PublishScm()
|
||||
.connection("scm:git:https://github.com/rife2/bld-exec.git")
|
||||
.developerConnection("scm:git:git@github.com:rife2/bld-exec.git")
|
||||
.url("https://github.com/rife2/bld-exec")
|
||||
)
|
||||
.signKey(property("sign.key"))
|
||||
.signPassphrase(property("sign.passphrase"));
|
||||
}
|
||||
|
|
|
@ -44,12 +44,14 @@ public class ExecOperation extends AbstractOperation<ExecOperation> {
|
|||
* Configures the command and arguments to be executed.
|
||||
* <p>
|
||||
* For example:
|
||||
* <p><ul>
|
||||
* <li>{@code command("cmd", "/c", "stop.bat")}</li>
|
||||
* <li>{@code command("./stop.sh"}</li>
|
||||
* </ul></p>
|
||||
*
|
||||
* @see #command(Collection)
|
||||
* <ul>
|
||||
* <li>{@code command("cmd", "/c", "stop.bat")}</li>
|
||||
* <li>{@code command("./stop.sh"}</li>
|
||||
* </ul>
|
||||
*
|
||||
* @param arg one or more arguments
|
||||
* @return this operation instance
|
||||
* @see #command(Collection)
|
||||
*/
|
||||
public ExecOperation command(String... arg) {
|
||||
args_.addAll(List.of(arg));
|
||||
|
@ -59,6 +61,8 @@ public class ExecOperation extends AbstractOperation<ExecOperation> {
|
|||
/**
|
||||
* Configures the command and arguments to be executed.
|
||||
*
|
||||
* @param args the list of arguments
|
||||
* @return this operation instance
|
||||
* @see #command(String...)
|
||||
*/
|
||||
public ExecOperation command(Collection<String> args) {
|
||||
|
@ -74,6 +78,7 @@ public class ExecOperation extends AbstractOperation<ExecOperation> {
|
|||
if (project_ == null) {
|
||||
LOGGER.severe("A project must be specified.");
|
||||
}
|
||||
|
||||
var errorMessage = new StringBuilder(27);
|
||||
|
||||
final File workDir;
|
||||
|
@ -134,6 +139,8 @@ public class ExecOperation extends AbstractOperation<ExecOperation> {
|
|||
/**
|
||||
* Configure the failure mode.
|
||||
*
|
||||
* @param fail one or more failure modes
|
||||
* @return this operation instance
|
||||
* @see ExecFail
|
||||
*/
|
||||
public ExecOperation fail(ExecFail... fail) {
|
||||
|
@ -143,6 +150,9 @@ public class ExecOperation extends AbstractOperation<ExecOperation> {
|
|||
|
||||
/**
|
||||
* Configures an Exec operation from a {@link BaseProject}.
|
||||
*
|
||||
* @param project the project
|
||||
* @return this operation instance
|
||||
*/
|
||||
public ExecOperation fromProject(BaseProject project) {
|
||||
project_ = project;
|
||||
|
@ -161,6 +171,9 @@ public class ExecOperation extends AbstractOperation<ExecOperation> {
|
|||
|
||||
/**
|
||||
* Configures the working directory.
|
||||
*
|
||||
* @param dir the directory path
|
||||
* @return this operation instance
|
||||
*/
|
||||
public ExecOperation workDir(String dir) {
|
||||
workDir_ = dir;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue