Reputation: 2980
In a spring project I have all the required jars with correct specified version. We have to use Maven but the internet firewall doesn't allow us to download. So my query is can I manually create the folder structures inside .m2/repository folder as per maven recommended and put the jars there ? I tried this, but maven fails to get the jars from here.
A AtrifactDescriptorException:Failed to read artifact....
comes out.
Is it possible in some manner, any work around ?
Upvotes: 1
Views: 70
Reputation: 1550
Specify the proxy configuration in maven settings.xml file, It will download automatically.
<proxy> <id>optional</id> <active>true</active> <protocol>http</protocol> <username>proxyuser</username> <password>proxypass</password> <host>proxy.host.net</host> <port>80</port> <nonProxyHosts>local.net|some.host.com</nonProxyHosts> </proxy>
Upvotes: 0
Reputation: 136122
If you have this dependency in pom.xml
<dependency>
<groupId>x.y</groupId>
<artifactId>test</artifactId>
<version>1.1.1</version>
</dependency>
then you must place test-1.1.1.jar here
.m2/repository
/x
/y
/test
/1.1.1
test-1.1.1.jar
Upvotes: 2
Reputation: 83
This error is due to, you don't have jar in .me directory or jar is corrupted. If you want to use maven in project please open firewall and allow the download it will helps you in future where you will required many jars to be downloaded from maven repo
Upvotes: 0