Re: Deploy with SFTP tries to cd to parent too many times

2010-09-17 Thread Jason van Zyl
I make the distinction where Maven deploys and putting something in production 
is provisioning.

On Sep 17, 2010, at 2:25 PM, Gorham-Engard, Frank wrote:

> I can't help wondering if this entire discussion is continuing because of 
> semantics.
> 
> I think you are talking about two uses of the word deploy. For a "Maven 
> Deploy" a standard Maven repository is probably best. For a "Production 
> Deploy" we must use whatever the production environment provides. If you are 
> 'deploying' an artifact to be acquired by another Maven project then it is a 
> "Maven Deploy". If you are 'deploying' a product into a production 
> environment (where it will execute, for example) it is a "Production deploy".
> 
> How can we de-obfuscate the word deploy that was overloaded by the Maven use? 
> Also, consider the other overloaded words: package, install, validate, 
> verify, etc.
> 
> I suppose, on a Maven forum, the words should be used the Maven way. But 
> ,then how do you ask about the other contexts?
> 
>  From: Ron Wheeler [mailto:rwhee...@artifact-software.com] 
> Sent: Monday, September 06, 2010 5:12 PM
> To: users@maven.apache.org
> Subject: Re: Deploy with SFTP tries to cd to parent too many times
> 
> 
>  On 06/09/2010 2:19 PM, Trevor Harmon wrote:
>> On Sep 6, 2010, at 6:48 AM, Ron Wheeler wrote:
>> 
>>> Get Nexus up and running and start to enjoy using Maven.
>> I'm sensing a theme here. Anybody reminded of that old joke? "Doctor, it 
>> hurts when I move my arm like this." Doctor: "Then don't move your arm like 
>> that."
>> 
>>> It is free. It is easy to install and configure.
>> ...
>>> We are a small team of 3 but it was well worth the time to get it up and 
>>> running.
>> That you are a small team of 3 is very likely the reason why you found it 
>> easy to install and configure. I'm assuming one of you 3 set up the server 
>> yourself, correct? And had root access to it?
> Correct
>>  You probably didn't have to expose Nexus outside the firewall, either.
>> 
> No. We are a distributed operation.
>> These are all advantages I'm lacking. I'm working remotely as an external 
>> contractor and have no control over the company's servers. And it doesn't 
>> help that I'm the only person using Maven in an all-Microsoft shop.
> Probably more trouble than its worth. Stick with Ant or use the 
> Microsoft tools
>> They'd have to integrate the Nexus server's user account management with 
>> Microsoft Active Directory. (Is that even possible?) And they'd also have to 
>> configure their firewall just for me so that I may access Nexus from the 
>> outside.
> They should know how to do this. I am not sure why you would bother with 
> Active Directory for 1 person. Just use Nexus' authentication.
> 
>>  This is a company with thousands of employees and a full-time IT security 
>> engineer; punching holes in their walls is not something they take lightly. 
>> In short, installing Nexus is by no means easy.
>> 
>> But the company already happens to have a web server with SFTP access 
>> outside the firewall. They've given me an account on it. I'm simply trying 
>> to piggyback on this as a repository and use SFTP for deployment, since SFTP 
>> is a "supported" deployment method.
> So they do know how to expose services safely within their environment.
> 
>> Please correct me if I'm wrong about that.
>> 
>> Trevor
>> 
>> 
>> -
>> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
>> For additional commands, e-mail: users-h...@maven.apache.org
>> 
>> 
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
> 

Thanks,

Jason

--
Jason van Zyl
Founder,  Apache Maven
http://twitter.com/jvanzyl
-

In short, man creates for himself a new religion of a rational
and technical order to justify his work and to be justified in it.

  -- Jacques Ellul, The Technological Society





RE: Deploy with SFTP tries to cd to parent too many times

2010-09-17 Thread Gorham-Engard, Frank
I can't help wondering if this entire discussion is continuing because of 
semantics.
 
