Skip to content

Commit 6bb1dc6

Browse files
authored
Fix Hard Inject Dependency (use cyclical plugin module) (#212)
* plugin * dir * Delete io.avaje.inject.spi.Plugin * working
1 parent a59d850 commit 6bb1dc6

File tree

8 files changed

+60
-11
lines changed

8 files changed

+60
-11
lines changed

http-api/pom.xml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,8 @@
1818
<dependencies>
1919
<dependency>
2020
<groupId>io.avaje</groupId>
21-
<artifactId>avaje-inject</artifactId>
22-
<version>9.0</version>
23-
<scope>provided</scope>
24-
<optional>true</optional>
21+
<artifactId>avaje-http-inject-plugin</artifactId>
22+
<version>${project.version}</version>
2523
</dependency>
2624
</dependencies>
2725

http-api/src/main/java/module-info.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,4 @@
22

33
exports io.avaje.http.api;
44
exports io.avaje.http.api.context;
5-
exports io.avaje.http.api.spi;
6-
requires static io.avaje.inject;
7-
8-
provides io.avaje.inject.spi.Plugin with io.avaje.http.api.spi.DefaultResolverProvider;
9-
105
}

http-api/src/main/resources/META-INF/services/io.avaje.inject.spi.Plugin

Lines changed: 0 additions & 1 deletion
This file was deleted.

http-inject-plugin/pom.xml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
4+
<parent>
5+
<groupId>io.avaje</groupId>
6+
<artifactId>avaje-http-parent</artifactId>
7+
<version>1.38-SNAPSHOT</version>
8+
<relativePath>..</relativePath>
9+
</parent>
10+
11+
<artifactId>avaje-http-inject-plugin</artifactId>
12+
13+
<scm>
14+
<developerConnection>scm:git:[email protected]:avaje/avaje-http.git</developerConnection>
15+
<tag>avaje-http-parent-1.19</tag>
16+
</scm>
17+
18+
<dependencies>
19+
<dependency>
20+
<groupId>io.avaje</groupId>
21+
<artifactId>avaje-inject</artifactId>
22+
<version>9.0</version>
23+
<scope>provided</scope>
24+
<optional>true</optional>
25+
</dependency>
26+
<dependency>
27+
<groupId>io.avaje</groupId>
28+
<artifactId>avaje-http-api</artifactId>
29+
<version>1.37</version>
30+
<optional>true</optional>
31+
<scope>provided</scope>
32+
</dependency>
33+
</dependencies>
34+
35+
<build>
36+
<plugins>
37+
<plugin>
38+
<groupId>org.apache.maven.plugins</groupId>
39+
<artifactId>maven-surefire-plugin</artifactId>
40+
<version>3.0.0</version>
41+
<configuration>
42+
<forkCount>0</forkCount>
43+
</configuration>
44+
</plugin>
45+
</plugins>
46+
</build>
47+
</project>

http-api/src/main/java/io/avaje/http/api/spi/DefaultResolverProvider.java renamed to http-inject-plugin/src/main/java/io/avaje/http/inject/DefaultResolverProvider.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package io.avaje.http.api.spi;
1+
package io.avaje.http.inject;
22

33
import io.avaje.http.api.context.RequestContextResolver;
44
import io.avaje.http.api.context.ThreadLocalRequestContextResolver;
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
module io.avaje.http.plugin {
2+
3+
requires io.avaje.http.api;
4+
requires io.avaje.inject;
5+
6+
provides io.avaje.inject.spi.Plugin with io.avaje.http.inject.DefaultResolverProvider;
7+
8+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
io.avaje.http.inject.DefaultResolverProvider

pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
<module>http-api</module>
3939
<module>http-client</module>
4040
<module>http-client-gson-adapter</module>
41+
<module>http-inject-plugin</module>
4142
<module>http-generator-core</module>
4243
<module>http-generator-javalin</module>
4344
<module>http-generator-jex</module>

0 commit comments

Comments
 (0)