java - best approach to use in multimodule maven project -


i have sevral modules

a b c 

and each module has core module 1 of dependency

a+core b+core c+core 

and i'm supposed package a,b,c in d managed exclude core modules b , c , kept core module in a

d  |+ a-core |+ b-removed core |+ c-removed core 

what best thing in situation, bad practise ?

you may have more 1 dependency pulls core dependency in d pom.xml
so, exclusion not required.
important thing here a, b , c depends on same version of core dependency otherwise d packaging include version of core rather one.
may compile without error, generate exceptions @ runtime if use of these 2 versions not compatible between them.

so focus on using unique version of core in a, b, c.
using parent pom or creating dependency aggregating common dependencies tools ease that.


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -