HHH-9902 - fix gradle plugin
This commit is contained in:
parent
6ef981edf8
commit
d50258f424
|
@ -18,9 +18,6 @@ import java.net.URLClassLoader;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javax.persistence.Embedded;
|
||||
import javax.persistence.Entity;
|
||||
|
||||
import javassist.ClassPool;
|
||||
import javassist.CtClass;
|
||||
import javassist.CtField;
|
||||
|
@ -127,14 +124,16 @@ public class HibernatePlugin implements Plugin<Project> {
|
|||
|
||||
final CtClass ctClass = toCtClass( file, classPool );
|
||||
|
||||
if ( !ctClass.hasAnnotation( Entity.class )
|
||||
&& !ctClass.hasAnnotation( Embedded.class ) ) {
|
||||
logger.debug( "Skipping class file [" + file.getAbsolutePath() + "], not an entity nor embedded" );
|
||||
if ( !enhancementContext.isEntityClass( ctClass )
|
||||
&& !enhancementContext.isCompositeClass( ctClass ) ) {
|
||||
logger.info( "Skipping class [" + file.getAbsolutePath() + "], not an entity nor embeddable" );
|
||||
continue;
|
||||
}
|
||||
|
||||
final byte[] enhancedBytecode = doEnhancement( ctClass, enhancer );
|
||||
writeOutEnhancedClass( enhancedBytecode, ctClass, file );
|
||||
|
||||
logger.info( "Successfully enhanced class [" + ctClass.getName() + "]" );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue