I tried to go more in depth to understand the problem.

In short:
It seems that the problem comes from the class
org.apache.maven.wagon.providers.ssh.jsch.SftpWagon from wagon-ssh version
1.0-beta-2

In fact, in line 88
86            if ( permissions != null && permissions.getFileMode() != null
)
87           {
88                setFileMode( channel, filename, permissions );
89            }

SftpWagon ask to change the FileMode (by default 664).
But it's not possible to change the file mode if you aren't the owner.
So an exception is raised:

  [INFO] Error installing artifact's metadata: Error while deploying
metadata: Error occured while deploying 'test/cp/maven-metadata.xml' to
remote repository: sftp://maven2/proxy/inhouse

I think it's a bug.
It works if you create the first time or if you are the owner of the file
but it can't work it you aren't the owner.

Rémy

Reply via email to