Use basic auth when anonymous access is disabled on the nexus server

Allows basic auth to be used for nexus artifact retrieval.