I think you are talking about two uses of the word deploy. For a "Maven Deploy" 
a standard Maven repository is probably best. For a "Production Deploy" we must 
use whatever the production environment provides. If you are 'deploying' an 
artifact to be acquired by another Maven project then it is a "Maven Deploy". 
If you are 'deploying' a product into a production environment (where it will 
execute, for example) it is a "Production deploy".

How can we de-obfuscate the word deploy that was overloaded by the Maven use? 
Also, consider the other overloaded words: package, install, validate, verify, 
etc.

I suppose, on a Maven forum, the words should be used the Maven way. But ,then 
how do you ask about the other contexts?

 To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>


-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: Deploy with SFTP tries to cd to parent too many times

2010-09-06 Thread Ron Wheeler

 On 06/09/2010 2:19 PM, Trevor Harmon wrote:

On Sep 6, 2010, at 6:48 AM, Ron Wheeler wrote:


Get Nexus up and running and start to enjoy using Maven.

I'm sensing a theme here. Anybody reminded of that old joke? "Doctor, it hurts when I move my 
arm like this." Doctor: "Then don't move your arm like that."


It is free. It is easy to install and configure.

...

We are a small team of 3 but it was well worth the time to get it up and 
running.

That you are a small team of 3 is very likely the reason why you found it easy 
to install and configure. I'm assuming one of you 3 set up the server yourself, 
correct? And had root access to it?

Correct

  You probably didn't have to expose Nexus outside the firewall, either.


No. We are a distributed operation.

These are all advantages I'm lacking. I'm working remotely as an external 
contractor and have no control over the company's servers. And it doesn't help 
that I'm the only person using Maven in an all-Microsoft shop.
Probably more trouble than its worth. Stick with Ant or use the 
Microsoft tools

They'd have to integrate the Nexus server's user account management with 
Microsoft Active Directory. (Is that even possible?) And they'd also have to 
configure their firewall just for me so that I may access Nexus from the 
outside.
They should know how to do this. I am not sure why you would bother with 
Active Directory for 1 person. Just use Nexus' authentication.



  This is a company with thousands of employees and a full-time IT security 
engineer; punching holes in their walls is not something they take lightly. In 
short, installing Nexus is by no means easy.

But the company already happens to have a web server with SFTP access outside the 
firewall. They've given me an account on it. I'm simply trying to piggyback on this as a 
repository and use SFTP for deployment, since SFTP is a "supported" deployment 
method.

So they do know how to expose services safely within their environment.


Please correct me if I'm wrong about that.

Trevor


-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org





-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: Deploy with SFTP tries to cd to parent too many times

