I wonder if there is a way to remove some annotations when " maven build "?
For convenience, I annotate annotation Parties, the Parties in their POJO, for example javax.persistence.*, org.hibernate.annotations.*, org.apache.lucene.analysis.*... blah ... blah.
This works well when I put them together and deploy them on a JavaEE / Spring server / container.
But when developing Android, I want to make the most of my / POJO code . I want to import foobar.core.User directly instead of creating another foobar.android.User without third-party annotations. That is, I do not want the jar to depend on other spring / hibernate artifacts.
So, is there a way to remove some annotations when running 'maven build'? I just need to remove the “some” third-party annotations and save the custom annotations of the main code.
So, I can build foobar-core.jarboth foobar-core-stripped.jar accordingly or simultaneously .
source
share