I am trying to use a private password protected nexus to download and add private jar artifacts to spark-shell classpath but it fails to download it. The spark documentation (https://spark.apache.org/docs/latest/submitting-applications.html) mentions that --repositories argument with uri that looks like https://user:password@host/ should work but my spark-shell still fails to download the artifact. spark-shell prints out a url that it tried and failed but when I click on it I am able to open it in browser just fine.
Here is my example command
./spark-shell --packages com.danish:spark-lib:1.0.0 --repositories https://username:password@nexus.host.com/repository/public
Please let me know if I am missing something. If there are alternate approaches like using mvn or ivy that is connected to nexus, I'd love to hear that as well.
Thanks