From d52551f3b716ebebf096cdaf832def13f3531ac6 Mon Sep 17 00:00:00 2001 From: Geert Bevin Date: Sat, 30 Sep 2023 18:26:20 -0400 Subject: [PATCH 01/12] Test tweak to include check result for recently failing test --- src/test/java/rife/bld/operations/TestCreateRife2Operation.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/java/rife/bld/operations/TestCreateRife2Operation.java b/src/test/java/rife/bld/operations/TestCreateRife2Operation.java index f90954e..6aad8cd 100644 --- a/src/test/java/rife/bld/operations/TestCreateRife2Operation.java +++ b/src/test/java/rife/bld/operations/TestCreateRife2Operation.java @@ -546,7 +546,7 @@ public class TestCreateRife2Operation { executor.schedule(() -> run_operation.process().destroy(), 2, TimeUnit.SECONDS); assertThrows(ExitStatusException.class, run_operation::execute); - assertTrue(check_result.toString().contains("

Hello World Myapp

")); + assertTrue(check_result.toString().contains("

Hello World Myapp

"), check_result.toString()); } finally { FileUtils.deleteDirectory(tmp); } From c4b574823951b3894aa994c98f00b1072a3b7da6 Mon Sep 17 00:00:00 2001 From: Geert Bevin Date: Sat, 30 Sep 2023 18:50:09 -0400 Subject: [PATCH 02/12] Updated Github workflow --- .github/workflows/bld.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/bld.yml b/.github/workflows/bld.yml index bb80f35..c53ae69 100644 --- a/.github/workflows/bld.yml +++ b/.github/workflows/bld.yml @@ -91,7 +91,8 @@ jobs: steps: - name: Checkout source repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 + clean: true with: submodules: 'true' fetch-depth: 0 @@ -99,12 +100,13 @@ jobs: - name: Set up JDK ${{ matrix.java-version }} uses: actions/setup-java@v3 with: - distribution: 'temurin' + distribution: 'corretto' java-version: ${{ matrix.java-version }} + check-latest: true - name: Run tests run: >- - ./bld download compile test + ./bld clean download compile test -Dtest.postgres=true -Dtest.mysql=true -Dtest.mariadb=true -Dtest.oracle=true -Dtest.oracle-free=true -DtestsBadgeUrl=https://rife2.com/tests-badge/update/com.uwyn.rife2/bld -DtestsBadgeApiKey=${{ secrets.TESTS_BADGE_API_KEY }} From 3452a404fc64af4dc64052e44aa4694cddc15840 Mon Sep 17 00:00:00 2001 From: Geert Bevin Date: Sat, 30 Sep 2023 18:51:20 -0400 Subject: [PATCH 03/12] Updated Github workflow --- .github/workflows/bld.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/bld.yml b/.github/workflows/bld.yml index c53ae69..b69e2a9 100644 --- a/.github/workflows/bld.yml +++ b/.github/workflows/bld.yml @@ -92,8 +92,8 @@ jobs: steps: - name: Checkout source repository uses: actions/checkout@v4 - clean: true with: + clean: true submodules: 'true' fetch-depth: 0 From 77ceceb122ea77ac27ee36384e6821e632269538 Mon Sep 17 00:00:00 2001 From: Geert Bevin Date: Sat, 30 Sep 2023 19:04:20 -0400 Subject: [PATCH 04/12] Updated Github workflow --- .github/workflows/pages.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index 40593df..3bb461a 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -30,29 +30,30 @@ jobs: steps: - name: Checkout source repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: + clean: true submodules: 'true' fetch-depth: 0 - name: Set up JDK 17 uses: actions/setup-java@v3 with: - distribution: 'zulu' + distribution: 'corretto' java-version: 17 - name: Build Javadocs - run: ./bld download clean compile javadoc + run: ./bld clean download clean compile javadoc - name: Setup Pages uses: actions/configure-pages@v3 - name: Upload artifact - uses: actions/upload-pages-artifact@v1 + uses: actions/upload-pages-artifact@v2 with: # Upload generated Javadocs repository path: 'build/javadoc/' - name: Deploy to GitHub Pages id: deployment - uses: actions/deploy-pages@v1 \ No newline at end of file + uses: actions/deploy-pages@v2 \ No newline at end of file From 3eb5795cf24be2dfabd40c35683638833bfe762f Mon Sep 17 00:00:00 2001 From: Geert Bevin Date: Sat, 30 Sep 2023 19:07:53 -0400 Subject: [PATCH 05/12] Make sure previous executors are closed cleanly --- .../operations/TestCreateRife2Operation.java | 72 ++++++++++--------- .../bld/operations/TestUberJarOperation.java | 21 +++--- 2 files changed, 50 insertions(+), 43 deletions(-) diff --git a/src/test/java/rife/bld/operations/TestCreateRife2Operation.java b/src/test/java/rife/bld/operations/TestCreateRife2Operation.java index 6aad8cd..3b4e0af 100644 --- a/src/test/java/rife/bld/operations/TestCreateRife2Operation.java +++ b/src/test/java/rife/bld/operations/TestCreateRife2Operation.java @@ -283,17 +283,19 @@ public class TestCreateRife2Operation { /myapp/src/test/resources""").matcher(FileUtils.generateDirectoryListing(tmp)).matches()); var run_operation = new RunOperation().fromProject(create_operation.project()); - var executor = Executors.newSingleThreadScheduledExecutor(); - var checked_url = new URL("http://localhost:8080"); - var check_result = new StringBuilder(); - executor.schedule(() -> { - try { - check_result.append(FileUtils.readString(checked_url)); - } catch (FileUtilsErrorException e) { - throw new RuntimeException(e); - } - }, 1, TimeUnit.SECONDS); - executor.schedule(() -> run_operation.process().destroy(), 2, TimeUnit.SECONDS); + StringBuilder check_result; + try (var executor = Executors.newSingleThreadScheduledExecutor()) { + var checked_url = new URL("http://localhost:8080"); + check_result = new StringBuilder(); + executor.schedule(() -> { + try { + check_result.append(FileUtils.readString(checked_url)); + } catch (FileUtilsErrorException e) { + throw new RuntimeException(e); + } + }, 1, TimeUnit.SECONDS); + executor.schedule(() -> run_operation.process().destroy(), 2, TimeUnit.SECONDS); + } assertThrows(ExitStatusException.class, run_operation::execute); assertTrue(check_result.toString().contains("

Hello World Myapp

")); @@ -533,17 +535,19 @@ public class TestCreateRife2Operation { /myapp/src/test/resources""").matcher(FileUtils.generateDirectoryListing(tmp)).matches()); var run_operation = new RunOperation().fromProject(create_operation.project()); - var executor = Executors.newSingleThreadScheduledExecutor(); - var checked_url = new URL("http://localhost:8080"); - var check_result = new StringBuilder(); - executor.schedule(() -> { - try { - check_result.append(FileUtils.readString(checked_url)); - } catch (FileUtilsErrorException e) { - throw new RuntimeException(e); - } - }, 1, TimeUnit.SECONDS); - executor.schedule(() -> run_operation.process().destroy(), 2, TimeUnit.SECONDS); + StringBuilder check_result; + try (var executor = Executors.newSingleThreadScheduledExecutor()) { + var checked_url = new URL("http://localhost:8080"); + check_result = new StringBuilder(); + executor.schedule(() -> { + try { + check_result.append(FileUtils.readString(checked_url)); + } catch (FileUtilsErrorException e) { + throw new RuntimeException(e); + } + }, 1, TimeUnit.SECONDS); + executor.schedule(() -> run_operation.process().destroy(), 2, TimeUnit.SECONDS); + } assertThrows(ExitStatusException.class, run_operation::execute); assertTrue(check_result.toString().contains("

Hello World Myapp

"), check_result.toString()); @@ -699,17 +703,19 @@ public class TestCreateRife2Operation { /myapp/src/test/resources""").matcher(FileUtils.generateDirectoryListing(tmp)).matches()); var run_operation = new RunOperation().fromProject(create_operation.project()); - var executor = Executors.newSingleThreadScheduledExecutor(); - var checked_url = new URL("http://localhost:8080"); - var check_result = new StringBuilder(); - executor.schedule(() -> { - try { - check_result.append(FileUtils.readString(checked_url)); - } catch (FileUtilsErrorException e) { - throw new RuntimeException(e); - } - }, 1, TimeUnit.SECONDS); - executor.schedule(() -> run_operation.process().destroy(), 2, TimeUnit.SECONDS); + StringBuilder check_result; + try (var executor = Executors.newSingleThreadScheduledExecutor()) { + var checked_url = new URL("http://localhost:8080"); + check_result = new StringBuilder(); + executor.schedule(() -> { + try { + check_result.append(FileUtils.readString(checked_url)); + } catch (FileUtilsErrorException e) { + throw new RuntimeException(e); + } + }, 1, TimeUnit.SECONDS); + executor.schedule(() -> run_operation.process().destroy(), 2, TimeUnit.SECONDS); + } assertThrows(ExitStatusException.class, run_operation::execute); assertTrue(check_result.toString().contains("

Hello World Myapp

")); diff --git a/src/test/java/rife/bld/operations/TestUberJarOperation.java b/src/test/java/rife/bld/operations/TestUberJarOperation.java index 1a022a0..d2e087e 100644 --- a/src/test/java/rife/bld/operations/TestUberJarOperation.java +++ b/src/test/java/rife/bld/operations/TestUberJarOperation.java @@ -162,16 +162,17 @@ public class TestUberJarOperation { var run_operation = new RunOperation() .javaOptions(List.of("-jar")) .mainClass(uberjar_file.getAbsolutePath()); - var executor = Executors.newSingleThreadScheduledExecutor(); - var checked_url = new URL("http://localhost:8080"); - executor.schedule(() -> { - try { - check_result.append(FileUtils.readString(checked_url)); - } catch (FileUtilsErrorException e) { - throw new RuntimeException(e); - } - }, 1, TimeUnit.SECONDS); - executor.schedule(() -> run_operation.process().destroy(), 2, TimeUnit.SECONDS); + try (var executor = Executors.newSingleThreadScheduledExecutor()) { + var checked_url = new URL("http://localhost:8080"); + executor.schedule(() -> { + try { + check_result.append(FileUtils.readString(checked_url)); + } catch (FileUtilsErrorException e) { + throw new RuntimeException(e); + } + }, 1, TimeUnit.SECONDS); + executor.schedule(() -> run_operation.process().destroy(), 2, TimeUnit.SECONDS); + } assertThrows(ExitStatusException.class, run_operation::execute); assertTrue(check_result.toString().contains("

Hello World App

")); From 0994f184f2f4e784270ad427598b1eee4545a740 Mon Sep 17 00:00:00 2001 From: Geert Bevin Date: Sat, 30 Sep 2023 19:17:11 -0400 Subject: [PATCH 06/12] Backing out previous change since it only works on JDK 19 --- .../operations/TestCreateRife2Operation.java | 72 +++++++++---------- .../bld/operations/TestUberJarOperation.java | 21 +++--- 2 files changed, 43 insertions(+), 50 deletions(-) diff --git a/src/test/java/rife/bld/operations/TestCreateRife2Operation.java b/src/test/java/rife/bld/operations/TestCreateRife2Operation.java index 3b4e0af..6aad8cd 100644 --- a/src/test/java/rife/bld/operations/TestCreateRife2Operation.java +++ b/src/test/java/rife/bld/operations/TestCreateRife2Operation.java @@ -283,19 +283,17 @@ public class TestCreateRife2Operation { /myapp/src/test/resources""").matcher(FileUtils.generateDirectoryListing(tmp)).matches()); var run_operation = new RunOperation().fromProject(create_operation.project()); - StringBuilder check_result; - try (var executor = Executors.newSingleThreadScheduledExecutor()) { - var checked_url = new URL("http://localhost:8080"); - check_result = new StringBuilder(); - executor.schedule(() -> { - try { - check_result.append(FileUtils.readString(checked_url)); - } catch (FileUtilsErrorException e) { - throw new RuntimeException(e); - } - }, 1, TimeUnit.SECONDS); - executor.schedule(() -> run_operation.process().destroy(), 2, TimeUnit.SECONDS); - } + var executor = Executors.newSingleThreadScheduledExecutor(); + var checked_url = new URL("http://localhost:8080"); + var check_result = new StringBuilder(); + executor.schedule(() -> { + try { + check_result.append(FileUtils.readString(checked_url)); + } catch (FileUtilsErrorException e) { + throw new RuntimeException(e); + } + }, 1, TimeUnit.SECONDS); + executor.schedule(() -> run_operation.process().destroy(), 2, TimeUnit.SECONDS); assertThrows(ExitStatusException.class, run_operation::execute); assertTrue(check_result.toString().contains("

Hello World Myapp

")); @@ -535,19 +533,17 @@ public class TestCreateRife2Operation { /myapp/src/test/resources""").matcher(FileUtils.generateDirectoryListing(tmp)).matches()); var run_operation = new RunOperation().fromProject(create_operation.project()); - StringBuilder check_result; - try (var executor = Executors.newSingleThreadScheduledExecutor()) { - var checked_url = new URL("http://localhost:8080"); - check_result = new StringBuilder(); - executor.schedule(() -> { - try { - check_result.append(FileUtils.readString(checked_url)); - } catch (FileUtilsErrorException e) { - throw new RuntimeException(e); - } - }, 1, TimeUnit.SECONDS); - executor.schedule(() -> run_operation.process().destroy(), 2, TimeUnit.SECONDS); - } + var executor = Executors.newSingleThreadScheduledExecutor(); + var checked_url = new URL("http://localhost:8080"); + var check_result = new StringBuilder(); + executor.schedule(() -> { + try { + check_result.append(FileUtils.readString(checked_url)); + } catch (FileUtilsErrorException e) { + throw new RuntimeException(e); + } + }, 1, TimeUnit.SECONDS); + executor.schedule(() -> run_operation.process().destroy(), 2, TimeUnit.SECONDS); assertThrows(ExitStatusException.class, run_operation::execute); assertTrue(check_result.toString().contains("

Hello World Myapp

"), check_result.toString()); @@ -703,19 +699,17 @@ public class TestCreateRife2Operation { /myapp/src/test/resources""").matcher(FileUtils.generateDirectoryListing(tmp)).matches()); var run_operation = new RunOperation().fromProject(create_operation.project()); - StringBuilder check_result; - try (var executor = Executors.newSingleThreadScheduledExecutor()) { - var checked_url = new URL("http://localhost:8080"); - check_result = new StringBuilder(); - executor.schedule(() -> { - try { - check_result.append(FileUtils.readString(checked_url)); - } catch (FileUtilsErrorException e) { - throw new RuntimeException(e); - } - }, 1, TimeUnit.SECONDS); - executor.schedule(() -> run_operation.process().destroy(), 2, TimeUnit.SECONDS); - } + var executor = Executors.newSingleThreadScheduledExecutor(); + var checked_url = new URL("http://localhost:8080"); + var check_result = new StringBuilder(); + executor.schedule(() -> { + try { + check_result.append(FileUtils.readString(checked_url)); + } catch (FileUtilsErrorException e) { + throw new RuntimeException(e); + } + }, 1, TimeUnit.SECONDS); + executor.schedule(() -> run_operation.process().destroy(), 2, TimeUnit.SECONDS); assertThrows(ExitStatusException.class, run_operation::execute); assertTrue(check_result.toString().contains("

Hello World Myapp

")); diff --git a/src/test/java/rife/bld/operations/TestUberJarOperation.java b/src/test/java/rife/bld/operations/TestUberJarOperation.java index d2e087e..1a022a0 100644 --- a/src/test/java/rife/bld/operations/TestUberJarOperation.java +++ b/src/test/java/rife/bld/operations/TestUberJarOperation.java @@ -162,17 +162,16 @@ public class TestUberJarOperation { var run_operation = new RunOperation() .javaOptions(List.of("-jar")) .mainClass(uberjar_file.getAbsolutePath()); - try (var executor = Executors.newSingleThreadScheduledExecutor()) { - var checked_url = new URL("http://localhost:8080"); - executor.schedule(() -> { - try { - check_result.append(FileUtils.readString(checked_url)); - } catch (FileUtilsErrorException e) { - throw new RuntimeException(e); - } - }, 1, TimeUnit.SECONDS); - executor.schedule(() -> run_operation.process().destroy(), 2, TimeUnit.SECONDS); - } + var executor = Executors.newSingleThreadScheduledExecutor(); + var checked_url = new URL("http://localhost:8080"); + executor.schedule(() -> { + try { + check_result.append(FileUtils.readString(checked_url)); + } catch (FileUtilsErrorException e) { + throw new RuntimeException(e); + } + }, 1, TimeUnit.SECONDS); + executor.schedule(() -> run_operation.process().destroy(), 2, TimeUnit.SECONDS); assertThrows(ExitStatusException.class, run_operation::execute); assertTrue(check_result.toString().contains("

Hello World App

")); From 5fb6fa16b7b6c12b2c7cebe1542566cb1cfb27f0 Mon Sep 17 00:00:00 2001 From: Geert Bevin Date: Sat, 30 Sep 2023 19:20:02 -0400 Subject: [PATCH 07/12] Some test timing tweaks to try to work around CI failures. --- .../bld/operations/TestCreateRife2Operation.java | 15 +++++++++------ .../rife/bld/operations/TestUberJarOperation.java | 5 +++-- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/test/java/rife/bld/operations/TestCreateRife2Operation.java b/src/test/java/rife/bld/operations/TestCreateRife2Operation.java index 6aad8cd..fbe2073 100644 --- a/src/test/java/rife/bld/operations/TestCreateRife2Operation.java +++ b/src/test/java/rife/bld/operations/TestCreateRife2Operation.java @@ -292,9 +292,10 @@ public class TestCreateRife2Operation { } catch (FileUtilsErrorException e) { throw new RuntimeException(e); } - }, 1, TimeUnit.SECONDS); - executor.schedule(() -> run_operation.process().destroy(), 2, TimeUnit.SECONDS); + }, 2, TimeUnit.SECONDS); + executor.schedule(() -> run_operation.process().destroy(), 4, TimeUnit.SECONDS); assertThrows(ExitStatusException.class, run_operation::execute); + Thread.sleep(1000); assertTrue(check_result.toString().contains("

Hello World Myapp

")); } finally { @@ -542,9 +543,10 @@ public class TestCreateRife2Operation { } catch (FileUtilsErrorException e) { throw new RuntimeException(e); } - }, 1, TimeUnit.SECONDS); - executor.schedule(() -> run_operation.process().destroy(), 2, TimeUnit.SECONDS); + }, 2, TimeUnit.SECONDS); + executor.schedule(() -> run_operation.process().destroy(), 4, TimeUnit.SECONDS); assertThrows(ExitStatusException.class, run_operation::execute); + Thread.sleep(1000); assertTrue(check_result.toString().contains("

Hello World Myapp

"), check_result.toString()); } finally { @@ -708,9 +710,10 @@ public class TestCreateRife2Operation { } catch (FileUtilsErrorException e) { throw new RuntimeException(e); } - }, 1, TimeUnit.SECONDS); - executor.schedule(() -> run_operation.process().destroy(), 2, TimeUnit.SECONDS); + }, 2, TimeUnit.SECONDS); + executor.schedule(() -> run_operation.process().destroy(), 4, TimeUnit.SECONDS); assertThrows(ExitStatusException.class, run_operation::execute); + Thread.sleep(1000); assertTrue(check_result.toString().contains("

Hello World Myapp

")); } finally { diff --git a/src/test/java/rife/bld/operations/TestUberJarOperation.java b/src/test/java/rife/bld/operations/TestUberJarOperation.java index 1a022a0..dafce6f 100644 --- a/src/test/java/rife/bld/operations/TestUberJarOperation.java +++ b/src/test/java/rife/bld/operations/TestUberJarOperation.java @@ -170,9 +170,10 @@ public class TestUberJarOperation { } catch (FileUtilsErrorException e) { throw new RuntimeException(e); } - }, 1, TimeUnit.SECONDS); - executor.schedule(() -> run_operation.process().destroy(), 2, TimeUnit.SECONDS); + }, 2, TimeUnit.SECONDS); + executor.schedule(() -> run_operation.process().destroy(), 4, TimeUnit.SECONDS); assertThrows(ExitStatusException.class, run_operation::execute); + Thread.sleep(1000); assertTrue(check_result.toString().contains("

Hello World App

")); } finally { From a6aadf8e606fff5fc0a2a015de1df0c36f688f54 Mon Sep 17 00:00:00 2001 From: Geert Bevin Date: Sat, 30 Sep 2023 20:16:10 -0400 Subject: [PATCH 08/12] More test timing changes --- .../java/rife/bld/operations/TestCreateRife2Operation.java | 6 +++--- src/test/java/rife/bld/operations/TestPublishOperation.java | 4 ++-- src/test/java/rife/bld/operations/TestUberJarOperation.java | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/test/java/rife/bld/operations/TestCreateRife2Operation.java b/src/test/java/rife/bld/operations/TestCreateRife2Operation.java index fbe2073..d7b58bd 100644 --- a/src/test/java/rife/bld/operations/TestCreateRife2Operation.java +++ b/src/test/java/rife/bld/operations/TestCreateRife2Operation.java @@ -295,7 +295,7 @@ public class TestCreateRife2Operation { }, 2, TimeUnit.SECONDS); executor.schedule(() -> run_operation.process().destroy(), 4, TimeUnit.SECONDS); assertThrows(ExitStatusException.class, run_operation::execute); - Thread.sleep(1000); + Thread.sleep(2000); assertTrue(check_result.toString().contains("

Hello World Myapp

")); } finally { @@ -546,7 +546,7 @@ public class TestCreateRife2Operation { }, 2, TimeUnit.SECONDS); executor.schedule(() -> run_operation.process().destroy(), 4, TimeUnit.SECONDS); assertThrows(ExitStatusException.class, run_operation::execute); - Thread.sleep(1000); + Thread.sleep(2000); assertTrue(check_result.toString().contains("

Hello World Myapp

"), check_result.toString()); } finally { @@ -713,7 +713,7 @@ public class TestCreateRife2Operation { }, 2, TimeUnit.SECONDS); executor.schedule(() -> run_operation.process().destroy(), 4, TimeUnit.SECONDS); assertThrows(ExitStatusException.class, run_operation::execute); - Thread.sleep(1000); + Thread.sleep(2000); assertTrue(check_result.toString().contains("

Hello World Myapp

")); } finally { diff --git a/src/test/java/rife/bld/operations/TestPublishOperation.java b/src/test/java/rife/bld/operations/TestPublishOperation.java index 60f5ecb..d615734 100644 --- a/src/test/java/rife/bld/operations/TestPublishOperation.java +++ b/src/test/java/rife/bld/operations/TestPublishOperation.java @@ -126,7 +126,7 @@ public class TestPublishOperation { var process = process_builder.start(); // wait for full startup - Thread.sleep(4000); + Thread.sleep(6000); // verify the version doesn't exist assertThrows(FileUtilsErrorException.class, () -> FileUtils.readString(new URL("http://localhost:8081/api/maven/details/releases/test/pkg/myapp"))); @@ -392,7 +392,7 @@ public class TestPublishOperation { var process = process_builder.start(); // wait for full startup - Thread.sleep(4000); + Thread.sleep(6000); // verify the version doesn't exist assertThrows(FileUtilsErrorException.class, () -> FileUtils.readString(new URL("http://localhost:8081/api/maven/details/releases/test/pkg/myapp"))); diff --git a/src/test/java/rife/bld/operations/TestUberJarOperation.java b/src/test/java/rife/bld/operations/TestUberJarOperation.java index dafce6f..71e3001 100644 --- a/src/test/java/rife/bld/operations/TestUberJarOperation.java +++ b/src/test/java/rife/bld/operations/TestUberJarOperation.java @@ -173,7 +173,7 @@ public class TestUberJarOperation { }, 2, TimeUnit.SECONDS); executor.schedule(() -> run_operation.process().destroy(), 4, TimeUnit.SECONDS); assertThrows(ExitStatusException.class, run_operation::execute); - Thread.sleep(1000); + Thread.sleep(2000); assertTrue(check_result.toString().contains("

Hello World App

")); } finally { From 7c2d0221b8f2f2d55454fa250dd962941a8c47a5 Mon Sep 17 00:00:00 2001 From: Geert Bevin Date: Sun, 1 Oct 2023 09:29:15 -0400 Subject: [PATCH 09/12] Fixed for some operation options typos --- src/main/java/rife/bld/operations/JavacOptions.java | 2 +- src/main/java/rife/bld/operations/JavadocOptions.java | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/rife/bld/operations/JavacOptions.java b/src/main/java/rife/bld/operations/JavacOptions.java index be02dc4..bc2412f 100644 --- a/src/main/java/rife/bld/operations/JavacOptions.java +++ b/src/main/java/rife/bld/operations/JavacOptions.java @@ -78,7 +78,7 @@ public class JavacOptions extends ArrayList { */ public JavacOptions encoding(String name) { add("-encoding"); - add("name"); + add(name); return this; } diff --git a/src/main/java/rife/bld/operations/JavadocOptions.java b/src/main/java/rife/bld/operations/JavadocOptions.java index 5b16f64..dcc25ca 100644 --- a/src/main/java/rife/bld/operations/JavadocOptions.java +++ b/src/main/java/rife/bld/operations/JavadocOptions.java @@ -100,7 +100,7 @@ public class JavadocOptions extends ArrayList { */ public JavadocOptions doclet(String className) { add("-doclet"); - add("className"); + add(className); return this; } @@ -112,7 +112,7 @@ public class JavadocOptions extends ArrayList { */ public JavadocOptions docletPath(String path) { add("-docletpath"); - add("path"); + add(path); return this; } @@ -135,7 +135,7 @@ public class JavadocOptions extends ArrayList { */ public JavadocOptions encoding(String name) { add("-encoding"); - add("name"); + add(name); return this; } @@ -213,7 +213,7 @@ public class JavadocOptions extends ArrayList { */ public JavadocOptions locale(String name) { add("-locale"); - add("name"); + add(name); return this; } From 2a5437de0c7d266c32ef5adcef36f1a46ff247ff Mon Sep 17 00:00:00 2001 From: Geert Bevin Date: Sun, 1 Oct 2023 09:29:15 -0400 Subject: [PATCH 10/12] Updated for latest RIFE2 core. Some build changes. Run Github workflow on macOS. --- .github/workflows/bld.yml | 26 +++++++++++++++++++ core | 2 +- src/bld/java/rife/BldBuild.java | 3 ++- .../rife/bld/operations/JavacOptions.java | 2 +- .../rife/bld/operations/JavadocOptions.java | 8 +++--- 5 files changed, 34 insertions(+), 7 deletions(-) diff --git a/.github/workflows/bld.yml b/.github/workflows/bld.yml index b69e2a9..91fdcf0 100644 --- a/.github/workflows/bld.yml +++ b/.github/workflows/bld.yml @@ -110,3 +110,29 @@ jobs: -Dtest.postgres=true -Dtest.mysql=true -Dtest.mariadb=true -Dtest.oracle=true -Dtest.oracle-free=true -DtestsBadgeUrl=https://rife2.com/tests-badge/update/com.uwyn.rife2/bld -DtestsBadgeApiKey=${{ secrets.TESTS_BADGE_API_KEY }} + + build-bld-project-macos: + runs-on: macos-latest + + strategy: + matrix: + java-version: [ 17, 20 ] + + steps: + - name: Checkout source repository + uses: actions/checkout@v4 + with: + clean: true + submodules: 'true' + fetch-depth: 0 + + - name: Set up JDK ${{ matrix.java-version }} + uses: actions/setup-java@v3 + with: + distribution: 'corretto' + java-version: ${{ matrix.java-version }} + check-latest: true + + - name: Run tests + run: >- + ./bld clean download compile test diff --git a/core b/core index e6872e1..0ad243b 160000 --- a/core +++ b/core @@ -1 +1 @@ -Subproject commit e6872e1c927662eb5156700c6d81b483b75e383b +Subproject commit 0ad243b95e76bb506e625822a0f7ef9d03733f71 diff --git a/src/bld/java/rife/BldBuild.java b/src/bld/java/rife/BldBuild.java index 8626a87..9a0ed51 100644 --- a/src/bld/java/rife/BldBuild.java +++ b/src/bld/java/rife/BldBuild.java @@ -56,7 +56,8 @@ public class BldBuild extends AbstractRife2Build { .mainSourceDirectories(antlr4Operation.outputDirectory(), core_src_main_java_directory) .testSourceDirectories(core_src_test_java_directory) .compileOptions() - .debuggingInfo(JavacOptions.DebuggingInfo.ALL); + .debuggingInfo(JavacOptions.DebuggingInfo.ALL) + .addAll(List.of("-encoding", "UTF-8")); jarOperation() .sourceDirectories(core_src_main_resources_directory) diff --git a/src/main/java/rife/bld/operations/JavacOptions.java b/src/main/java/rife/bld/operations/JavacOptions.java index be02dc4..bc2412f 100644 --- a/src/main/java/rife/bld/operations/JavacOptions.java +++ b/src/main/java/rife/bld/operations/JavacOptions.java @@ -78,7 +78,7 @@ public class JavacOptions extends ArrayList { */ public JavacOptions encoding(String name) { add("-encoding"); - add("name"); + add(name); return this; } diff --git a/src/main/java/rife/bld/operations/JavadocOptions.java b/src/main/java/rife/bld/operations/JavadocOptions.java index 5b16f64..dcc25ca 100644 --- a/src/main/java/rife/bld/operations/JavadocOptions.java +++ b/src/main/java/rife/bld/operations/JavadocOptions.java @@ -100,7 +100,7 @@ public class JavadocOptions extends ArrayList { */ public JavadocOptions doclet(String className) { add("-doclet"); - add("className"); + add(className); return this; } @@ -112,7 +112,7 @@ public class JavadocOptions extends ArrayList { */ public JavadocOptions docletPath(String path) { add("-docletpath"); - add("path"); + add(path); return this; } @@ -135,7 +135,7 @@ public class JavadocOptions extends ArrayList { */ public JavadocOptions encoding(String name) { add("-encoding"); - add("name"); + add(name); return this; } @@ -213,7 +213,7 @@ public class JavadocOptions extends ArrayList { */ public JavadocOptions locale(String name) { add("-locale"); - add("name"); + add(name); return this; } From cac57b3e4bfc970d420f345d1d04fb487f9cd025 Mon Sep 17 00:00:00 2001 From: Geert Bevin Date: Sun, 1 Oct 2023 12:43:04 -0400 Subject: [PATCH 11/12] Windows related tweaks and fixes --- .idea/misc.xml | 3 +- core | 2 +- .../rife/bld/dependencies/Repository.java | 20 ++++++++--- .../bld/dependencies/TestDependencySet.java | 36 +++++++++---------- .../bld/operations/TestCompileOperation.java | 11 +++--- .../TestDependencyTreeOperation.java | 17 ++++----- .../bld/operations/TestJUnitOperation.java | 5 +-- .../bld/operations/TestJavadocOperation.java | 2 +- .../java/rife/bld/publish/TestPomBuilder.java | 5 +-- 9 files changed, 57 insertions(+), 44 deletions(-) diff --git a/.idea/misc.xml b/.idea/misc.xml index 46607c8..065a1fd 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,4 +1,3 @@ - + \ No newline at end of file diff --git a/core b/core index 0ad243b..88f7cb4 160000 --- a/core +++ b/core @@ -1 +1 @@ -Subproject commit 0ad243b95e76bb506e625822a0f7ef9d03733f71 +Subproject commit 88f7cb4af908d8c093ba9b72e6fc9c7e189fe6e5 diff --git a/src/main/java/rife/bld/dependencies/Repository.java b/src/main/java/rife/bld/dependencies/Repository.java index cdff56f..2eb7fdd 100644 --- a/src/main/java/rife/bld/dependencies/Repository.java +++ b/src/main/java/rife/bld/dependencies/Repository.java @@ -7,8 +7,10 @@ package rife.bld.dependencies; import rife.ioc.HierarchicalProperties; import rife.tools.StringEncryptor; +import java.io.File; import java.nio.file.Path; import java.security.NoSuchAlgorithmException; +import java.util.regex.Pattern; /** * Contains the information required to locate a Maven-compatible repository. @@ -103,6 +105,12 @@ public record Repository(String location, String username, String password) { this(location, null, null); } + private final static Pattern WINDOWS_ABSOLUTE_PATH = Pattern.compile("^\\p{L}:\\\\"); + + private boolean isWindowsLocation() { + return WINDOWS_ABSOLUTE_PATH.matcher(location()).find(); + } + /** * Indicates whether this repository is local. * @@ -111,7 +119,7 @@ public record Repository(String location, String username, String password) { * @since 1.5.10 */ public boolean isLocal() { - return location().startsWith("/") || location().startsWith("file:"); + return location().startsWith("/") || location().startsWith("file:") || isWindowsLocation(); } /** @@ -147,9 +155,10 @@ public record Repository(String location, String username, String password) { * @since 1.5.10 */ public String getArtifactLocation(String groupId, String artifactId) { - var group_path = groupId.replace(".", "/"); + var separator = "/"; var result = new StringBuilder(); if (isLocal()) { + separator = File.separator; if (location().startsWith("file://")) { result.append(location().substring("file://".length())); } else { @@ -158,10 +167,11 @@ public record Repository(String location, String username, String password) { } else { result.append(location()); } - if (!location().endsWith("/")) { - result.append("/"); + if (!location().endsWith(separator)) { + result.append(separator); } - return result.append(group_path).append("/").append(artifactId).append("/").toString(); + var group_path = groupId.replace(".", separator); + return result.append(group_path).append(separator).append(artifactId).append(separator).toString(); } /** diff --git a/src/test/java/rife/bld/dependencies/TestDependencySet.java b/src/test/java/rife/bld/dependencies/TestDependencySet.java index 5c0cbca..e21341f 100644 --- a/src/test/java/rife/bld/dependencies/TestDependencySet.java +++ b/src/test/java/rife/bld/dependencies/TestDependencySet.java @@ -57,25 +57,25 @@ public class TestDependencySet { var set_union1 = new DependencySet(set1); set_union1.addAll(set2); - assertEquals(""" + assertEquals(StringUtils.convertLineSeparator(""" org.eclipse.jetty:jetty-server:11.0.14 org.eclipse.jetty.toolchain:jetty-jakarta-servlet-api:5.0.2 org.eclipse.jetty:jetty-http:11.0.14 org.eclipse.jetty:jetty-io:11.0.14 org.eclipse.jetty:jetty-util:11.0.14 org.slf4j:slf4j-simple:2.0.6 - org.slf4j:slf4j-api:2.0.6""", StringUtils.join(set_union1, "\n")); + org.slf4j:slf4j-api:2.0.6"""), StringUtils.join(set_union1, System.lineSeparator())); var set_union2 = new DependencySet(set2); set_union2.addAll(set1); - assertEquals(""" + assertEquals(StringUtils.convertLineSeparator(""" org.slf4j:slf4j-simple:2.0.6 org.slf4j:slf4j-api:2.0.6 org.eclipse.jetty:jetty-server:11.0.14 org.eclipse.jetty.toolchain:jetty-jakarta-servlet-api:5.0.2 org.eclipse.jetty:jetty-http:11.0.14 org.eclipse.jetty:jetty-io:11.0.14 - org.eclipse.jetty:jetty-util:11.0.14""", StringUtils.join(set_union2, "\n")); + org.eclipse.jetty:jetty-util:11.0.14"""), StringUtils.join(set_union2, System.lineSeparator())); } @Test @@ -83,7 +83,7 @@ public class TestDependencySet { var dependencies = new DependencySet() .include(new Dependency("org.eclipse.jetty", "jetty-server", new VersionNumber(11, 0, 14))) .include(new Dependency("org.slf4j", "slf4j-simple", new VersionNumber(2, 0, 6))); - assertEquals(""" + assertEquals(StringUtils.convertLineSeparator(""" ├─ org.eclipse.jetty:jetty-server:11.0.14 │ ├─ org.eclipse.jetty.toolchain:jetty-jakarta-servlet-api:5.0.2 │ ├─ org.eclipse.jetty:jetty-http:11.0.14 @@ -91,14 +91,14 @@ public class TestDependencySet { │ └─ org.eclipse.jetty:jetty-io:11.0.14 └─ org.slf4j:slf4j-simple:2.0.6 └─ org.slf4j:slf4j-api:2.0.6 - """, dependencies.generateTransitiveDependencyTree(ArtifactRetriever.instance(), List.of(MAVEN_CENTRAL), compile)); + """), dependencies.generateTransitiveDependencyTree(ArtifactRetriever.instance(), List.of(MAVEN_CENTRAL), compile)); } @Test void testGenerateDependencyTreeSpringBoot() { var dependencies = new DependencySet() .include(new Dependency("org.springframework.boot", "spring-boot-starter", new VersionNumber(3, 0, 4))); - assertEquals(""" + assertEquals(StringUtils.convertLineSeparator(""" └─ org.springframework.boot:spring-boot-starter:3.0.4 ├─ org.springframework.boot:spring-boot:3.0.4 │ └─ org.springframework:spring-context:6.0.6 @@ -117,14 +117,14 @@ public class TestDependencySet { ├─ org.springframework:spring-core:6.0.6 │ └─ org.springframework:spring-jcl:6.0.6 └─ org.yaml:snakeyaml:1.33 - """, dependencies.generateTransitiveDependencyTree(ArtifactRetriever.instance(), List.of(MAVEN_CENTRAL), compile)); + """), dependencies.generateTransitiveDependencyTree(ArtifactRetriever.instance(), List.of(MAVEN_CENTRAL), compile)); } @Test void testGenerateDependencyTreeMaven() { var dependencies = new DependencySet() .include(new Dependency("org.apache.maven", "maven-core", new VersionNumber(3, 9, 0))); - assertEquals(""" + assertEquals(StringUtils.convertLineSeparator(""" └─ org.apache.maven:maven-core:3.9.0 ├─ org.apache.maven:maven-model:3.9.0 ├─ org.apache.maven:maven-settings:3.9.0 @@ -157,14 +157,14 @@ public class TestDependencySet { ├─ org.codehaus.plexus:plexus-component-annotations:2.1.0 ├─ org.apache.commons:commons-lang3:3.8.1 └─ org.slf4j:slf4j-api:1.7.36 - """, dependencies.generateTransitiveDependencyTree(ArtifactRetriever.instance(), List.of(MAVEN_CENTRAL), compile)); + """), dependencies.generateTransitiveDependencyTree(ArtifactRetriever.instance(), List.of(MAVEN_CENTRAL), compile)); } @Test void testGenerateDependencyTreePlay() { var dependencies = new DependencySet() .include(new Dependency("com.typesafe.play", "play_2.13", new VersionNumber(2, 8, 19))); - assertEquals(""" + assertEquals(StringUtils.convertLineSeparator(""" └─ com.typesafe.play:play_2.13:2.8.19 ├─ org.scala-lang:scala-library:2.13.10 ├─ com.typesafe.play:build-link:2.8.19 @@ -213,14 +213,14 @@ public class TestDependencySet { ├─ org.scala-lang.modules:scala-java8-compat_2.13:1.0.2 ├─ com.typesafe:ssl-config-core_2.13:0.4.3 └─ org.scala-lang.modules:scala-parser-combinators_2.13:1.1.2 - """, dependencies.generateTransitiveDependencyTree(ArtifactRetriever.instance(), List.of(MAVEN_CENTRAL), compile)); + """), dependencies.generateTransitiveDependencyTree(ArtifactRetriever.instance(), List.of(MAVEN_CENTRAL), compile)); } @Test void testGenerateDependencyTreeVaadin() { var dependencies = new DependencySet() .include(new Dependency("com.vaadin", "vaadin", new VersionNumber(23, 3, 7))); - assertEquals(""" + assertEquals(StringUtils.convertLineSeparator(""" └─ com.vaadin:vaadin:23.3.7 ├─ com.vaadin:vaadin-core:23.3.7 │ ├─ com.vaadin:flow-server:23.3.4 @@ -309,7 +309,7 @@ public class TestDependencySet { │ ├─ net.java.dev.jna:jna:5.11.0 │ └─ net.java.dev.jna:jna-platform:5.11.0 └─ com.auth0:java-jwt:3.19.2 - """, dependencies.generateTransitiveDependencyTree(ArtifactRetriever.instance(), List.of(MAVEN_CENTRAL), compile)); + """), dependencies.generateTransitiveDependencyTree(ArtifactRetriever.instance(), List.of(MAVEN_CENTRAL), compile)); } @Test @@ -324,7 +324,7 @@ public class TestDependencySet { .include(new Dependency("commons-codec", "commons-codec", new VersionNumber(1,15))) .include(new Dependency("org.apache.httpcomponents", "httpcore", new VersionNumber(4,4,16))) .include(new Dependency("com.google.zxing", "javase", new VersionNumber(3,5,1))); - assertEquals(""" + assertEquals(StringUtils.convertLineSeparator(""" ├─ com.uwyn.rife2:rife2:1.5.20 ├─ com.stripe:stripe-java:20.136.0 ├─ org.json:json:20230227 @@ -352,14 +352,14 @@ public class TestDependencySet { └─ com.google.zxing:javase:3.5.1 ├─ com.google.zxing:core:3.5.1 └─ com.beust:jcommander:1.82 - """, dependencies.generateTransitiveDependencyTree(ArtifactRetriever.instance(), List.of(MAVEN_CENTRAL), compile)); + """), dependencies.generateTransitiveDependencyTree(ArtifactRetriever.instance(), List.of(MAVEN_CENTRAL), compile)); } @Test void testGenerateDependencyTreeCompileRuntime() { var dependencies = new DependencySet() .include(new Dependency("net.thauvin.erik", "bitly-shorten", new VersionNumber(0, 9, 4, "SNAPSHOT"))); - assertEquals(""" + assertEquals(StringUtils.convertLineSeparator(""" └─ net.thauvin.erik:bitly-shorten:0.9.4-SNAPSHOT ├─ org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.22 │ ├─ org.jetbrains.kotlin:kotlin-stdlib:1.8.22 @@ -371,6 +371,6 @@ public class TestDependencySet { │ └─ com.squareup.okio:okio-jvm:3.2.0 ├─ com.squareup.okhttp3:logging-interceptor:4.11.0 └─ org.json:json:20230618 - """, dependencies.generateTransitiveDependencyTree(ArtifactRetriever.instance(), List.of(MAVEN_CENTRAL, SONATYPE_SNAPSHOTS_LEGACY), compile, runtime)); + """), dependencies.generateTransitiveDependencyTree(ArtifactRetriever.instance(), List.of(MAVEN_CENTRAL, SONATYPE_SNAPSHOTS_LEGACY), compile, runtime)); } } diff --git a/src/test/java/rife/bld/operations/TestCompileOperation.java b/src/test/java/rife/bld/operations/TestCompileOperation.java index 51bbb88..fc6b478 100644 --- a/src/test/java/rife/bld/operations/TestCompileOperation.java +++ b/src/test/java/rife/bld/operations/TestCompileOperation.java @@ -11,6 +11,7 @@ import rife.tools.FileUtils; import javax.tools.DiagnosticCollector; import javax.tools.JavaFileObject; import java.io.File; +import java.net.URL; import java.nio.file.Files; import java.util.List; @@ -305,11 +306,11 @@ public class TestCompileOperation { var diagnostic4 = operation.diagnostics().get(3); var diagnostic5 = operation.diagnostics().get(4); - assertEquals("/Source1.java", diagnostic1.getSource().toUri().getPath().substring(tmp.getAbsolutePath().length())); - assertEquals("/Source3.java", diagnostic2.getSource().toUri().getPath().substring(tmp.getAbsolutePath().length())); - assertEquals("/Source3.java", diagnostic3.getSource().toUri().getPath().substring(tmp.getAbsolutePath().length())); - assertEquals("/Source3.java", diagnostic4.getSource().toUri().getPath().substring(tmp.getAbsolutePath().length())); - assertEquals("/Source3.java", diagnostic5.getSource().toUri().getPath().substring(tmp.getAbsolutePath().length())); + assertEquals("Source1.java", diagnostic1.getSource().toUri().getPath().substring(tmp.toURI().getPath().length())); + assertEquals("Source3.java", diagnostic2.getSource().toUri().getPath().substring(tmp.toURI().getPath().length())); + assertEquals("Source3.java", diagnostic3.getSource().toUri().getPath().substring(tmp.toURI().getPath().length())); + assertEquals("Source3.java", diagnostic4.getSource().toUri().getPath().substring(tmp.toURI().getPath().length())); + assertEquals("Source3.java", diagnostic5.getSource().toUri().getPath().substring(tmp.toURI().getPath().length())); assertFalse(build_main_class1.exists()); assertFalse(build_main_class2.exists()); diff --git a/src/test/java/rife/bld/operations/TestDependencyTreeOperation.java b/src/test/java/rife/bld/operations/TestDependencyTreeOperation.java index 984917f..a15bef2 100644 --- a/src/test/java/rife/bld/operations/TestDependencyTreeOperation.java +++ b/src/test/java/rife/bld/operations/TestDependencyTreeOperation.java @@ -8,6 +8,7 @@ import org.junit.jupiter.api.Test; import rife.bld.WebProject; import rife.bld.dependencies.*; import rife.tools.FileUtils; +import rife.tools.StringUtils; import java.io.File; import java.nio.file.Files; @@ -80,7 +81,7 @@ public class TestDependencyTreeOperation { var tree = operation.dependencyTree(); - assertEquals(""" + assertEquals(StringUtils.convertLineSeparator(""" compile: ├─ com.uwyn.rife2:rife2:1.5.20 ├─ com.stripe:stripe-java:20.136.0 @@ -120,7 +121,7 @@ public class TestDependencyTreeOperation { test: no dependencies - """, tree); + """), tree); } finally { FileUtils.deleteDirectory(tmp); } @@ -152,7 +153,7 @@ public class TestDependencyTreeOperation { var tree = operation.dependencyTree(); - assertEquals(""" + assertEquals(StringUtils.convertLineSeparator(""" compile: no dependencies @@ -188,7 +189,7 @@ public class TestDependencyTreeOperation { │ └─ org.eclipse.jetty:jetty-security:11.0.15 └─ net.imagej:ij:1.54d - """, tree); + """), tree); } finally { FileUtils.deleteDirectory(tmp); } @@ -229,7 +230,7 @@ public class TestDependencyTreeOperation { var tree = operation.dependencyTree(); - assertEquals(""" + assertEquals(StringUtils.convertLineSeparator(""" compile: ├─ com.uwyn.rife2:rife2:1.5.20 ├─ com.stripe:stripe-java:20.136.0 @@ -269,7 +270,7 @@ public class TestDependencyTreeOperation { test: no dependencies - """, tree); + """), tree); } finally { FileUtils.deleteDirectory(tmp); } @@ -305,7 +306,7 @@ public class TestDependencyTreeOperation { var tree = operation.dependencyTree(); - assertEquals(""" + assertEquals(StringUtils.convertLineSeparator(""" compile: no dependencies @@ -341,7 +342,7 @@ public class TestDependencyTreeOperation { │ └─ org.eclipse.jetty:jetty-security:11.0.15 └─ net.imagej:ij:1.54d - """, tree); + """), tree); } finally { FileUtils.deleteDirectory(tmp); } diff --git a/src/test/java/rife/bld/operations/TestJUnitOperation.java b/src/test/java/rife/bld/operations/TestJUnitOperation.java index a2b1c43..e3a502b 100644 --- a/src/test/java/rife/bld/operations/TestJUnitOperation.java +++ b/src/test/java/rife/bld/operations/TestJUnitOperation.java @@ -6,6 +6,7 @@ package rife.bld.operations; import org.junit.jupiter.api.Test; import rife.tools.FileUtils; +import rife.tools.StringUtils; import java.io.File; import java.nio.file.Files; @@ -191,7 +192,7 @@ public class TestJUnitOperation { return true; }) .execute(); - assertTrue(check_result.toString().contains(""" + assertTrue(check_result.toString().contains(StringUtils.convertLineSeparator(""" [ 2 containers found ] [ 0 containers skipped ] [ 2 containers started ] @@ -204,7 +205,7 @@ public class TestJUnitOperation { [ 0 tests aborted ] [ 1 tests successful ] [ 0 tests failed ] - """)); + """))); } finally { FileUtils.deleteDirectory(tmp); diff --git a/src/test/java/rife/bld/operations/TestJavadocOperation.java b/src/test/java/rife/bld/operations/TestJavadocOperation.java index 6224d84..672bcef 100644 --- a/src/test/java/rife/bld/operations/TestJavadocOperation.java +++ b/src/test/java/rife/bld/operations/TestJavadocOperation.java @@ -354,7 +354,7 @@ public class TestJavadocOperation { var diagnostic1 = operation.diagnostics().get(0); - assertEquals("/Source1.java", diagnostic1.getSource().toUri().getPath().substring(tmp.getAbsolutePath().length())); + assertEquals("Source1.java", diagnostic1.getSource().toUri().getPath().substring(tmp.toURI().getPath().length())); assertFalse(build_html1.exists()); assertFalse(build_html2.exists()); diff --git a/src/test/java/rife/bld/publish/TestPomBuilder.java b/src/test/java/rife/bld/publish/TestPomBuilder.java index 268b26d..582cbaa 100644 --- a/src/test/java/rife/bld/publish/TestPomBuilder.java +++ b/src/test/java/rife/bld/publish/TestPomBuilder.java @@ -9,6 +9,7 @@ import rife.bld.dependencies.Dependency; import rife.bld.dependencies.DependencyScopes; import rife.bld.dependencies.Scope; import rife.bld.dependencies.VersionNumber; +import rife.tools.StringUtils; import java.io.File; import java.io.IOException; @@ -108,7 +109,7 @@ public class TestPomBuilder { PomBuilder.generateInto(new PublishInfo().name("the thing"), deps, temp); - assertEquals(""" + assertEquals(StringUtils.convertLineSeparator(""" @@ -126,7 +127,7 @@ public class TestPomBuilder { compile - """, String.join(System.lineSeparator(), Files.readAllLines(temp.toPath()))); + """), String.join(System.lineSeparator(), Files.readAllLines(temp.toPath()))); } @Test From e7c7144c842f25c35c4d30a8ad2e6e11e4728933 Mon Sep 17 00:00:00 2001 From: Geert Bevin Date: Sun, 1 Oct 2023 12:48:32 -0400 Subject: [PATCH 12/12] Renamed Github workflows --- .github/workflows/bld.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/bld.yml b/.github/workflows/bld.yml index 91fdcf0..f959c28 100644 --- a/.github/workflows/bld.yml +++ b/.github/workflows/bld.yml @@ -3,7 +3,7 @@ name: bld-ci on: [push, pull_request, workflow_dispatch] jobs: - build-bld-project: + build-linux: runs-on: ubuntu-latest services: @@ -111,7 +111,7 @@ jobs: -DtestsBadgeUrl=https://rife2.com/tests-badge/update/com.uwyn.rife2/bld -DtestsBadgeApiKey=${{ secrets.TESTS_BADGE_API_KEY }} - build-bld-project-macos: + build-macos: runs-on: macos-latest strategy: