From d9df50c6cd4c5b126b621dd932f1a0611baf4b7b Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Fri, 24 Oct 2014 10:39:59 +0200 Subject: [PATCH] @Entity no longer required with spring-aspect This commits complements 222d2b1 for another required dependency. javax.persistence.Entity was previously required, regardless of which aspects were actually used by the project. It is now optional and will not break the build if it is not present. Note that the side effect is that AnnotationDrivenStaticEntityMockingControl is disabled as well if the JPA API is not available. Issue: SPR-6819 --- .../staticmock/AnnotationDrivenStaticEntityMockingControl.aj | 3 +++ 1 file changed, 3 insertions(+) diff --git a/spring-aspects/src/main/java/org/springframework/mock/staticmock/AnnotationDrivenStaticEntityMockingControl.aj b/spring-aspects/src/main/java/org/springframework/mock/staticmock/AnnotationDrivenStaticEntityMockingControl.aj index f29cc82822..eec0e00d4b 100644 --- a/spring-aspects/src/main/java/org/springframework/mock/staticmock/AnnotationDrivenStaticEntityMockingControl.aj +++ b/spring-aspects/src/main/java/org/springframework/mock/staticmock/AnnotationDrivenStaticEntityMockingControl.aj @@ -16,6 +16,8 @@ package org.springframework.mock.staticmock; +import org.aspectj.lang.annotation.RequiredTypes; + /** * Annotation-based aspect to use in test builds to enable mocking of static methods * on JPA-annotated {@code @Entity} classes, as used by Spring Roo for so-called @@ -57,6 +59,7 @@ package org.springframework.mock.staticmock; * @author Sam Brannen * @see MockStaticEntityMethods */ +@RequiredTypes("javax.persistence.Entity") public aspect AnnotationDrivenStaticEntityMockingControl extends AbstractMethodMockingControl { /**