Minor cleanup

This commit is contained in:
Erik C. Thauvin 2023-11-27 10:14:53 -08:00
parent 609b34784e
commit f73526bc20
4 changed files with 44 additions and 19 deletions

View file

@ -6,6 +6,7 @@
</CLASSES> </CLASSES>
<JAVADOC /> <JAVADOC />
<SOURCES> <SOURCES>
<root url="file://$PROJECT_DIR$/lib/bld" />
<root url="jar://$USER_HOME$/.bld/dist/bld-1.7.5-sources.jar!/" /> <root url="jar://$USER_HOME$/.bld/dist/bld-1.7.5-sources.jar!/" />
</SOURCES> </SOURCES>
<excluded> <excluded>

View file

@ -1,6 +1,6 @@
bld.downloadExtensionJavadoc=false bld.downloadExtensionJavadoc=false
bld.downloadExtensionSources=true 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.extension-jacoco=com.uwyn.rife2:bld-jacoco-report:0.9.1
bld.repositories=MAVEN_LOCAL,MAVEN_CENTRAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES bld.repositories=MAVEN_LOCAL,MAVEN_CENTRAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES
bld.downloadLocation= bld.downloadLocation=

View file

@ -35,7 +35,7 @@ public class ExecOperationBuild extends Project {
public ExecOperationBuild() { public ExecOperationBuild() {
pkg = "rife.bld.extension"; pkg = "rife.bld.extension";
name = "ExecOperation"; name = "ExecOperation";
version = version(0, 9, 0); version = version(0, 9, 1, "SNAPSHOT");
javaRelease = 17; javaRelease = 17;
downloadSources = true; downloadSources = true;
@ -45,13 +45,13 @@ public class ExecOperationBuild extends Project {
scope(compile) scope(compile)
.include(dependency("com.uwyn.rife2", "bld", version(1, 7, 5))); .include(dependency("com.uwyn.rife2", "bld", version(1, 7, 5)));
scope(test) scope(test)
.include(dependency("org.jsoup", "jsoup", version(1, 16, 2))) .include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 10, 1)))
.include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 10, 0))) .include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 10, 1)))
.include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 10, 0)))
.include(dependency("org.assertj", "assertj-core", version(3, 24, 2))); .include(dependency("org.assertj", "assertj-core", version(3, 24, 2)));
javadocOperation() javadocOperation()
.javadocOptions() .javadocOptions()
.author()
.docLint(NO_MISSING) .docLint(NO_MISSING)
.link("https://rife2.github.io/bld/") .link("https://rife2.github.io/bld/")
.link("https://rife2.github.io/rife2/"); .link("https://rife2.github.io/rife2/");
@ -61,15 +61,26 @@ public class ExecOperationBuild extends Project {
.info() .info()
.groupId("com.uwyn.rife2") .groupId("com.uwyn.rife2")
.artifactId("bld-exec") .artifactId("bld-exec")
.description("Command Line Execution Extension for bld ") .description("Command Line Execution Extension for bld")
.url("https://github.com/rife2/bld-exec") .url("https://github.com/rife2/bld-exec")
.developer(new PublishDeveloper().id("ethauvin").name("Erik C. Thauvin").email("erik@thauvin.net") .developer(
.url("https://erik.thauvin.net/")) new PublishDeveloper()
.license(new PublishLicense().name("The Apache License, Version 2.0") .id("ethauvin")
.url("http://www.apache.org/licenses/LICENSE-2.0.txt")) .name("Erik C. Thauvin")
.scm(new PublishScm().connection("scm:git:https://github.com/rife2/bld-exec.git") .email("erik@thauvin.net")
.developerConnection("scm:git:git@github.com:rife2/bld-exec.git") .url("https://erik.thauvin.net/")
.url("https://github.com/rife2/bld-exec")) )
.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")) .signKey(property("sign.key"))
.signPassphrase(property("sign.passphrase")); .signPassphrase(property("sign.passphrase"));
} }

View file

@ -44,11 +44,13 @@ public class ExecOperation extends AbstractOperation<ExecOperation> {
* Configures the command and arguments to be executed. * Configures the command and arguments to be executed.
* <p> * <p>
* For example: * For example:
* <p><ul> * <ul>
* <li>{@code command("cmd", "/c", "stop.bat")}</li> * <li>{@code command("cmd", "/c", "stop.bat")}</li>
* <li>{@code command("./stop.sh"}</li> * <li>{@code command("./stop.sh"}</li>
* </ul></p> * </ul>
* *
* @param arg one or more arguments
* @return this operation instance
* @see #command(Collection) * @see #command(Collection)
*/ */
public ExecOperation command(String... arg) { public ExecOperation command(String... arg) {
@ -59,6 +61,8 @@ public class ExecOperation extends AbstractOperation<ExecOperation> {
/** /**
* Configures the command and arguments to be executed. * Configures the command and arguments to be executed.
* *
* @param args the list of arguments
* @return this operation instance
* @see #command(String...) * @see #command(String...)
*/ */
public ExecOperation command(Collection<String> args) { public ExecOperation command(Collection<String> args) {
@ -74,6 +78,7 @@ public class ExecOperation extends AbstractOperation<ExecOperation> {
if (project_ == null) { if (project_ == null) {
LOGGER.severe("A project must be specified."); LOGGER.severe("A project must be specified.");
} }
var errorMessage = new StringBuilder(27); var errorMessage = new StringBuilder(27);
final File workDir; final File workDir;
@ -134,6 +139,8 @@ public class ExecOperation extends AbstractOperation<ExecOperation> {
/** /**
* Configure the failure mode. * Configure the failure mode.
* *
* @param fail one or more failure modes
* @return this operation instance
* @see ExecFail * @see ExecFail
*/ */
public ExecOperation fail(ExecFail... fail) { public ExecOperation fail(ExecFail... fail) {
@ -143,6 +150,9 @@ public class ExecOperation extends AbstractOperation<ExecOperation> {
/** /**
* Configures an Exec operation from a {@link BaseProject}. * Configures an Exec operation from a {@link BaseProject}.
*
* @param project the project
* @return this operation instance
*/ */
public ExecOperation fromProject(BaseProject project) { public ExecOperation fromProject(BaseProject project) {
project_ = project; project_ = project;
@ -161,6 +171,9 @@ public class ExecOperation extends AbstractOperation<ExecOperation> {
/** /**
* Configures the working directory. * Configures the working directory.
*
* @param dir the directory path
* @return this operation instance
*/ */
public ExecOperation workDir(String dir) { public ExecOperation workDir(String dir) {
workDir_ = dir; workDir_ = dir;