问题
I've got EJB object which requires some interfaces from dependency (maven - jar). When I deploy it in .ejb in .ear everything works. I really don't need ear so I wanted to use .war with this EJB object. However during deployment it appeared that my dependency has some classes annotated with @Webservice. This classes also requires other dependencies which I don't want to use in my project, so during deployment I get no class def found exception. Is there any way to stop this auto-deployment of annotated classes from dependency?
回答1:
Use the Maven Shade Plugin filters
and/or minimizeJar
features to exclude classes from that dependency.
来源:https://stackoverflow.com/questions/12367225/exclude-dependency-from-application-server-auto-deployment