You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Peter Karich <pe...@yahoo.de> on 2009/02/10 10:20:54 UTC

fast deployment; deploy a single block

Hi,

I am very new to cocoon (version 2.2.) and I would like to know how I
could avoid the long deployment time (>2min) of the simplest application.
I am sure I am doing sth. wrong, but here is my way of deployment if
sth. changes in the java code of my cocoon block:

cd block
mvn install
cd ../webapp
mvn install
mvn jetty:run

If I try to simply copy the block.jar file into the webapp this does not
work :-/
I am sorry if this question was asked several times, but I couldn't find
any useful information about this topic in the mailing list and on the
internet, except the session about Cocoon Blocks from Daniel Fagerstrom
[1], which didn't help that much.

Regards
Peter.


[1]
http://www.apachecon.com/2005/US/html/sessions.html/e=MjAwNS9VUw#1523


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


Re: fast deployment; deploy a single block

Posted by Peter Karich <pe...@yahoo.de>.
Thanks Hubert! That will help a lot. I will try your suggestions now.

Is there a 'hot-deployment' option or sth. like this for the webapp
archetype? I mean, could I enable that cocoon reloads jars if they were
changed? Because several of our test-applications can only be tested
deployed, because they reference to external resources which are not
available locally ...

Another question: is there a way of unit testing (or integration) cocoon?

Regards,
Peter.


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


Re: fast deployment; deploy a single block

Posted by Peter Karich <pe...@yahoo.de>.
Hi again

> cd block
> mvn jetty:run 

this wasn't that easy :-)

I had to add some dependencies [1], which were in the war project
statically (!?)
And instead of accessing tomcat from your browser via:
http://localhost:8080/webapp/block/matcher
you have to go to
http://localhost:8888/block/matcher

Now all is fine. This will boost my development a lot. Even the class
reloading works - yeah!!
Thanks again, this rocks!

Regards,
Peter.


[1]
cd webapp/WEB-INF/lib
 mvn install:install-file -DgroupId=httpcomponents-httpcore
-DartifactId=httpcore -Dversion=4.0-beta3 -Dpackaging=jar
-Dfile=httpcore-4.0-beta3.jar
 mvn install:install-file -DgroupId=httpcomponents-httpclient
-DartifactId=httpclient -Dversion=4.0-beta2 -Dpackaging=jar
-Dfile=httpclient-4.0-beta2.jar

 change pom.xml for the block.jar:
  <dependency>
            <groupId>httpcomponents-httpcore</groupId>
            <artifactId>httpcore</artifactId>
            <version>4.0-beta3</version>
  </dependency>
  <dependency>
            <groupId>httpcomponents-httpclient</groupId>
            <artifactId>httpclient</artifactId>
            <version>4.0-beta2</version>
  </dependency>


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


Re: fast deployment; deploy a single block

Posted by Andre Juffer <an...@oulu.fi>.
Robby Pelssers wrote:
> One remark.
>
> If I want to use properties in this block, I have to configure the
> Springconfigurator in the webapp module.  So whenever I really want to
> test my block I can't just do
>
> cd block
> mvn jetty:run
>
> I first have to install my block and  then run the webapp which leads to
> the problem that when I modify classes in the block they are not
> reflected. Or am I missing something here and are there ways to use the
> springconfigurator in  a standalone block?
>   

If you just want to test your Java classes that are independent of 
cocoon and are having their own Spring configuration, it is a lot easier 
(and also recommended, at least in my view) to create an independent 
Maven project (e.g. in Netbeans or Eclipse), where you can quickly test 
your classes. Your cocoon application (block(s)) would then depend on 
that particular project.

> Kind regards,
> Robby Pelssers 
>
> -----Original Message-----
> From: news [mailto:news@ger.gmane.org] On Behalf Of Hubert Klein Ikkink
> Sent: dinsdag 10 februari 2009 11:37
> To: users@cocoon.apache.org
> Subject: Re: fast deployment; deploy a single block
>
>
> Peter Karich <peathal <at> yahoo.de> writes:
>
>   
>> Hi,
>>
>> I am very new to cocoon (version 2.2.) and I would like to know how I
>> could avoid the long deployment time (>2min) of the simplest
>>     
> application.
>
> Hi Peter,
>
> you can simply run your block: 
>
> cd block
> mvn jetty:run
>
> Now if you change the source code the class will be reloaded without the
> need 
> to restart Jetty. I assume you have also things like sitemaps in this
> block, so 
> you can test your code.
>
> You also reference your block in other blocks for development, by
> changing the 
> rcl.properties file. In this file you can reference classes directories
> from 
> other blocks which will be reloaded when changed.
>
> I only use the webapp archetype for deployment, but never for
> development. 
>
> Kind regards, Hubert Klein Ikkink
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
>   


-- 
Andre H. Juffer              | Phone: +358-8-553 1161
Biocenter Oulu and           | Fax: +358-8-553-1141
Department of Biochemistry   | Email: andre.juffer@oulu.fi
University of Oulu, Finland  | WWW: www.biochem.oulu.fi/Biocomputing/
StruBioCat                   | WWW: www.strubiocat.oulu.fi
NordProt                     | WWW: www.nordprot.org
Triacle Biocomputing         | WWW: www.triacle-bc.com


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


RE: Re: fast deployment; deploy a single block

Posted by Robby Pelssers <ro...@ciber.nl>.
One remark.

If I want to use properties in this block, I have to configure the
Springconfigurator in the webapp module.  So whenever I really want to
test my block I can't just do

cd block
mvn jetty:run

I first have to install my block and  then run the webapp which leads to
the problem that when I modify classes in the block they are not
reflected. Or am I missing something here and are there ways to use the
springconfigurator in  a standalone block?

Kind regards,
Robby Pelssers 

-----Original Message-----
From: news [mailto:news@ger.gmane.org] On Behalf Of Hubert Klein Ikkink
Sent: dinsdag 10 februari 2009 11:37
To: users@cocoon.apache.org
Subject: Re: fast deployment; deploy a single block


Peter Karich <peathal <at> yahoo.de> writes:

> 
> Hi,
> 
> I am very new to cocoon (version 2.2.) and I would like to know how I
> could avoid the long deployment time (>2min) of the simplest
application.

Hi Peter,

you can simply run your block: 

cd block
mvn jetty:run

Now if you change the source code the class will be reloaded without the
need 
to restart Jetty. I assume you have also things like sitemaps in this
block, so 
you can test your code.

You also reference your block in other blocks for development, by
changing the 
rcl.properties file. In this file you can reference classes directories
from 
other blocks which will be reloaded when changed.

I only use the webapp archetype for deployment, but never for
development. 

Kind regards, Hubert Klein Ikkink




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


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


Re: fast deployment; deploy a single block

Posted by Hubert Klein Ikkink <h....@gmail.com>.
Peter Karich <peathal <at> yahoo.de> writes:

> 
> Hi,
> 
> I am very new to cocoon (version 2.2.) and I would like to know how I
> could avoid the long deployment time (>2min) of the simplest application.

Hi Peter,

you can simply run your block: 

cd block
mvn jetty:run

Now if you change the source code the class will be reloaded without the need 
to restart Jetty. I assume you have also things like sitemaps in this block, so 
you can test your code.

You also reference your block in other blocks for development, by changing the 
rcl.properties file. In this file you can reference classes directories from 
other blocks which will be reloaded when changed.

I only use the webapp archetype for deployment, but never for development. 

Kind regards, Hubert Klein Ikkink




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