Maven Transitive Dependency causing NoClassDefFound error -


i getting noclassdeffounderror while trying load class seems due dependency version conflict.

project -> project b -> project c.

we have included version 2.0 project c within project a.

whereas

project b needs version 1.0 project c.

right when project b code tries load class project c, gets version 2.0.

is there way, can explicitly define refer project c (version 1.0 ) if project b tries , in other cases should pick version 2.0

i mean way can exclude transitive dependency, there way explicitly define inclusion ( reference respective project , not whole application code ).

thanks.

i doubt that. if understand question correctly, build result in loading jar of project c in 2 different versions simultaneously jvm (one project b , 1 project a). share same packages , class names, there no way jvm distinguish them.

if project c own project , change version 1.0 2.0 breaks something, think using new package name, org.example.c2 instead of org.example.c (like e.g. in apache commons-lang project).


Comments

Popular posts from this blog

ruby - Trying to change last to "x"s to 23 -

jquery - Clone last and append item to closest class -

css - Can I use the :after pseudo-element on an input field? -