Compare commits

..

No commits in common. "8b80ca1bc0291863c34129f4a8f4c3580d8ddd31" and "013c6a0de6add8c0710177d513eeae2c82e87eac" have entirely different histories.

7 changed files with 18 additions and 32 deletions

View file

@ -12,12 +12,12 @@ jobs:
steps: steps:
- name: Checkout source repository - name: Checkout source repository
uses: actions/checkout@v4 uses: actions/checkout@v3
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Set up JDK ${{ matrix.java-version }} - name: Set up JDK ${{ matrix.java-version }}
uses: actions/setup-java@v4 uses: actions/setup-java@v3
with: with:
distribution: "zulu" distribution: "zulu"
java-version: ${{ matrix.java-version }} java-version: ${{ matrix.java-version }}

View file

@ -30,14 +30,14 @@ jobs:
steps: steps:
- name: Checkout source repository - name: Checkout source repository
uses: actions/checkout@v4 uses: actions/checkout@v3
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Set up JDK 17 - name: Set up JDK 17
uses: actions/setup-java@v4 uses: actions/setup-java@v3
with: with:
distribution: "zulu" distribution: 'zulu'
java-version: 17 java-version: 17
- name: Build Javadocs - name: Build Javadocs
@ -50,8 +50,8 @@ jobs:
uses: actions/upload-pages-artifact@v1 uses: actions/upload-pages-artifact@v1
with: with:
# Upload generated Javadocs repository # Upload generated Javadocs repository
path: "build/javadoc/" path: 'build/javadoc/'
- name: Deploy to GitHub Pages - name: Deploy to GitHub Pages
id: deployment id: deployment
uses: actions/deploy-pages@v1 uses: actions/deploy-pages@v1

View file

@ -19,13 +19,12 @@
</properties> </properties>
</rule> </rule>
<!-- CODE STYLE --> <!-- CODE STYLE -->
<rule ref="category/java/codestyle.xml"> <rule ref="category/java/codestyle.xml">
<exclude name="AtLeastOneConstructor"/> <exclude name="AtLeastOneConstructor"/>
<exclude name="ClassNamingConventions"/> <exclude name="ClassNamingConventions"/>
<exclude name="CommentDefaultAccessModifier"/>
<exclude name="ConfusingTernary"/> <exclude name="ConfusingTernary"/>
<exclude name="CommentDefaultAccessModifier"/>
<exclude name="FieldNamingConventions"/> <exclude name="FieldNamingConventions"/>
<exclude name="LocalVariableCouldBeFinal"/> <exclude name="LocalVariableCouldBeFinal"/>
<exclude name="LongVariable"/> <exclude name="LongVariable"/>
@ -35,9 +34,8 @@
<exclude name="ShortClassName"/> <exclude name="ShortClassName"/>
<exclude name="ShortMethodName"/> <exclude name="ShortMethodName"/>
<exclude name="ShortVariable"/> <exclude name="ShortVariable"/>
<exclude name="UseExplicitTypes"/>
<exclude name="UseUnderscoresInNumericLiterals"/>
<exclude name="UselessParentheses"/> <exclude name="UselessParentheses"/>
<exclude name="UseUnderscoresInNumericLiterals"/>
</rule> </rule>
<rule ref="category/java/codestyle.xml/UnnecessaryImport"> <rule ref="category/java/codestyle.xml/UnnecessaryImport">
@ -53,6 +51,8 @@
<exclude name="AvoidUncheckedExceptionsInSignatures"/> <exclude name="AvoidUncheckedExceptionsInSignatures"/>
<exclude name="CognitiveComplexity"/> <exclude name="CognitiveComplexity"/>
<exclude name="CyclomaticComplexity"/> <exclude name="CyclomaticComplexity"/>
<exclude name="ExcessiveClassLength"/>
<exclude name="ExcessiveMethodLength"/>
<exclude name="ExcessiveParameterList"/> <exclude name="ExcessiveParameterList"/>
<exclude name="ExcessivePublicCount"/> <exclude name="ExcessivePublicCount"/>
<exclude name="GodClass"/> <exclude name="GodClass"/>
@ -106,4 +106,4 @@
<!-- SECURITY --> <!-- SECURITY -->
<rule ref="category/java/security.xml"> <rule ref="category/java/security.xml">
</rule> </rule>
</ruleset> </ruleset>

