This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Example was using the dependency version of 2.2.5 but I updated the dependency to latest version but I am getting the below error:
Even if I update the dependency to the example version (2.2.5) then also same error comes. I searched in the central reposiroty but it is providing the Mavan Coordinates not the repository url. Please let me know how to resolve the issue. Also let me know how to find the updated repository url for a particular dependency.
Peter Johnson wrote:The <type> option identifies the type of file to download. It defaults to jar. Usually you want JARs as dependencies. You would use another type only if the artifact is provided as some other type.
Also let me know about the below query:
- how to find a suitable repository for a particular dependency because there are many repositories?
- After identifying the repo, what url needs to be given in POM.xm for that dependency because there is only maven coordinates in repo?
If the JAR is not there, I try to find out from the JAR file itself or from the project's web site if they use another repository. The project documentation should tell you the repository URL (you provide only the base URL, not the full URL to the JAR file - Maven builds that from the coordinates).
If the project does;'t use Maven make their repository available, then I manually load the the JAR into my repository using "mvn install:install-file" (or better yet, I load it into our teams Nexus repository - if you plan on doing any serious work with Maven, having a central Nexus (or Artifactory) repository is a must)