Repository: avaje/avaje-inject
Pull request #239 (2022-07-08 02:19:41)

Modify Generated annotation to be retention CLASS, bump dependency for test mockito-core


Patch:
diff --git a/inject/pom.xml b/inject/pom.xml
index d285c208..e42dcd88 100644
--- a/inject/pom.xml
+++ b/inject/pom.xml
@@ -22,13 +22,19 @@
     <dependency>
       <groupId>io.avaje</groupId>
       <artifactId>avaje-lang</artifactId>
+      <version>1.1</version>
+    </dependency>
+
+    <dependency>
+      <groupId>io.avaje</groupId>
+      <artifactId>avaje-applog</artifactId>
       <version>1.0</version>
     </dependency>
 
     <dependency>
       <groupId>org.mockito</groupId>
       <artifactId>mockito-core</artifactId>
-      <version>4.6.0</version>
+      <version>4.6.1</version>
       <optional>true</optional>
     </dependency>
 
diff --git a/inject/src/main/java/io/avaje/inject/DBeanScopeBuilder.java b/inject/src/main/java/io/avaje/inject/DBeanScopeBuilder.java
index 84c166d3..a01febe4 100644
--- a/inject/src/main/java/io/avaje/inject/DBeanScopeBuilder.java
+++ b/inject/src/main/java/io/avaje/inject/DBeanScopeBuilder.java
@@ -1,5 +1,6 @@
 package io.avaje.inject;
 
+import io.avaje.applog.AppLog;
 import io.avaje.inject.spi.Builder;
 import io.avaje.inject.spi.EnrichBean;
 import io.avaje.inject.spi.Module;
@@ -18,7 +19,7 @@ import java.util.function.Consumer;
 @NonNullApi
 class DBeanScopeBuilder implements BeanScopeBuilder.ForTesting {
 
-  private static final System.Logger log = System.getLogger("io.avaje.inject");
+  private static final System.Logger log = AppLog.getLogger("io.avaje.inject");
 
   @SuppressWarnings("rawtypes")
   private final List<SuppliedBean> suppliedBeans = new ArrayList<>();
diff --git a/inject/src/main/java/io/avaje/inject/aop/Aspect.java b/inject/src/main/java/io/avaje/inject/aop/Aspect.java
index e91e616c..0b580c4a 100644
--- a/inject/src/main/java/io/avaje/inject/aop/Aspect.java
+++ b/inject/src/main/java/io/avaje/inject/aop/Aspect.java
@@ -26,8 +26,8 @@ public @interface Aspect {
    * Specify the priority ordering when multiple aspects are on a method.
    * <p>
    * When multiple aspects are on a method they are nested. The highest
-   * {@link #ordering()} value will be the outer-most aspect, the lowest
-   * ordering will be the inner-most aspect.
+   * ordering value will be the outer-most aspect, the lowest ordering will
+   * be the inner-most aspect.
    * <p>
    * The outer-most aspect will have it's <em>before</em> executed first,
    * followed by the <em>before</em> of the inner nested aspects ultimately
diff --git a/inject/src/main/java/io/avaje/inject/spi/DBeanScope.java b/inject/src/main/java/io/avaje/inject/spi/DBeanScope.java
index 5c21093a..6de752f3 100644
--- a/inject/src/main/java/io/avaje/inject/spi/DBeanScope.java
+++ b/inject/src/main/java/io/avaje/inject/spi/DBeanScope.java
@@ -1,5 +1,6 @@
 package io.avaje.inject.spi;
 
+import io.avaje.applog.AppLog;
 import io.avaje.inject.BeanEntry;
 import io.avaje.inject.BeanScope;
 import io.avaje.inject.Priority;
@@ -15,7 +16,7 @@ import java.util.concurrent.locks.ReentrantLock;
 @NonNullApi
 class DBeanScope implements BeanScope {
 
-  private static final System.Logger log = System.getLogger("io.avaje.inject");
+  private static final System.Logger log = AppLog.getLogger("io.avaje.inject");
 
   private final ReentrantLock lock = new ReentrantLock();
   private final List<Runnable> postConstruct;
diff --git a/inject/src/main/java/io/avaje/inject/spi/DependencyMeta.java b/inject/src/main/java/io/avaje/inject/spi/DependencyMeta.java
index dc24d148..99fb06a5 100644
--- a/inject/src/main/java/io/avaje/inject/spi/DependencyMeta.java
+++ b/inject/src/main/java/io/avaje/inject/spi/DependencyMeta.java
@@ -1,8 +1,15 @@
 package io.avaje.inject.spi;
 
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
 /**
- * Hold bean dependency meta data intended for internal use by code generation (Java annotation processing).
+ * Hold bean dependency metadata intended for internal use by code generation (Java annotation processing).
  */
+@Target(ElementType.METHOD)
+@Retention(RetentionPolicy.CLASS)
 public @interface DependencyMeta {
 
   /**
diff --git a/inject/src/main/java/io/avaje/inject/spi/Generated.java b/inject/src/main/java/io/avaje/inject/spi/Generated.java
index 6e9587ed..995d6e81 100644
--- a/inject/src/main/java/io/avaje/inject/spi/Generated.java
+++ b/inject/src/main/java/io/avaje/inject/spi/Generated.java
@@ -9,7 +9,7 @@ import java.lang.annotation.Target;
  * Marks source code that has been generated.
  */
 @Target(ElementType.TYPE)
-@Retention(RetentionPolicy.RUNTIME)
+@Retention(RetentionPolicy.CLASS)
 public @interface Generated {
 
   /**
diff --git a/inject/src/main/java/module-info.java b/inject/src/main/java/module-info.java
index c2c6b7e1..2200e2b6 100644
--- a/inject/src/main/java/module-info.java
+++ b/inject/src/main/java/module-info.java
@@ -5,6 +5,7 @@ module io.avaje.inject {
   exports io.avaje.inject.spi;
 
   requires transitive io.avaje.lang;
+  requires transitive io.avaje.applog;
   requires transitive jakarta.inject;
   requires static org.mockito;
 


Test patch:
diff --git a/inject-test/pom.xml b/inject-test/pom.xml
index 6d3fdbdb..09579522 100644
--- a/inject-test/pom.xml
+++ b/inject-test/pom.xml
@@ -11,7 +11,7 @@
 
   <properties>
     <jupiter.version>5.8.2</jupiter.version>
-    <mockito.version>4.6.0</mockito.version>
+    <mockito.version>4.6.1</mockito.version>
   </properties>
 
   <dependencies>
@@ -58,14 +58,14 @@
     <dependency>
       <groupId>io.avaje</groupId>
       <artifactId>avaje-http-api</artifactId>
-      <version>1.11</version>
+      <version>1.17</version>
       <scope>test</scope>
     </dependency>
 
     <dependency>
       <groupId>io.avaje</groupId>
       <artifactId>avaje-jex</artifactId>
-      <version>2.1</version>
+      <version>2.2</version>
       <scope>test</scope>
     </dependency>
 
@@ -79,7 +79,7 @@
     <dependency>
       <groupId>io.javalin</groupId>
       <artifactId>javalin</artifactId>
-      <version>4.6.0</version>
+      <version>4.6.1</version>
       <scope>test</scope>
     </dependency>
 
diff --git a/inject-test/src/main/java/io/avaje/inject/test/InjectExtension.java b/inject-test/src/main/java/io/avaje/inject/test/InjectExtension.java
index 7640e40f..16db27b2 100644
--- a/inject-test/src/main/java/io/avaje/inject/test/InjectExtension.java
+++ b/inject-test/src/main/java/io/avaje/inject/test/InjectExtension.java
@@ -1,5 +1,6 @@
 package io.avaje.inject.test;
 
+import io.avaje.applog.AppLog;
 import io.avaje.inject.BeanScope;
 import org.junit.jupiter.api.extension.*;
 import org.junit.jupiter.api.extension.ExtensionContext.Namespace;
@@ -15,7 +16,7 @@ import java.util.concurrent.locks.ReentrantLock;
  */
 public class InjectExtension implements BeforeAllCallback, AfterAllCallback, BeforeEachCallback, AfterEachCallback, ExtensionContext.Store.CloseableResource {
 
-  private static final System.Logger log = System.getLogger("io.avaje.inject");
+  private static final System.Logger log = AppLog.getLogger("io.avaje.inject");
   private static final Namespace INJECT_NS = Namespace.create("io.avaje.inject.InjectTest");
   private static final String BEAN_SCOPE = "BEAN_SCOPE";
   private static final String META = "META";