What is the difference between repository and dependency in Maven?
问题 How are they different? Or are they the same? 回答1: Repository is a collection of artifacts (eg: jars). You can think of it as a mere storage / cache of various artifacts. Dependency is a situation where your project dependent on another artifact to perform its task (eg: compile, run, unit test) On a maven project you typically declare what artifacts you need on the <dependency> section of your pom, and you can also declare what repositories maven should lookup the dependency from at the