View file

@ -1,7 +1,7 @@
bld.downloadExtensionJavadoc=false bld.downloadExtensionJavadoc=false
bld.downloadExtensionSources=true bld.downloadExtensionSources=true
bld.extension-pmd=com.uwyn.rife2:bld-pmd:0.9.8 bld.extension-pmd=com.uwyn.rife2:bld-pmd:0.9.7
bld.extension-jacoco=com.uwyn.rife2:bld-jacoco-report:0.9.5 bld.extension-jacoco=com.uwyn.rife2:bld-jacoco-report:0.9.3
bld.repositories=MAVEN_CENTRAL,MAVEN_LOCAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES bld.repositories=MAVEN_CENTRAL,MAVEN_LOCAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES
bld.downloadLocation= bld.downloadLocation=
bld.sourceDirectories= bld.sourceDirectories=

View file

@ -35,14 +35,13 @@ 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, 3); version = version(0, 9, 2);
javaRelease = 17; javaRelease = 17;
downloadSources = true; downloadSources = true;
autoDownloadPurge = true; autoDownloadPurge = true;
repositories = List.of(MAVEN_CENTRAL, RIFE2_RELEASES); repositories = List.of(MAVEN_CENTRAL, RIFE2_RELEASES);
scope(compile) scope(compile)
.include(dependency("com.uwyn.rife2", "bld", version(1, 9, 0))); .include(dependency("com.uwyn.rife2", "bld", version(1, 9, 0)));
scope(test) scope(test)
@ -74,7 +73,7 @@ public class ExecOperationBuild extends Project {
.license( .license(
new PublishLicense() new PublishLicense()
.name("The Apache License, Version 2.0") .name("The Apache License, Version 2.0")
.url("https://www.apache.org/licenses/LICENSE-2.0.txt") .url("http://www.apache.org/licenses/LICENSE-2.0.txt")
) )
.scm( .scm(
new PublishScm() new PublishScm()

View file

@ -38,7 +38,6 @@ public class ExecOperation extends AbstractOperation<ExecOperation> {
private final List<String> args_ = new ArrayList<>(); private final List<String> args_ = new ArrayList<>();
private final Set<ExecFail> fail_ = new HashSet<>(); private final Set<ExecFail> fail_ = new HashSet<>();
private BaseProject project_; private BaseProject project_;
private int timeout = 30;
private String workDir_; private String workDir_;
/** /**
@ -99,7 +98,7 @@ public class ExecOperation extends AbstractOperation<ExecOperation> {
} }
var proc = pb.start(); var proc = pb.start();
var err = proc.waitFor(timeout, TimeUnit.SECONDS); var err = proc.waitFor(30, TimeUnit.SECONDS);
var stdout = readStream(proc.getInputStream()); var stdout = readStream(proc.getInputStream());
var stderr = readStream(proc.getErrorStream()); var stderr = readStream(proc.getErrorStream());
@ -181,17 +180,6 @@ public class ExecOperation extends AbstractOperation<ExecOperation> {
return lines; return lines;
} }
/**
* Configure the command timeout.
*
* @param timeout The timeout in seconds
* @return this operation instance
*/
public ExecOperation timeout(int timeout) {
this.timeout = timeout;
return this;
}
/** /**
* Configures the working directory. * Configures the working directory.
* *

View file

@ -50,7 +50,6 @@ class ExecOperationTest {
tmpFile.deleteOnExit(); tmpFile.deleteOnExit();
new ExecOperation() new ExecOperation()
.fromProject(new Project()) .fromProject(new Project())
.timeout(10)
.command("touch", tmpFile.getName()) .command("touch", tmpFile.getName())
.fail(ExecFail.NORMAL) .fail(ExecFail.NORMAL)
.execute(); .execute();