Maven throws an error as shown below. I am trying to get the repository from remote to mine.
mvn package Could not transfer metadata org.symplifier.adk:symplifier- adk:1.0.3-SNAPSHOT/maven-metadata.xml from/to a-repository (sftp://git.a.com.np/home/git/gitlab/public/repo/): Cannot connect. Reason: java.lang.ArrayIndexOutOfBoundsException: 0 [WARNING] Failure to transfer org.symplifier.adk:symplifier-` adk:1.0.3-SNAPSHOT/maven-metadata.xml from sftp:
My version of maven
mvn -version Apache Maven 3.3.3 (7994120775791599e205a5524ec3e0dfe41d4a06; 2015-04-22T17:42:37+05:45) Maven home: /usr/local/apache-maven Java version: 1.8.0_45, vendor: Oracle Corporation Java home: /usr/lib/jvm/jdk1.8.0_45/jre Default locale: en_US, platform encoding: UTF-8 OS name: "linux", version: "3.2.0-4-amd64", arch: "amd64", family: "unix"
Edit1 :
I tried to get maven to update all repositories using pom.xml
<repositories> <repository> <id>a-repository</id> <url>sftp://git.a.com.np/home/git/gitlab/public/repo/</url> <snapshots> <enabled>true</enabled> <updatePolicy>always</updatePolicy> </snapshots> <releases> <enabled>true</enabled> <updatePolicy>always</updatePolicy> </releases> </repository> </repositories> <dependency> <groupId>org.symplifier.adk</groupId> <artifactId>symplifier-adk</artifactId> <version>1.0.3-SNAPSHOT</version> </dependency>
Forced update.
mvn -U package
Edit2 : Try deleting the pom.lastUpdated file. Also delete the repository and try again.
Another difference is my machine username, and the username in the remote repository is different. But that doesnβt matter, since my public key is in a remote repo and will be used for authentication.
In addition, there is only one package facing this error. Let me know what is wrong.
Update : This is a file .
source share