java - How does Maven manage duplicate artifactIds when they belong to a different group? -
i'm building different web projects maven , thinking how name artifacts. rest api layer, it's convenient share classes, want create exchange-api.jar files shared among different projects.
let's suppose i've got web application has it's own exchange-api module. groupid com.mycompany.app1
whole maven id artifact should com.mycompany.app1:exchange-api:1.0
. let's suppose want access other app's api application. have include dependency com.mycompany.app2:exchange-api:1.0
. artifactids same, groupid different. however, both should end exchange-api-1.0.jar in classpath.
how maven take care of this? should use unique artifactid each of them?
maven manages problem allowing customize file name mapping, can done both war , ear applications. think naming convention poor. suppose projects publicly downloadable , people not using maven download them manually , add them projects: think generic "exchange-api" clear enough? think no. names app1-exchange-api
, app2-exchange-api
. or app1-api
, app2-api
. there several examples of rule: spring, hibernate , on.
Comments
Post a Comment