When I run the command mvn eclipse:eclipse, the dependency jar ojdbc14.jar is getting downloaded without any issues. Then, when I run the command mvn clean install, maven tries to download the same jar again - but this time it fails saying that the jar is not found in the repository.
What I have noted is that, when running the command for the first time (mvn eclipse:eclipse), Maven looks into the Nexus repository of our company - and it finds the jar. When running the command mvn clean install, maven directly goes to the central repository without looking into Nexus - and hence it is not finding the jar.
1) Why is maven trying to download the jar when it is already present in the local machine?
2) Why is maven skipping the Nexus repository before going to the central repository?
I suspect that you problem is related to you maven settings file. Does you settings file catch calls to all remote repositories for example like this:
<mirror>
<!--This sends everything else to /public -->
<id>nexus</id>
<mirrorOf>*</mirrorOf>
<url>http://yournexusrepoaddress</url>
</mirror>
If not, downloaded pom files could override where to look for external repositories. See this link for more information. I hope that this helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With