88import net .bytebuddy .agent .ByteBuddyAgent ;
99import net .bytebuddy .asm .Advice ;
1010import net .bytebuddy .dynamic .loading .ClassReloadingStrategy ;
11- import org .apache .maven .plugin .logging .SystemStreamLog ;
1211
1312import javax .annotation .processing .Completion ;
1413import javax .annotation .processing .ProcessingEnvironment ;
3130import static net .bytebuddy .matcher .ElementMatchers .takesArguments ;
3231
3332public class JabelJavacProcessor implements Processor {
34- private static org .apache .maven .plugin .logging .Log log = new SystemStreamLog ();
3533
3634 /**
3735 * Set of the all the features we want to force enable in our 8 target
@@ -69,12 +67,12 @@ public class JabelJavacProcessor implements Processor {
6967 static {
7068 // log that we've started, otherwise if there's certain types of errors, no output is seen at all from Jabel (e.g. errors compiling our code)
7169 // helps for verifying Jabel is being picked up correctly from project settings
72- log . info ("Jabel static initialising ByteBuddy" );
70+ logInfo ("Jabel static initialising ByteBuddy" );
7371
7472 ByteBuddyAgent .install ();
7573 ByteBuddy byteBuddy = new ByteBuddy ();
7674
77- log . info ("Disabling source level check" );
75+ logInfo ("Disabling source level check" );
7876 /**
7977 * Inject our code into the JDK version checks
8078 *
@@ -92,15 +90,15 @@ public class JabelJavacProcessor implements Processor {
9290 .load (clazz .getClassLoader (), ClassReloadingStrategy .fromInstalledAgent ());
9391 }
9492
95- log . info ("Disabling preview feature flag checks" );
93+ logInfo ("Disabling preview feature flag checks" );
9694 // force javac to think no features are previews
9795 Class <Preview > previewClass = Preview .class ;
9896 byteBuddy .redefine (previewClass )
99- .visit (Advice .to (PreviewFeatureCheckOverride .class ).on (named ("isPreview" )))
97+ .visit (Advice .to (PreviewAdvice .class ).on (named ("isPreview" )))
10098 .make ()
10199 .load (previewClass .getClassLoader (), ClassReloadingStrategy .fromInstalledAgent ());
102100
103- log . info ("Disabling feature min level checks" );
101+ logInfo ("Disabling feature min level checks" );
104102 /**
105103 * For all the features in {@link #ENABLED_FEATURES}, override the min JDK level, reducing it to 8
106104 *
@@ -120,7 +118,11 @@ public class JabelJavacProcessor implements Processor {
120118 } catch (Exception e ) {
121119 throw new RuntimeException (e );
122120 }
123- log .info ("Jabel ByteBuddy initialisation complete" );
121+ logInfo ("Jabel ByteBuddy initialisation complete" );
122+ }
123+
124+ static private void logInfo (String msg ) {
125+ System .out .println (msg );
124126 }
125127
126128 @ Override
@@ -130,7 +132,7 @@ public SourceVersion getSupportedSourceVersion() {
130132
131133 @ Override
132134 public void init (ProcessingEnvironment processingEnv ) {
133- log . debug (
135+ logInfo (
134136 ENABLED_FEATURES .stream ()
135137 .map (Enum ::name )
136138 .collect (Collectors .joining (
0 commit comments