2010-09-06 Thread Justin Edelson
On 9/6/10 1:36 PM, Trevor Harmon wrote:
> On Sep 6, 2010, at 7:22 AM, Justin Edelson wrote:
> 
>> Can you use SCP instead of SFTP?
> 
> I tried that, but it fails with "Remote connection terminated unexpectedly". 
> I suspect this is because shell access to the server is disabled. (Trying to 
> ssh to it gives "PTY allocation request failed on channel 0 \ shell request 
> failed on channel 0".) Or is shell access not required for SCP?
> 
Yeah, as far as I know shell access is required for the SCP wagon (or
for SCP itself; I can't say I've ever used SCP in an environment where I
didn't have shell access).

Sorry it didn't work; figured it was worth a shot.

Justin

> Trevor
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
> 


-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: Deploy with SFTP tries to cd to parent too many times

2010-09-06 Thread Justin Edelson
On 9/6/10 2:24 PM, Trevor Harmon wrote:
> On Sep 6, 2010, at 4:35 AM, Stephen Connolly wrote:
> 
>> not without wagon, just not with the webdav wagon
> 
> Sorry, I'm still confused. The Wagon docs [1] list the following providers:
> 
> * File
> * HTTP
> * HTTP lightweight
> * FTP
> * SSH/SCP
> * WebDAV
> * SCM (in progress)
> 
> Of the three that are accessible over HTTP (HTTP, HTTP lightweight, and 
> WebDAV), only WebDAV allows deployment, according to the docs. If WebDAV is 
> not used, how are artifacts uploaded to the server?
> 
This information is incorrect. HTTP and HTTP lightweight support
deployment via HTTP PUT.

Justin

> Trevor
> 
> [1] http://maven.apache.org/wagon/index.html
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
> 


-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: Deploy with SFTP tries to cd to parent too many times

2010-09-06 Thread Trevor Harmon
On Sep 6, 2010, at 4:35 AM, Stephen Connolly wrote:

> not without wagon, just not with the webdav wagon

Sorry, I'm still confused. The Wagon docs [1] list the following providers:

* File
* HTTP
* HTTP lightweight
* FTP
* SSH/SCP
* WebDAV
* SCM (in progress)

Of the three that are accessible over HTTP (HTTP, HTTP lightweight, and 
WebDAV), only WebDAV allows deployment, according to the docs. If WebDAV is not 
used, how are artifacts uploaded to the server?

Trevor

[1] http://maven.apache.org/wagon/index.html


-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: Deploy with SFTP tries to cd to parent too many times

2010-09-06 Thread Trevor Harmon
On Sep 6, 2010, at 6:48 AM, Ron Wheeler wrote:

> Get Nexus up and running and start to enjoy using Maven.

I'm sensing a theme here. Anybody reminded of that old joke? "Doctor, it hurts 
when I move my arm like this." Doctor: "Then don't move your arm like that."

> It is free. It is easy to install and configure.
...
> We are a small team of 3 but it was well worth the time to get it up and 
> running.

That you are a small team of 3 is very likely the reason why you found it easy 
to install and configure. I'm assuming one of you 3 set up the server yourself, 
correct? And had root access to it? You probably didn't have to expose Nexus 
outside the firewall, either.

These are all advantages I'm lacking. I'm working remotely as an external 
contractor and have no control over the company's servers. And it doesn't help 
that I'm the only person using Maven in an all-Microsoft shop. They'd have to 
integrate the Nexus server's user account management with Microsoft Active 
Directory. (Is that even possible?) And they'd also have to configure their 
firewall just for me so that I may access Nexus from the outside. This is a 
company with thousands of employees and a full-time IT security engineer; 
punching holes in their walls is not something they take lightly. In short, 
installing Nexus is by no means easy.

But the company already happens to have a web server with SFTP access outside 
the firewall. They've given me an account on it. I'm simply trying to piggyback 
on this as a repository and use SFTP for deployment, since SFTP is a 
"supported" deployment method. Please correct me if I'm wrong about that.

Trevor


-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: Deploy with SFTP tries to cd to parent too many times

2010-09-06 Thread Trevor Harmon
On Sep 6, 2010, at 7:22 AM, Justin Edelson wrote:

> Can you use SCP instead of SFTP?

I tried that, but it fails with "Remote connection terminated unexpectedly". I 
suspect this is because shell access to the server is disabled. (Trying to ssh 
to it gives "PTY allocation request failed on channel 0 \ shell request failed 
on channel 0".) Or is shell access not required for SCP?

Trevor


-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: Deploy with SFTP tries to cd to parent too many times

2010-09-06 Thread Justin Edelson
Can you use SCP instead of SFTP?

On Mon, Sep 6, 2010 at 4:15 AM, Trevor Harmon  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
>
>

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: Deploy with SFTP tries to cd to parent too many times

2010-09-06 Thread Ron Wheeler

 You are dancing around the edges.

Get Nexus up and running and start to enjoy using Maven.
It is free. It is easy to install and configure.


It makes finding artifacts painless and encourages/forces you to deploy 
properly.

It gives a great deal of transparency to the whole Maven process.

There are other repository packages but Nexus is the one that I know and 
it made our lives a lot easier.
We are a small team of 3 but it was well worth the time to get it up and 
running.


Ron


On 06/09/2010 7:35 AM, Stephen Connolly wrote:

not without wagon, just not with the webdav wagon

On 6 September 2010 12:23, Trevor Harmon  wrote:


On Sep 6, 2010, at 4:01 AM, Stephen Connolly wrote:


Actually no, AFAIK use http direct, so it's not the WebDAV client at all.

Hmm... so how are artifacts deployed without Wagon? The Wagon docs say that
deployment over HTTP is not supported.

Trevor


-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org





-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: Deploy with SFTP tries to cd to parent too many times

2010-09-06 Thread Stephen Connolly
not without wagon, just not with the webdav wagon

On 6 September 2010 12:23, Trevor Harmon  wrote:

> On Sep 6, 2010, at 4:01 AM, Stephen Connolly wrote:
>
> > Actually no, AFAIK use http direct, so it's not the WebDAV client at all.
>
> Hmm... so how are artifacts deployed without Wagon? The Wagon docs say that
> deployment over HTTP is not supported.
>
> Trevor
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>


Re: Deploy with SFTP tries to cd to parent too many times

2010-09-06 Thread Trevor Harmon
On Sep 6, 2010, at 4:01 AM, Stephen Connolly wrote:

> Actually no, AFAIK use http direct, so it's not the WebDAV client at all.

Hmm... so how are artifacts deployed without Wagon? The Wagon docs say that 
deployment over HTTP is not supported.

Trevor


-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: Deploy with SFTP tries to cd to parent too many times

2010-09-06 Thread Trevor Harmon
On Sep 6, 2010, at 4:01 AM, Stephen Connolly wrote:

> Your client would be better served using a Maven Repository Manager than a
> website backed by an SFTP share. Drink the Kool-aid

No small feat. I am the lone Java developer in an enterprise that is 100% C#. 
They already drank the Kool-Aid, and it tastes like Seattle.

Trevor


-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: Deploy with SFTP tries to cd to parent too many times

2010-09-06 Thread Stephen Connolly
Actually no, AFAIK use http direct, so it's not the WebDAV client at all.

Your client would be better served using a Maven Repository Manager than a
website backed by an SFTP share.

Drink the Kool-aid, I recommend Nexus, easy to set up and the staging
support in the professional edition is cool... add in that they can then use
it to proxy the public repos and save bandwidth and it's almost a
no-brainer...

but by all means if you can fix SFTP support that would also be cool

On 6 September 2010 11:49, Trevor Harmon  wrote:

> On Sep 6, 2010, at 3:17 AM, Stephen Connolly wrote:
>
> > Because they all deploy via http/https
>
> So in other words, use WebDAV and then I will not be worrying about SFTP at
> all. Well, yes, naturally. But at the moment my client only has an SFTP
> server, and as far as I know, the SFTP transport in Maven Wagon isn't
> deprecated. I don't think I'm doing anything unusual by deploying with SFTP.
> In fact, my understanding is that it's pretty common. Therefore I'm hoping
> to enlist help in tackling this bug instead of just working around it.
>
> Trevor
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>


Re: Deploy with SFTP tries to cd to parent too many times

2010-09-06 Thread Trevor Harmon
On Sep 6, 2010, at 3:17 AM, Stephen Connolly wrote:

> Because they all deploy via http/https

So in other words, use WebDAV and then I will not be worrying about SFTP at 
all. Well, yes, naturally. But at the moment my client only has an SFTP server, 
and as far as I know, the SFTP transport in Maven Wagon isn't deprecated. I 
don't think I'm doing anything unusual by deploying with SFTP. In fact, my 
understanding is that it's pretty common. Therefore I'm hoping to enlist help 
in tackling this bug instead of just working around it.

Trevor


-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: Deploy with SFTP tries to cd to parent too many times

2010-09-06 Thread Stephen Connolly
Because they all deploy via http/https

On 6 September 2010 10:19, Trevor Harmon  wrote:

> On Sep 6, 2010, at 1:49 AM, Stephen Connolly wrote:
>
> > Use A Maven repository manager and then you will not be worrying about
> sftp
> > at all.
>
> How does a repository manager eliminate the need for SFTP?
>
> Trevor
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>


Re: Deploy with SFTP tries to cd to parent too many times

2010-09-06 Thread Trevor Harmon
On Sep 6, 2010, at 1:49 AM, Stephen Connolly wrote:

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

How does a repository manager eliminate the need for SFTP?

Trevor


-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: Deploy with SFTP tries to cd to parent too many times

2010-09-06 Thread Stephen Connolly
[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  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
>
>