HHH-9902 - fix gradle plugin

This commit is contained in:
barreiro 2015-07-08 04:44:38 +01:00
parent 6ef981edf8
commit d50258f424
1 changed files with 5 additions and 6 deletions

View File

@ -18,9 +18,6 @@ import java.net.URLClassLoader;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import javax.persistence.Embedded;
import javax.persistence.Entity;
import javassist.ClassPool; import javassist.ClassPool;
import javassist.CtClass; import javassist.CtClass;
import javassist.CtField; import javassist.CtField;
@ -127,14 +124,16 @@ public class HibernatePlugin implements Plugin<Project> {
final CtClass ctClass = toCtClass( file, classPool ); final CtClass ctClass = toCtClass( file, classPool );
if ( !ctClass.hasAnnotation( Entity.class ) if ( !enhancementContext.isEntityClass( ctClass )
&& !ctClass.hasAnnotation( Embedded.class ) ) { && !enhancementContext.isCompositeClass( ctClass ) ) {
logger.debug( "Skipping class file [" + file.getAbsolutePath() + "], not an entity nor embedded" ); logger.info( "Skipping class [" + file.getAbsolutePath() + "], not an entity nor embeddable" );
continue; continue;
} }
final byte[] enhancedBytecode = doEnhancement( ctClass, enhancer ); final byte[] enhancedBytecode = doEnhancement( ctClass, enhancer );
writeOutEnhancedClass( enhancedBytecode, ctClass, file ); writeOutEnhancedClass( enhancedBytecode, ctClass, file );
logger.info( "Successfully enhanced class [" + ctClass.getName() + "]" );
} }
} }
} }