permaculture playing cards*
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
Author

Maven build issue:Unauthorized.

Rajkamal Pillai
Ranch Hand

Joined: Mar 02, 2005
Posts: 443
    
    1


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.



Thanks,
Raj.
N Sahni
Ranch Hand

Joined: Jul 07, 2011
Posts: 55

Hi,

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 | nsahni@infocepts.com | www.infocepts.com
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5812
    
    7

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: 443
    
    1



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.

Cheers,
Raj.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Maven build issue:Unauthorized.
 
Similar Threads
cannot download j2ee-1.4.jar as defined in my pom.xml
Maven error when try to use command "mvn package"
Transitive Dependency Problem
Maven Repo Location
new to maven, error in mvn war:war