I am trying to add a jar file to the Maven dependency in my project. The settings.xml is configured to set the repository to a public repository. But this particular jar is not
Have a look at system dependencies.
You basically need to define
.
...
javax.sql
jdbc-stdext
2.0
system
${java.home}/lib/rt.jar
...
This is if you don't have your own hosted artifact repository server such as Nexus, Artifactory or Archiva.
If you do, then as Karl-Heinz suggested, you would be better off placing it there, as it's not good practice to commit binary artifacts to version control.