Java/Maven: how to remove content from shaded JAR at compile time? -
i in project reusing open source maven-based component includes bunch of shaded (e.g, using maven-shade plugin) direct , transitive dependencies in component uber-jar. unfortunately of dependencies clash dependencies own project has. specifically, component's dependencies transitively include servlet-api 2.x whereas need 3.x in project - , appear in same namespace. component's top-level dependency pulls in servlet-api (lucene-demo) not needed functionality of component, i'd happy remove if possible. project built gradle.
what recommended way of dealing type of situation? there way of removing offending dependencies reused uber-jar when build own project? or should rebuild reused component myself, excluding troublesome dependency? if so, can done in automatic manner, such don't need maintain own fork of open source component? component presently hosted in github , published via maven central.
(as might understand, i'm bit of beginner both maven , gradle, don't worry dumbing things down).
Comments
Post a Comment