I have an application built with Maven 2 with duplicate dependencies from both SpringSource Enterprise Bundle Repository and Maven2 public repository. Fortunately they have the same version but I still would like to clean-up the duplicates.
Should I favor Spring repository or Maven?
My project uses Spring a lot (core, web flow, security), so I would tend to say that I should use Spring repo but I don’t need my jar files to be OSGi compliant and the long prefixed names annoy me a bit.
Example of duplicates:
com.springsource.org.apache.commons.logging and commons-logging
org.springframework.core and spring-core
You should use the repository that provides the version of the artifacts you want to use 🙂 If you want to use OSGI compatible artifacts, use SpringSource Enterprise Bundle Repository (EBR). If you don’t care about OSGI, then it doesn’t matter, as long as you don’t mix artifacts. That’s the official recommendation from SpringSource.
Personally, I would just use Maven Central (SpringSource does publish final releases to Central).
And if you’re looking for RC, milestones, or SNAPSHOTS, you can always get them from Spring’s Maven Central compatible repositories:
Reference