I am trying to create a Spring annotation in Java
as following.
@Target({ ElementType.METHOD })
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface MyAnnotation {
MyClass myObj();
}
On build, I am getting warning message for standard-scaladoc
as follows:
standard-scaladoc:
...
...
[scaladoc-2.12] warning: Implementation restriction: subclassing Classfile does not
[scaladoc-2.12] make your annotation visible at runtime. If that is what
[scaladoc-2.12] you want, you must write the annotation class in Java.
[scaladoc-2.12] public @interface MyAnnotation {
[scaladoc-2.12] ^
[scaladoc-2.12] error: No warnings can be incurred under -Xfatal-warnings.
...
...
This is a known bug till Scala 2.12.3 as per this post.
I have used -Xfatal-warnings flag in build.xml
to fail the build in case of any warning.
<property name="sources.scalac.extra.args" value="-Xfatal-warnings -feature -deprecation:false"/>
Is there any way I can suppress this specific warning without removing -Xfatal-warnings flag?