jar - Maven Assembly Plugin: Unpacking overwrites different versions of dependencies -


i using maven assembly plugin generate single jar file dependencies application (unpacked definition in jarlib.xml given here: https://gist.github.com/knyttl/7cc0730ae0fb6947cbda). dependency.jar can put on class path application.jar , run java -cp application.jar:dependencies.jar my.class.runner. problem multiple versions of same artifacts when unpacking jars.

for instance using org.apache.xmlrpc:xmlrpc-server:jar:3.1.3 depends on javax.servlet:servlet-api:jar:2.3. in application need use different, newer version of javax.servlet, when unpacking, new version skipped , old 1 used instead.

  1. is there way ignore dependency given xmlrpc-server?
  2. is there way prioritize newer version of javax.servlet?
  3. is there way create single jar without unpacking dependencies , being able use them -cp application.jar:dependencies.jar? when tried build jar without unpacking, none of inner jar classes found when running application.

sounds want shade plugin - ability create single jar of these included. https://maven.apache.org/plugins/maven-shade-plugin/examples/includes-excludes.html


Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

html - Unable to style the color of bullets in a list -

c# - must be a non-abstract type with a public parameterless constructor in redis -