post-compilation removal of annotations from byte code

前端 未结 4 2178
太阳男子
太阳男子 2021-02-08 15:50

we are using a library that contains beans that are annotated with JAXB annotations. nothing in the way we use these classes depends on JAXB. in other words, we don\'t need JAXB

4条回答
  •  庸人自扰
    2021-02-08 16:24

    There is an additional AntTask Purge Annotation References Ant Task, which

    Purge references to annotations out of the java bytecode/classfiles (remove the @Anno tag from annotated elements). Now you can use annotations to check constellations in bytecode after compilation but remove the used annos before releasing the jars.

提交回复
热议问题