You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Boris Althaus <bo...@petra-productions.de> on 2004/02/18 17:57:05 UTC

CLI with Modifiable Source

Hello everyone,

i tried out the offline-generation capabilities of Cocoon.
To generate the project to local disk is no problem at all. But how I can invoke the generation with a  Modifiable Source for a ftp-transfer?

Boris

Re: CLI with Modifiable Source

Posted by Boris Althaus <bo...@petra-productions.de>.
Thanks, i think that is a good idea!
  ----- Original Message ----- 
  From: Simon Mieth 
  To: users@cocoon.apache.org 
  Sent: Wednesday, February 18, 2004 6:48 PM
  Subject: Re: CLI with Modifiable Source


  On Wed, 18 Feb 2004 17:57:05 +0100
  "Boris Althaus" <bo...@petra-productions.de> wrote:

  > Hello everyone,
  > 
  > i tried out the offline-generation capabilities of Cocoon.
  > To generate the project to local disk is no problem at
  > all. But how I can invoke the generation with a 
  > Modifiable Source for a ftp-transfer?
  > 
  > Boris

  Hi,

  i think you should ude the ant-task. Ant can publish with
  ftp.

  Best regards,

  Simon

  ---------------------------------------------------------------------
  To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
  For additional commands, e-mail: users-help@cocoon.apache.org

Re: CLI with Modifiable Source

Posted by Upayavira <uv...@upaya.co.uk>.
Boris Althaus wrote:

> I didn't recognized yet, that ant has a scp task or you mean scp with 
> the exec task?
> Unfortunately i never suceeded to automaticlly login to a remote 
> server with scp. But for now ftp is ok.
>  

Yes it does. You need to get hold of a jar file to get it to work, 
though. See note at top of this page:

http://ant.apache.org/manual/OptionalTasks/scp.html

I find SCP sooooo much more satisfying than FTP. FTP seems so dated and 
clunky.

If you can access your server by SSH, you should be able to access it 
via SCP, just with host/user/pass.

> I tried out './cocoon.sh cli -d 
> ftp://user:password@host/destionationdir -c build/mycustomwebapp'. I 
> think this syntax is correct but I got the errormessage: 'Source is 
> not modifiable:'

Hmmm. Should work. Seems that another ftp source is blocking the Avalon 
ftp source.

> The ftp-task of ant has a depends attribute.  transfers only new or 
> changed files if set to "yes". Defaults to "no".

Yup. But that is using timestamps to identify whether a file has 
changed. And the CLI/ant task will overwrite all files every time they 
are generated, thus rendering the depends task useless. This is why I 
was suggesting using checksums rather than timestamps.

HTH.

Upayavira


>  
> Regards Boris
>
>     ----- Original Message -----
>     *From:* Upayavira <ma...@upaya.co.uk>
>     *To:* users@cocoon.apache.org <ma...@cocoon.apache.org>
>     *Sent:* Thursday, February 19, 2004 8:22 AM
>     *Subject:* Re: CLI with Modifiable Source
>
>     Simon Mieth wrote:
>
>     >On Wed, 18 Feb 2004 17:57:05 +0100
>     >"Boris Althaus" <boris@petra-productions.de
>     <ma...@petra-productions.de>> wrote:
>     >
>     > 
>     >
>     >>Hello everyone,
>     >>
>     >>i tried out the offline-generation capabilities of Cocoon.
>     >>To generate the project to local disk is no problem at
>     >>all. But how I can invoke the generation with a
>     >>Modifiable Source for a ftp-transfer?
>     >>
>     >>Boris
>     >>   
>     >>
>     >
>     >Hi,
>     >
>     >i think you should ude the ant-task. Ant can publish with
>     >ftp.
>     > 
>     >
>     There are two ways. My original plan for the CLI was to allow the
>     CLI to
>     do its own FTP with modifiable sources, then when I clicked to the
>     benefits of Ant, modifiable sources didn't seem quite so important.
>
>     So, you can:
>     1) Use Ant task to build site, then have Ant upload the site with FTP
>     (or better, SCP), or
>     2) Use a modifiable source - there is one now a modifiable FTP
>     source in
>     the Excalibur source package, which should mean that you can just
>     use 
>     ftp://user@pass:host/path/file as your destination URI.
>
>     The question is, how to best prevent the uploading of unchanged
>     files.
>     There is 'unannounced' code in Cocoon to do this, but Ant is probably
>     better at it. I believe it can store checksums locally, and use
>     them to
>     decide whether a file has changed, and then only upload changed files.
>
>     HTH.
>
>     Regards, Upayavira
>
>
>
>     ---------------------------------------------------------------------
>     To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>     <ma...@cocoon.apache.org>
>     For additional commands, e-mail: users-help@cocoon.apache.org
>     <ma...@cocoon.apache.org>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: CLI with Modifiable Source

