Skip to content

Commit b0b2960

Browse files
committed
Merge remote-tracking branch 'upstream/master' into tidy-deprecations
2 parents eaf6f3d + aac8204 commit b0b2960

File tree

50 files changed

+700
-249
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+700
-249
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,6 @@ jobs:
3333
- name: Maven version
3434
run: mvn --version
3535
- name: Build with Maven
36-
run: mvn clean test
36+
run: mvn clean install && mvn clean verify artifact:compare
3737
- name: Build with Maven (javax)
38-
run: ./jakarta-to-javax.sh && mvn clean test && ./javax-to-jakarta.sh
38+
run: ./jakarta-to-javax.sh && mvn clean install && mvn clean verify artifact:compare && ./javax-to-jakarta.sh

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
[![Build](https://github.com/avaje/avaje-inject/actions/workflows/build.yml/badge.svg)](https://github.com/avaje/avaje-inject/actions/workflows/build.yml)
33
[![JDK EA](https://github.com/avaje/avaje-inject/actions/workflows/jdk-ea.yml/badge.svg)](https://github.com/avaje/avaje-inject/actions/workflows/jdk-ea.yml)
44
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/avaje/avaje-inject/blob/master/LICENSE)
5-
[![Maven Central : avaje-inject](https://img.shields.io/maven-central/v/io.avaje/avaje-inject.svg?label=Maven%20Central)](https://maven-badges.herokuapp.com/maven-central/io.avaje/avaje-inject)
5+
[![Maven Central](https://img.shields.io/maven-central/v/io.avaje/avaje-inject.svg?label=Maven%20Central)](https://mvnrepository.com/artifact/io.avaje/avaje-inject)
66
[![javadoc](https://javadoc.io/badge2/io.avaje/avaje-inject/javadoc.svg?color=purple)](https://javadoc.io/doc/io.avaje/avaje-inject)
77

88
# [Avaje-Inject](https://avaje.io/inject)

blackbox-aspect/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<artifactId>avaje-inject-parent</artifactId>
77
<groupId>io.avaje</groupId>
8-
<version>10.4-RC1</version>
8+
<version>10.6-SNAPSHOT</version>
99
</parent>
1010
<modelVersion>4.0.0</modelVersion>
1111

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
1+
import org.example.external.aspect.spi.AspectPlugin;
2+
13
module blackbox.aspect {
24

5+
exports org.example.external.aspect;
6+
exports org.example.external.aspect.sub;
7+
38
requires io.avaje.inject;
49
requires io.avaje.inject.aop;
510

6-
//remove this and compilation fails
7-
provides io.avaje.inject.spi.InjectExtension with org.example.external.aspect.sub.ExampleExternalAspectModule;
11+
provides io.avaje.inject.spi.InjectExtension with AspectPlugin, org.example.external.aspect.sub.ExampleExternalAspectModule;
812

913
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
package org.example.external.aspect;
2+
3+
public class PluginProvidedClass {}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
package org.example.external.aspect.spi;
2+
3+
import org.example.external.aspect.PluginProvidedClass;
4+
5+
import io.avaje.inject.BeanScopeBuilder;
6+
import io.avaje.inject.spi.InjectPlugin;
7+
import io.avaje.inject.spi.PluginProvides;
8+
9+
@PluginProvides(PluginProvidedClass.class)
10+
public class AspectPlugin implements InjectPlugin {
11+
12+
@Override
13+
public Class<?>[] provides() {
14+
return new Class<?>[] {PluginProvidedClass.class};
15+
}
16+
17+
@Override
18+
public void apply(BeanScopeBuilder builder) {
19+
builder.beans(new PluginProvidedClass());
20+
}
21+
}

blackbox-other/pom.xml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<artifactId>avaje-inject-parent</artifactId>
88
<groupId>io.avaje</groupId>
9-
<version>10.4-RC1</version>
9+
<version>10.6-SNAPSHOT</version>
1010
</parent>
1111

1212
<artifactId>blackbox-other</artifactId>
@@ -35,5 +35,20 @@
3535
</dependency>
3636

3737
</dependencies>
38+
<build>
39+
<plugins>
40+
<plugin>
41+
<groupId>org.apache.maven.plugins</groupId>
42+
<artifactId>maven-jar-plugin</artifactId>
43+
<configuration>
44+
<archive>
45+
<manifestEntries>
46+
<Automatic-Module-Name>blackbox.other</Automatic-Module-Name>
47+
</manifestEntries>
48+
</archive>
49+
</configuration>
50+
</plugin>
51+
</plugins>
52+
</build>
3853

3954
</project>

blackbox-test-inject/pom.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<artifactId>avaje-inject-parent</artifactId>
77
<groupId>io.avaje</groupId>
8-
<version>10.4-RC1</version>
8+
<version>10.6-SNAPSHOT</version>
99
</parent>
1010
<modelVersion>4.0.0</modelVersion>
1111

@@ -29,7 +29,7 @@
2929
<dependency>
3030
<groupId>io.avaje</groupId>
3131
<artifactId>avaje-jsonb</artifactId>
32-
<version>2.1</version>
32+
<version>2.3</version>
3333
</dependency>
3434

3535
<dependency>
@@ -47,7 +47,7 @@
4747
<dependency>
4848
<groupId>io.avaje</groupId>
4949
<artifactId>avaje-spi-service</artifactId>
50-
<version>2.6</version>
50+
<version>2.8</version>
5151
</dependency>
5252

5353
<dependency>
@@ -89,7 +89,7 @@
8989
</dependencies>
9090
<build>
9191
<plugins>
92-
<plugin>
92+
<!-- <plugin>
9393
<groupId>io.avaje</groupId>
9494
<artifactId>avaje-inject-maven-plugin</artifactId>
9595
<version>${project.version}</version>
@@ -101,7 +101,7 @@
101101
</goals>
102102
</execution>
103103
</executions>
104-
</plugin>
104+
</plugin> -->
105105
<plugin>
106106
<groupId>org.apache.maven.plugins</groupId>
107107
<artifactId>maven-compiler-plugin</artifactId>
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import org.example.myapp.ConfigPropertiesPlugin;
2+
import org.example.myapp.MyServiceIface;
3+
import org.example.myapp.MyServiceImpl;
4+
5+
import io.avaje.inject.spi.InjectExtension;
6+
7+
module blackbox.test.inject {
8+
9+
requires blackbox.aspect;
10+
requires blackbox.other;
11+
requires io.avaje.config;
12+
requires io.avaje.inject;
13+
requires io.avaje.inject.aop;
14+
requires io.avaje.inject.events;
15+
requires io.avaje.jsonb;
16+
requires io.github.resilience4j.annotations;
17+
requires io.github.resilience4j.core;
18+
requires io.github.resilience4j.retry;
19+
requires java.desktop;
20+
requires org.jspecify;
21+
requires vavr;
22+
23+
requires static io.avaje.spi;
24+
25+
provides InjectExtension with org.example.myapp.CompiledOrder, ConfigPropertiesPlugin, org.example.myapp.MyappModule;
26+
provides MyServiceIface with MyServiceImpl;
27+
}

blackbox-test-inject/src/main/java/org/example/myapp/lazy/LazyBean.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ public class LazyBean {
1717

1818
@Inject @Nullable AtomicBoolean initialized;
1919

20+
public LazyBean() throws Exception {}
21+
2022
@PostConstruct
2123
void init(BeanScope scope) {
2224
// note that nested test scopes will not be lazy

0 commit comments

Comments
 (0)