You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Rémy Sanlaville <re...@gmail.com> on 2007/11/07 14:15:27 UTC
[M2] Pb Release and preserve timestamps
Hi,
When I try to do a release with the maven-release-plugin, it seems that it
(or certainly wagon) asks to preserve the timestamps when deploying my
artifact to my repository.
My problem is if I am not the owner of the file (for instance the
maven-metadata.xml file), it fails when deploying my artifact (with the sftp
protocol) even if I am in the group owner.
My repository is hosting by a Debian Server.
I tried to do a cp -p (or --preserve=timestamps) and effectively I don't
have the permission to do this if I am not the owner of the file.
It seems that it's not possible to change the os for this. If you know, I
will be happy to have a solution.
So I don't really know what to do ?
Is it possible to configure wagon in order to skip the preserve timestamps
request ?
Is it a problem to do that ?
Does anybody else has the same problem (I found any thread in the archive
about this problem) ?
Thanks,
Rémy
Re: [M2] Pb Release and preserve timestamps
Posted by Rémy Sanlaville <re...@gmail.com>.
Hi Lee,
I am not sure to have been enough clear about my problem/context.
Let's assume that we are a team working in a same project (possibly in
different site).
We want to be able that different person can make a release.
The problem is that, as I mentioned before, is not possible for the moment
to do it with the deploy plugin and with different account (for several
reasons it's not possible to share a same account for the release in the
team).
One solution is to change the deploy plugin in order it not asks to change
the file mode if the file already exists.
Otherwise we can just switch to the web dav protocol.
Rémy
Re: [M2] Pb Release and preserve timestamps
Posted by Lee Meador <le...@leemeador.com>.
The account you use to log in for SFTP needs to own the deployed artifacts.
If your account does not have permission to replace the file on the
server, the owner account does not want you to be replacing it. Only
the owner (or root) is allowed to set the permissions on the file
according to their purposes.
Perhaps you should deploy to a different location owned by your
account and have the owner copy that artifact into their location if
they approve of the change.
-- Lee
On Nov 21, 2007 11:01 AM, Rémy Sanlaville <re...@gmail.com> wrote:
> 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
>
--
-- Lee Meador
Sent from gmail. My real email address is lee AT leemeador.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: [M2] Pb Release and preserve timestamps
Posted by Rémy Sanlaville <re...@gmail.com>.
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