File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Ant, Maven and Other Build Tools and the fly likes Maven build issue:Unauthorized. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Maven build issue:Unauthorized." Watch "Maven build issue:Unauthorized." New topic

Maven build issue:Unauthorized.

Rajkamal Pillai
Ranch Hand

Joined: Mar 02, 2005
Posts: 445

I am trying to generate sources/build the project I am working on and for some reason the network seems unauthorized (check log blow) while trying to download a dependency jar file. What is the way around this? From what I can think of Maven tries to download the jar as it is not available on my '.m2/repository'. What if I were to manually place the jar file under the folder structure Maven looks for it?

Any suggestions would be of great help.

N Sahni
Ranch Hand

Joined: Jul 07, 2011
Posts: 55


You can definitely put the jar and pom file manually at the location '.m2/repository/junit/junit/4.8.1/' as a work around.
But ideally maven should be able to download automatically from the repository.

Check whether you have access to the download location. If you are using proxy settings for accessing the URL then make sure you've configured the proxy settings in Maven settings.xml properly.

Thanks and Regards,
Nilesh Sahni | |
Peter Johnson

Joined: May 14, 2008
Posts: 5852

I suspect just a temporary server error. I pasted the URL into my browser and the POM was displayed without any security error. You should try the same.

JBoss In Action
Rajkamal Pillai
Ranch Hand

Joined: Mar 02, 2005
Posts: 445

Thanks for the suggestions. I suspect that the above was caused by the Firewall blocking access to the URL from which the jar files would be downloaded. When I rebuild the application using a different internet connection (USB modem) it was successful.

I agree. Here's the link:
subject: Maven build issue:Unauthorized.
It's not a secret anymore!