[You probably don't want to hear this, but you should hear it anyway]

Use A Maven repository manager and then you will not be worrying about sftp
at all.

You should be using a maven repository manager in any case.  your life will
be much much simpler

-Stephen

On 6 September 2010 09:15, Trevor Harmon <tre...@vocaro.com> wrote:

> Hi,
>
> I'm running into a build failure when doing "mvn deploy" via SFTP. This
> appears to be a bug that affects any repository whose SFTP host disallows
> access to the root directory.
>
> Here's what I know so far: By instrumenting JSch (which does the actual
> SFTP commands), I can see that the problem occurs when JSch issues a "cd .."
> too many times. In fact, it does "cd .." all the way back to the root and
> just keeps on going, doing a "cd .." several more times.
>
> Ordinarily this wouldn't be a problem, but when the permissions of the SFTP
> user don't allow cd'ing into the root directory (for increased security),
> there will be a permission denied error, which in turn causes the build to
> fail.
>
> Assuming that the security policy of the server cannot be altered, I'm
> trying to figure out if there's a way to resolve this on the client side.
> However, I have no idea why Deploy is trying to "cd .." so many times. For
> example, if I configure the snapshots repository as something like:
>
> sftp://example.com/home/myuser/myrepository/snapshots
>
> Then there's no need to cd anywhere above the "snapshots" directory. But
> Deploy does exactly that, for some reason.
>
> From studying the logs I put into JSch, Deploy appears to be trying to
> check the repo for previous artifact metadata, and to do so it issues a "cd"
> into a directory deep in the hierarchy. But because this artifact doesn't
> happen to be in the repo, the directory does not exist, yet the code
> continues on as if it does. It then issues a series of "cd .." commands,
> which, if the directory existed, would probably bring it back to some
> appropriate spot in the hierarchy, but because the first "cd" failed, it
> starts from a much higher level and ends up ascending well past the root.
>
> Any thoughts? Thanks,
>
> Trevor
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>

Reply via email to