Posted by Boris Althaus <bo...@petra-productions.de>.
I didn't recognized yet, that ant has a scp task or you mean scp with the exec task?
Unfortunately i never suceeded to automaticlly login to a remote server with scp. But for now ftp is ok.

I tried out './cocoon.sh cli -d ftp://user:password@host/destionationdir -c build/mycustomwebapp'. I think this syntax is correct but I got the errormessage: 'Source is not modifiable:'

The ftp-task of ant has a depends attribute.  transfers only new or changed files if set to "yes". Defaults to "no". 

Regards Boris
  ----- Original Message ----- 
  From: Upayavira 
  To: users@cocoon.apache.org 
  Sent: Thursday, February 19, 2004 8:22 AM
  Subject: Re: CLI with Modifiable Source


  Simon Mieth wrote:

  >On Wed, 18 Feb 2004 17:57:05 +0100
  >"Boris Althaus" <bo...@petra-productions.de> wrote:
  >
  >  
  >
  >>Hello everyone,
  >>
  >>i tried out the offline-generation capabilities of Cocoon.
  >>To generate the project to local disk is no problem at
  >>all. But how I can invoke the generation with a 
  >>Modifiable Source for a ftp-transfer?
  >>
  >>Boris
  >>    
  >>
  >
  >Hi,
  >
  >i think you should ude the ant-task. Ant can publish with
  >ftp.
  >  
  >
  There are two ways. My original plan for the CLI was to allow the CLI to 
  do its own FTP with modifiable sources, then when I clicked to the 
  benefits of Ant, modifiable sources didn't seem quite so important.

  So, you can:
  1) Use Ant task to build site, then have Ant upload the site with FTP 
  (or better, SCP), or
  2) Use a modifiable source - there is one now a modifiable FTP source in 
  the Excalibur source package, which should mean that you can just use  
  ftp://user@pass:host/path/file as your destination URI.

  The question is, how to best prevent the uploading of unchanged files. 
  There is 'unannounced' code in Cocoon to do this, but Ant is probably 
  better at it. I believe it can store checksums locally, and use them to 
  decide whether a file has changed, and then only upload changed files.

  HTH.

  Regards, Upayavira



  ---------------------------------------------------------------------
  To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
  For additional commands, e-mail: users-help@cocoon.apache.org

Re: CLI with Modifiable Source

Posted by Upayavira <uv...@upaya.co.uk>.
Simon Mieth wrote:

>On Wed, 18 Feb 2004 17:57:05 +0100
>"Boris Althaus" <bo...@petra-productions.de> wrote:
>
>  
>
>>Hello everyone,
>>
>>i tried out the offline-generation capabilities of Cocoon.
>>To generate the project to local disk is no problem at
>>all. But how I can invoke the generation with a 
>>Modifiable Source for a ftp-transfer?
>>
>>Boris
>>    
>>
>
>Hi,
>
>i think you should ude the ant-task. Ant can publish with
>ftp.
>  
>
There are two ways. My original plan for the CLI was to allow the CLI to 
do its own FTP with modifiable sources, then when I clicked to the 
benefits of Ant, modifiable sources didn't seem quite so important.

So, you can:
1) Use Ant task to build site, then have Ant upload the site with FTP 
(or better, SCP), or
2) Use a modifiable source - there is one now a modifiable FTP source in 
the Excalibur source package, which should mean that you can just use  
ftp://user@pass:host/path/file as your destination URI.

The question is, how to best prevent the uploading of unchanged files. 
There is 'unannounced' code in Cocoon to do this, but Ant is probably 
better at it. I believe it can store checksums locally, and use them to 
decide whether a file has changed, and then only upload changed files.

HTH.

Regards, Upayavira



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: CLI with Modifiable Source

Posted by Simon Mieth <si...@t-online.de>.
On Wed, 18 Feb 2004 17:57:05 +0100
"Boris Althaus" <bo...@petra-productions.de> wrote:

> Hello everyone,
> 
> i tried out the offline-generation capabilities of Cocoon.
> To generate the project to local disk is no problem at
> all. But how I can invoke the generation with a 
> Modifiable Source for a ftp-transfer?
> 
> Boris

Hi,

i think you should ude the ant-task. Ant can publish with
ftp.

Best regards,

Simon

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org