Skip to content
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
2 changes: 1 addition & 1 deletion avaje-jex-freemarker/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<artifactId>avaje-jex-freemarker</artifactId>

<properties>
<freemarker.version>2.3.31</freemarker.version>
<freemarker.version>2.3.33</freemarker.version>
</properties>

<dependencies>
Expand Down
2 changes: 1 addition & 1 deletion avaje-jex-mustache/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<artifactId>avaje-jex-mustache</artifactId>

<properties>
<mustache.version>0.9.10</mustache.version>
<mustache.version>0.9.14</mustache.version>
</properties>

<dependencies>
Expand Down
6 changes: 3 additions & 3 deletions avaje-jex-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,21 @@
<dependency>
<groupId>io.avaje</groupId>
<artifactId>avaje-http-client</artifactId>
<version>2.0</version>
<version>2.8</version>
</dependency>

<!-- dependency injection component testing -->
<dependency>
<groupId>io.avaje</groupId>
<artifactId>avaje-inject-test</artifactId>
<version>9.9</version>
<version>10.6</version>
<optional>true</optional>
</dependency>

<dependency>
<groupId>io.avaje</groupId>
<artifactId>avaje-jsonb</artifactId>
<version>1.9</version>
<version>2.3</version>
<optional>true</optional>
</dependency>

Expand Down
26 changes: 13 additions & 13 deletions avaje-jex-test/src/main/java/io/avaje/jex/test/JexInjectPlugin.java
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
package io.avaje.jex.test;

import java.lang.annotation.Annotation;
import java.lang.reflect.Type;

import io.avaje.http.client.HttpClient;
import io.avaje.inject.BeanScope;
import io.avaje.inject.test.Plugin;
import io.avaje.jex.Jex;

import java.lang.annotation.Annotation;

/**
* avaje-inject-test plugin that:
*
Expand All @@ -20,12 +21,13 @@ public final class JexInjectPlugin implements Plugin {
private static final String AVAJE_HTTP_CLIENT = "io.avaje.http.api.Client";
private static final String AVAJE_HTTP_PATH = "io.avaje.http.api.Path";

/**
* Return true if it's a http client this plugin supports.
*/
/** Return true if it's a http client this plugin supports. */
@Override
public boolean forType(Class<?> type) {
return HttpClient.class.equals(type) || isHttpClientApi(type);
public boolean forType(Type type) {

if (!(type instanceof Class<?> clazz)) return false;

return HttpClient.class.equals(clazz) || isHttpClientApi(clazz);
}

private boolean isHttpClientApi(Class<?> type) {
Expand All @@ -34,10 +36,7 @@ private boolean isHttpClientApi(Class<?> type) {
}
for (Annotation annotation : type.getAnnotations()) {
String name = annotation.annotationType().getName();
if (AVAJE_HTTP_CLIENT.equals(name)) {
return true;
}
if (AVAJE_HTTP_PATH.equals(name)) {
if (AVAJE_HTTP_CLIENT.equals(name) || AVAJE_HTTP_PATH.equals(name)) {
return true;
}
}
Expand Down Expand Up @@ -76,11 +75,12 @@ private static class LocalScope implements Plugin.Scope {
}

@Override
public Object create(Class<?> type) {
public Object create(Type type) {

if (HttpClient.class.equals(type)) {
return httpClient;
}
return apiClient(type);
return apiClient((Class<?>) type);
}

private Object apiClient(Class<?> clientInterface) {
Expand Down
2 changes: 1 addition & 1 deletion avaje-jex/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<dependency>
<groupId>io.avaje</groupId>
<artifactId>avaje-config</artifactId>
<version>3.9</version>
<version>4.0</version>
<optional>true</optional>
</dependency>

Expand Down
10 changes: 5 additions & 5 deletions examples/example-jdk-jsonb/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>org.avaje</groupId>
<artifactId>java11-oss</artifactId>
<version>3.9</version>
<version>4.5</version>
<relativePath/>
</parent>

Expand All @@ -19,7 +19,7 @@
<!-- <maven.compiler.target>18</maven.compiler.target>-->
<!-- <javadoc.source>11</javadoc.source>-->
<java.release>17</java.release>
<native.maven.plugin.version>0.9.16</native.maven.plugin.version>
<native.maven.plugin.version>0.10.3</native.maven.plugin.version>
</properties>

<dependencies>
Expand All @@ -33,7 +33,7 @@
<dependency>
<groupId>io.avaje</groupId>
<artifactId>avaje-jsonb</artifactId>
<version>1.4</version>
<version>2.3</version>
</dependency>
</dependencies>

Expand All @@ -43,7 +43,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.10.1</version>
<version>3.13.0</version>
<configuration>
<release>17</release>
<!-- <compilerArgs>-->
Expand All @@ -53,7 +53,7 @@
<path>
<groupId>io.avaje</groupId>
<artifactId>avaje-jsonb-generator</artifactId>
<version>1.4</version>
<version>2.3</version>
</path>
</annotationProcessorPaths>
</configuration>
Expand Down
12 changes: 6 additions & 6 deletions examples/example-jdk/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>org.avaje</groupId>
<artifactId>java11-oss</artifactId>
<version>3.9</version>
<version>4.5</version>
<relativePath/>
</parent>

Expand All @@ -30,19 +30,19 @@
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.14.0</version>
<version>2.18.1</version>
</dependency>

<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.36</version>
<version>2.0.16</version>
</dependency>

<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.2.11</version>
<version>1.5.12</version>
</dependency>

</dependencies>
Expand All @@ -52,15 +52,15 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<version>3.13.0</version>
<configuration>
<release>${java.release}</release>
</configuration>
</plugin>
<plugin>
<groupId>io.repaint.maven</groupId>
<artifactId>tiles-maven-plugin</artifactId>
<version>2.22</version>
<version>2.40</version>
<extensions>true</extensions>
<configuration>
<tiles>
Expand Down
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

<properties>
<nexus.staging.autoReleaseAfterClose>true</nexus.staging.autoReleaseAfterClose>
<jackson.version>2.15.0</jackson.version>
<jackson.version>2.18.1</jackson.version>
<surefire.useModulePath>false</surefire.useModulePath>
<maven.compiler.release>21</maven.compiler.release>
<project.build.outputTimestamp>2024-10-25T04:21:12Z</project.build.outputTimestamp>
Expand All @@ -38,14 +38,14 @@
<dependency>
<groupId>io.avaje</groupId>
<artifactId>junit</artifactId>
<version>1.3</version>
<version>1.5</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>io.avaje</groupId>
<artifactId>avaje-http-client</artifactId>
<version>2.0</version>
<version>2.8</version>
<scope>test</scope>
</dependency>

Expand Down