Skip to content

Use Non-Deprecated Inject Plugin #491

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Aug 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/jdk-ea-stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
7 changes: 7 additions & 0 deletions htmx-nima-jstache/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,12 @@
<scope>provided</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>io.avaje</groupId>
<artifactId>avaje-spi-service</artifactId>
<version>2.5</version>
<scope>provided</scope>
<optional>true</optional>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
5 changes: 3 additions & 2 deletions htmx-nima-jstache/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

This file was deleted.

9 changes: 8 additions & 1 deletion http-inject-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,17 @@
<dependency>
<groupId>io.avaje</groupId>
<artifactId>avaje-http-api</artifactId>
<version>1.37</version>
<version>2.7</version>
<optional>true</optional>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.avaje</groupId>
<artifactId>avaje-spi-service</artifactId>
<version>2.5</version>
<scope>provided</scope>
<optional>true</optional>
</dependency>
</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
8 changes: 4 additions & 4 deletions http-inject-plugin/src/main/java/module-info.java
Original file line number Diff line number Diff line change
@@ -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;
}

This file was deleted.

2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
<profile>
<id>jdk21plus</id>
<activation>
<jdk>[21,22]</jdk>
<jdk>[21,)</jdk>
</activation>
<modules>
<module>htmx-nima</module>
Expand Down
2 changes: 1 addition & 1 deletion tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<profile>
<id>jdk21plus</id>
<activation>
<jdk>[21,22]</jdk>
<jdk>[21,)</jdk>
</activation>
<modules>
<module>test-nima</module>
Expand Down