diff --git a/.github/workflows/maven-matrix.yml b/.github/workflows/maven-matrix.yml index 6f383ff1..83fb194d 100644 --- a/.github/workflows/maven-matrix.yml +++ b/.github/workflows/maven-matrix.yml @@ -28,7 +28,7 @@ jobs: runs-on: ubuntu-22.04 steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up JDK ${{ matrix.java }} uses: actions/setup-java@v3 with: @@ -46,7 +46,7 @@ jobs: runs-on: ubuntu-22.04 steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up JDK 17 uses: actions/setup-java@v3 with: @@ -65,7 +65,7 @@ jobs: # runs-on: windows-latest # steps: # - name: Checkout -# uses: actions/checkout@v3 +# uses: actions/checkout@v4 # - name: Set up JDK 8 # uses: actions/setup-java@v3 # with: @@ -81,7 +81,7 @@ jobs: runs-on: macos-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up JDK 8 uses: actions/setup-java@v3 with: @@ -100,9 +100,9 @@ jobs: runs-on: ubuntu-22.04 steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Import GPG key to sign maven build artifacts - uses: crazy-max/ghaction-import-gpg@v5 + uses: crazy-max/ghaction-import-gpg@v6 with: gpg_private_key: ${{ secrets.GPG_SECRET_KEYS }} passphrase: ${{ secrets.GPG_PASSPHRASE }} @@ -131,9 +131,9 @@ jobs: runs-on: ubuntu-22.04 steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Import GPG key to sign maven build artifacts - uses: crazy-max/ghaction-import-gpg@v5 + uses: crazy-max/ghaction-import-gpg@v6 with: gpg_private_key: ${{ secrets.GPG_SECRET_KEYS }} passphrase: ${{ secrets.GPG_PASSPHRASE }} diff --git a/.github/workflows/quality.yml b/.github/workflows/quality.yml index a66e5f9b..87ca1d67 100644 --- a/.github/workflows/quality.yml +++ b/.github/workflows/quality.yml @@ -23,7 +23,7 @@ jobs: COVERALLS_REPO_TOKEN_EXISTS: ${{ secrets.COVERALLS_REPO_TOKEN != '' }} steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up JDK 8 # build with JDK 8 because of issue https://github.com/trautonen/coveralls-maven-plugin/issues/112 uses: actions/setup-java@v3 diff --git a/elasticsearch-evolution-core/src/main/java/com/senacor/elasticsearch/evolution/core/internal/migration/input/MigrationScriptReaderImpl.java b/elasticsearch-evolution-core/src/main/java/com/senacor/elasticsearch/evolution/core/internal/migration/input/MigrationScriptReaderImpl.java index 1e09899f..acbf6e8e 100644 --- a/elasticsearch-evolution-core/src/main/java/com/senacor/elasticsearch/evolution/core/internal/migration/input/MigrationScriptReaderImpl.java +++ b/elasticsearch-evolution-core/src/main/java/com/senacor/elasticsearch/evolution/core/internal/migration/input/MigrationScriptReaderImpl.java @@ -3,8 +3,9 @@ import com.senacor.elasticsearch.evolution.core.api.MigrationException; import com.senacor.elasticsearch.evolution.core.api.migration.MigrationScriptReader; import com.senacor.elasticsearch.evolution.core.internal.model.migration.RawMigrationScript; +import java.util.regex.Pattern; import org.reflections.Reflections; -import org.reflections.scanners.ResourcesScanner; +import org.reflections.scanners.Scanners; import org.reflections.util.ClasspathHelper; import org.reflections.util.ConfigurationBuilder; import org.reflections.util.FilterBuilder; @@ -147,10 +148,13 @@ private Stream readScriptsFromClassPath(String location) { resources = emptySet(); } else { Reflections reflections = new Reflections(new ConfigurationBuilder() - .setScanners(new ResourcesScanner()) + .setScanners(Scanners.Resources) .filterInputsBy(new FilterBuilder().includePackage(locationWithoutPrefixAsPackageNotation)) .setUrls(urls)); - resources = reflections.getResources(this::isValidFilename); + resources = reflections.getResources(Pattern.compile(esMigrationPrefix + ".*")) + .stream() + .filter(path -> isValidFilename(Paths.get(path).getFileName().toString())) + .collect(Collectors.toSet()); } return resources.stream().flatMap(resource -> { diff --git a/pom.xml b/pom.xml index 6db42899..06cd27d0 100644 --- a/pom.xml +++ b/pom.xml @@ -95,16 +95,16 @@ 4.3.0 0.8.8 3.1.0 - 3.5.0 + 3.6.2 1.6.13 - 2.11.0 + 2.15.0 7.5.2 - 0.9.12 - 1.18.0 - 1.18.26 + 0.10.2 + 1.19.1 + 1.18.30 diff --git a/tests/test-spring-boot-2.1-scriptsInJarFile/pom.xml b/tests/test-spring-boot-2.1-scriptsInJarFile/pom.xml index 45442202..3e89c2e1 100644 --- a/tests/test-spring-boot-2.1-scriptsInJarFile/pom.xml +++ b/tests/test-spring-boot-2.1-scriptsInJarFile/pom.xml @@ -16,9 +16,9 @@ 1.8 - 2.11.0 + 2.15.0 7.5.2 - 1.18.0 + 1.19.1 diff --git a/tests/test-spring-boot-2.2/pom.xml b/tests/test-spring-boot-2.2/pom.xml index a54dd264..d4381110 100644 --- a/tests/test-spring-boot-2.2/pom.xml +++ b/tests/test-spring-boot-2.2/pom.xml @@ -16,9 +16,9 @@ 1.8 - 2.11.0 + 2.15.0 7.5.2 - 1.18.0 + 1.19.1 diff --git a/tests/test-spring-boot-2.3/pom.xml b/tests/test-spring-boot-2.3/pom.xml index 8eec2568..4559ec54 100644 --- a/tests/test-spring-boot-2.3/pom.xml +++ b/tests/test-spring-boot-2.3/pom.xml @@ -16,9 +16,9 @@ 1.8 - 2.11.0 + 2.15.0 7.5.2 - 1.18.0 + 1.19.1 diff --git a/tests/test-spring-boot-2.4/pom.xml b/tests/test-spring-boot-2.4/pom.xml index 1ec230a3..6b38135e 100644 --- a/tests/test-spring-boot-2.4/pom.xml +++ b/tests/test-spring-boot-2.4/pom.xml @@ -16,9 +16,9 @@ 1.8 - 2.11.0 + 2.15.0 7.5.2 - 1.18.0 + 1.19.1 diff --git a/tests/test-spring-boot-2.5-scriptsInJarFile/pom.xml b/tests/test-spring-boot-2.5-scriptsInJarFile/pom.xml index f2b8d2ed..33d1e34d 100644 --- a/tests/test-spring-boot-2.5-scriptsInJarFile/pom.xml +++ b/tests/test-spring-boot-2.5-scriptsInJarFile/pom.xml @@ -16,9 +16,9 @@ 1.8 - 2.11.0 + 2.15.0 7.5.2 - 1.18.0 + 1.19.1 diff --git a/tests/test-spring-boot-2.6/pom.xml b/tests/test-spring-boot-2.6/pom.xml index db418261..f29d39d4 100644 --- a/tests/test-spring-boot-2.6/pom.xml +++ b/tests/test-spring-boot-2.6/pom.xml @@ -16,9 +16,9 @@ 1.8 - 2.11.0 + 2.15.0 7.5.2 - 1.18.0 + 1.19.1 diff --git a/tests/test-spring-boot-2.7/pom.xml b/tests/test-spring-boot-2.7/pom.xml index d34ecc8c..f49f874b 100644 --- a/tests/test-spring-boot-2.7/pom.xml +++ b/tests/test-spring-boot-2.7/pom.xml @@ -16,9 +16,9 @@ 1.8 - 2.11.0 + 2.15.0 7.5.2 - 1.18.0 + 1.19.1 diff --git a/tests/test-spring-boot-3.0-scriptsInJarFile/pom.xml b/tests/test-spring-boot-3.0-scriptsInJarFile/pom.xml index a508ff8a..77ad261b 100644 --- a/tests/test-spring-boot-3.0-scriptsInJarFile/pom.xml +++ b/tests/test-spring-boot-3.0-scriptsInJarFile/pom.xml @@ -16,9 +16,9 @@ 17 - 2.11.0 + 2.15.0 7.5.2 - 1.18.0 + 1.19.1