diff --git a/.github/workflows/jdk-ea-stable.yml b/.github/workflows/jdk-ea-stable.yml index 6f2383e62..a6c44f00f 100644 --- a/.github/workflows/jdk-ea-stable.yml +++ b/.github/workflows/jdk-ea-stable.yml @@ -2,11 +2,11 @@ name: JDK EA Stable on: + push: + pull_request: workflow_dispatch: -# push: -# pull_request: -# schedule: -# - cron: '39 1 * * 1,3,5' + schedule: + - cron: '39 1 * * 1,3,5' jobs: build: diff --git a/htmx-nima-jstache/pom.xml b/htmx-nima-jstache/pom.xml index 86faa8892..522c21397 100644 --- a/htmx-nima-jstache/pom.xml +++ b/htmx-nima-jstache/pom.xml @@ -43,5 +43,12 @@ provided true + + io.avaje + avaje-spi-service + 2.5 + provided + true + diff --git a/htmx-nima-jstache/src/main/java/io/avaje/htmx/nima/jstache/DefaultTemplateProvider.java b/htmx-nima-jstache/src/main/java/io/avaje/htmx/nima/jstache/DefaultTemplateProvider.java index 41fc8161e..c74e0f617 100644 --- a/htmx-nima-jstache/src/main/java/io/avaje/htmx/nima/jstache/DefaultTemplateProvider.java +++ b/htmx-nima-jstache/src/main/java/io/avaje/htmx/nima/jstache/DefaultTemplateProvider.java @@ -3,12 +3,14 @@ import io.avaje.htmx.nima.TemplateContentCache; import io.avaje.htmx.nima.TemplateRender; import io.avaje.inject.BeanScopeBuilder; -import io.avaje.inject.spi.Plugin; +import io.avaje.inject.spi.InjectPlugin; +import io.avaje.spi.ServiceProvider; /** * Plugin for avaje inject that provides a default TemplateRender instance. */ -public final class DefaultTemplateProvider implements Plugin { +@ServiceProvider +public final class DefaultTemplateProvider implements InjectPlugin { @Override public Class[] provides() { diff --git a/htmx-nima-jstache/src/main/java/module-info.java b/htmx-nima-jstache/src/main/java/module-info.java index 2da4668b1..88d587079 100644 --- a/htmx-nima-jstache/src/main/java/module-info.java +++ b/htmx-nima-jstache/src/main/java/module-info.java @@ -5,7 +5,8 @@ requires transitive io.avaje.htmx.nima; requires transitive io.helidon.webserver; requires transitive io.jstach.jstachio; - requires io.avaje.inject; + requires transitive io.avaje.inject; + requires static io.avaje.spi; - provides io.avaje.inject.spi.Plugin with io.avaje.htmx.nima.jstache.DefaultTemplateProvider; + provides io.avaje.inject.spi.InjectExtension with io.avaje.htmx.nima.jstache.DefaultTemplateProvider; } diff --git a/htmx-nima-jstache/src/main/resources/META-INF/services/io.avaje.inject.spi.Plugin b/htmx-nima-jstache/src/main/resources/META-INF/services/io.avaje.inject.spi.Plugin deleted file mode 100644 index 456aa71f2..000000000 --- a/htmx-nima-jstache/src/main/resources/META-INF/services/io.avaje.inject.spi.Plugin +++ /dev/null @@ -1 +0,0 @@ -io.avaje.htmx.nima.jstache.DefaultTemplateProvider diff --git a/http-inject-plugin/pom.xml b/http-inject-plugin/pom.xml index d13cf8290..a21ecbe9f 100644 --- a/http-inject-plugin/pom.xml +++ b/http-inject-plugin/pom.xml @@ -26,10 +26,17 @@ io.avaje avaje-http-api - 1.37 + 2.7 true provided + + io.avaje + avaje-spi-service + 2.5 + provided + true + diff --git a/http-inject-plugin/src/main/java/io/avaje/http/inject/DefaultResolverProvider.java b/http-inject-plugin/src/main/java/io/avaje/http/inject/DefaultResolverProvider.java index 56b5ad2f2..b22eb7714 100644 --- a/http-inject-plugin/src/main/java/io/avaje/http/inject/DefaultResolverProvider.java +++ b/http-inject-plugin/src/main/java/io/avaje/http/inject/DefaultResolverProvider.java @@ -3,10 +3,12 @@ import io.avaje.http.api.context.RequestContextResolver; import io.avaje.http.api.context.ThreadLocalRequestContextResolver; import io.avaje.inject.BeanScopeBuilder; -import io.avaje.inject.spi.Plugin; +import io.avaje.inject.spi.InjectPlugin; +import io.avaje.spi.ServiceProvider; /** Plugin for avaje inject that provides a default RequestContextResolver instance. */ -public final class DefaultResolverProvider implements Plugin { +@ServiceProvider +public final class DefaultResolverProvider implements InjectPlugin { @Override public Class[] provides() { diff --git a/http-inject-plugin/src/main/java/module-info.java b/http-inject-plugin/src/main/java/module-info.java index c8149f2fe..e13c5e735 100644 --- a/http-inject-plugin/src/main/java/module-info.java +++ b/http-inject-plugin/src/main/java/module-info.java @@ -1,8 +1,8 @@ module io.avaje.http.plugin { - requires io.avaje.http.api; - requires io.avaje.inject; - - provides io.avaje.inject.spi.Plugin with io.avaje.http.inject.DefaultResolverProvider; + requires io.avaje.http.api; + requires io.avaje.inject; + requires static io.avaje.spi; + provides io.avaje.inject.spi.InjectExtension with io.avaje.http.inject.DefaultResolverProvider; } diff --git a/http-inject-plugin/src/main/resources/META-INF/services/io.avaje.inject.spi.Plugin b/http-inject-plugin/src/main/resources/META-INF/services/io.avaje.inject.spi.Plugin deleted file mode 100644 index d996e4e0c..000000000 --- a/http-inject-plugin/src/main/resources/META-INF/services/io.avaje.inject.spi.Plugin +++ /dev/null @@ -1 +0,0 @@ -io.avaje.http.inject.DefaultResolverProvider diff --git a/pom.xml b/pom.xml index 05a50c367..7a9ea7749 100644 --- a/pom.xml +++ b/pom.xml @@ -61,7 +61,7 @@ jdk21plus - [21,22] + [21,) htmx-nima diff --git a/tests/pom.xml b/tests/pom.xml index a7c1889be..56d534912 100644 --- a/tests/pom.xml +++ b/tests/pom.xml @@ -33,7 +33,7 @@ jdk21plus - [21,22] + [21,) test-nima