You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Bart Molenkamp <b....@bizzdesign.nl> on 2006/12/13 09:46:49 UTC

[2.2] Debugging and inplace editing

Hi,

I found three tutorials on the internet about how to debug Maven web
applications in Eclipse. All three seem to work to debug Cocoon 2.2 in
Eclipse as well (first very basic tests). Here are the links, maybe it's
worth linking to them from the Cocoon 2.2 documentation.

http://docs.codehaus.org/display/JETTY/Debugging+with+the+Maven+Jetty+Pl
ugin+inside+Eclipse

http://docs.codehaus.org/display/MAVENUSER/Dealing+with+Eclipse-based+ID
E

http://mahertb.blogspot.com/2006/08/debugging-maven-web-application-with
.html

I'm also wondering if there is a way for the jetty plugin to work on the
webapp source directory directly (src/main/resources/COB-INF) instead of
copying stuff to target/my-block-1.0.0-SNAPSHOT/. For me, it's not
really an option to stop/rebuild/start for every sitemap change,
flowscript change, etc. Changing sources under
target/my-block-1.0.0-SNAPSHOT and copying them back to the source
directory isn't really an option for me either.

Does someone have a good idea about how to do this?

Thanks,
Bart.


Re: [2.2] Debugging and inplace editing

Posted by Daniel Fagerstrom <da...@nada.kth.se>.
Philipp Zerelles skrev:
> Daniel Fagerstrom wrote:
>   
>> If you use the trunk in Eclipse with the Eclipse-Jetty plugin, it 
>> already works in the way you ask for. To make it work you need to ensure 
>> that the main webapp has a project dependency on the my-block in Eclipse 
>> (e.g. by running mvn eclipse:eclipse from a top level pom). If it has 
>> Eclipse will have put the contents of my-block/src/main/resources/ on 
>> the classpath used in the main webapp. And the deployer part of Cocoon 
>> that is executed during startup will read the COB-INFs directly from 
>> classpath in the case where there is a file protocol at the classpath. 
>> Only jars are unpacked.
>>
>> See http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=116326232408386&w=2 
>> for details about the implementation.
>>     
>
> What Eclipse-Jetty plugin do you use? I tried the jetty-launcher plugin, but it does not support Jetty 6.
> Do you use Jetty 5.1 then?
>   
Yes, I use the jetty-launcher plugin with Jetty 5.1. Jetty 5.1 supports 
Servlet 1.4 which is the same as Cocoon 2.2 supports, so Jetty 5.1 is 
enough for testing purposes.

/Daniel


Re: [2.2] Debugging and inplace editing

Posted by Philipp Zerelles <ph...@moongate.de>.
Daniel Fagerstrom wrote:
> If you use the trunk in Eclipse with the Eclipse-Jetty plugin, it 
> already works in the way you ask for. To make it work you need to ensure 
> that the main webapp has a project dependency on the my-block in Eclipse 
> (e.g. by running mvn eclipse:eclipse from a top level pom). If it has 
> Eclipse will have put the contents of my-block/src/main/resources/ on 
> the classpath used in the main webapp. And the deployer part of Cocoon 
> that is executed during startup will read the COB-INFs directly from 
> classpath in the case where there is a file protocol at the classpath. 
> Only jars are unpacked.
> 
> See http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=116326232408386&w=2 
> for details about the implementation.

What Eclipse-Jetty plugin do you use? I tried the jetty-launcher plugin, but it does not support Jetty 6.
Do you use Jetty 5.1 then?

Philipp

Re: [2.2] Debugging and inplace editing

Posted by Daniel Fagerstrom <da...@nada.kth.se>.
Bart Molenkamp skrev:
...
> I'm also wondering if there is a way for the jetty plugin to work on the
> webapp source directory directly (src/main/resources/COB-INF) instead of
> copying stuff to target/my-block-1.0.0-SNAPSHOT/. For me, it's not
> really an option to stop/rebuild/start for every sitemap change,
> flowscript change, etc. Changing sources under
> target/my-block-1.0.0-SNAPSHOT and copying them back to the source
> directory isn't really an option for me either.
>
> Does someone have a good idea about how to do this?
>   
If you use the trunk in Eclipse with the Eclipse-Jetty plugin, it 
already works in the way you ask for. To make it work you need to ensure 
that the main webapp has a project dependency on the my-block in Eclipse 
(e.g. by running mvn eclipse:eclipse from a top level pom). If it has 
Eclipse will have put the contents of my-block/src/main/resources/ on 
the classpath used in the main webapp. And the deployer part of Cocoon 
that is executed during startup will read the COB-INFs directly from 
classpath in the case where there is a file protocol at the classpath. 
Only jars are unpacked.

See http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=116326232408386&w=2 
for details about the implementation.

/Daniel


Re: [2.2] Debugging and inplace editing

Posted by Giacomo Pati <gi...@otego.com>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1



Bart Molenkamp wrote:
> Hi,
> 
> I found three tutorials on the internet about how to debug Maven web
> applications in Eclipse. All three seem to work to debug Cocoon 2.2 in
> Eclipse as well (first very basic tests). Here are the links, maybe it's
> worth linking to them from the Cocoon 2.2 documentation.
> 
> http://docs.codehaus.org/display/JETTY/Debugging+with+the+Maven+Jetty+Pl
> ugin+inside+Eclipse
> 
> http://docs.codehaus.org/display/MAVENUSER/Dealing+with+Eclipse-based+ID
> E
> 
> http://mahertb.blogspot.com/2006/08/debugging-maven-web-application-with
> .html
> 
> I'm also wondering if there is a way for the jetty plugin to work on the
> webapp source directory directly (src/main/resources/COB-INF) instead of
> copying stuff to target/my-block-1.0.0-SNAPSHOT/. For me, it's not
> really an option to stop/rebuild/start for every sitemap change,
> flowscript change, etc. Changing sources under
> target/my-block-1.0.0-SNAPSHOT and copying them back to the source
> directory isn't really an option for me either.
> 
> Does someone have a good idea about how to do this?

I've solved it (until Reinhard gets reloading classloader stuff working) by configuring the jetty
plugin with a

<scanIntervalSeconds>10</scanIntervalSeconds>

which causes the jetty-plugin to scan the webapp in 10 secs intervals for new things (given your IDE
can rebuild/copy things over to the target/classes directory) and restarts the webapp.

HTH

- --
Otego AG                                  Tel:   +41 (0)1  240 00 55
Giacomo Pati, CTO                         Mobile:+41 (0)79 262 21 04
Apache Software Foundation Member         Mailto:giacomo@apache.org
Hohlstrasse 216                           Mailto:Giacomo.Pati@otego.com
CH-8004 Zuerich                           http://www.otego.com

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFFf+SgLNdJvZjjVZARArRlAJ9fq9tOf0Ew8lLGisA4U260GrviyQCgq9R/
lpv7amci75dMTuE7kRwszc0=
=IlIB
-----END PGP SIGNATURE-----

Re: [2.2] Debugging and inplace editing

Posted by Reinhard Poetz <re...@apache.org>.
Grzegorz Kossakowski wrote:
> Reinhard Poetz napisał(a):
>> Reinhard Poetz wrote:
>>> yes, I'm working on writing a recipie how to use the reloading 
>>> classloader plugin. Expect it by the end of the end.
>>
>> ahhhm, funny mistake ;-)
>>
>> "Expect it by the end of the week"
>>
> 
> Any chance it will appear shortly? I would like to write tutorial for 
> beginners how to make their first application in 2.2 and contribute it 
> to Cocoon. However, without any convenient way of rapid development 
> there is no chance to write it :(
> 

Thanks for the reminder. I will try to finish it over the Christmas holidays - 
sorry for the delay.

-- 
Reinhard Pötz           Independent Consultant, Trainer & (IT)-Coach 

{Software Engineering, Open Source, Web Applications, Apache Cocoon}

                                        web(log): http://www.poetz.cc
--------------------------------------------------------------------



	
		
___________________________________________________________ 
Der fr�he Vogel f�ngt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de

Re: [2.2] Debugging and inplace editing

Posted by Grzegorz Kossakowski <gr...@tuffmail.com>.
Reinhard Poetz napisał(a):
> Reinhard Poetz wrote:
>> yes, I'm working on writing a recipie how to use the reloading 
>> classloader plugin. Expect it by the end of the end.
>
> ahhhm, funny mistake ;-)
>
> "Expect it by the end of the week"
>

Any chance it will appear shortly? I would like to write tutorial for 
beginners how to make their first application in 2.2 and contribute it 
to Cocoon. However, without any convenient way of rapid development 
there is no chance to write it :(

-- 
Grzegorz Kossakowski

Re: [2.2] Debugging and inplace editing

Posted by Reinhard Poetz <re...@apache.org>.
Reinhard Poetz wrote:
> Torsten Curdt wrote:
>> Things have changed since my presentation in 2005. [1]
>> ...but Reinhard worked on this lately.
> 
> yes, I'm working on writing a recipie how to use the reloading 
> classloader plugin. Expect it by the end of the end.

ahhhm, funny mistake ;-)

"Expect it by the end of the week"

-- 
Reinhard Pötz           Independent Consultant, Trainer & (IT)-Coach 

{Software Engineering, Open Source, Web Applications, Apache Cocoon}

                                        web(log): http://www.poetz.cc
--------------------------------------------------------------------

Re: [2.2] Debugging and inplace editing

Posted by Reinhard Poetz <re...@apache.org>.
Torsten Curdt wrote:
> Things have changed since my presentation in 2005. [1]
> ...but Reinhard worked on this lately.

yes, I'm working on writing a recipie how to use the reloading classloader 
plugin. Expect it by the end of the end.

-- 
Reinhard Pötz           Independent Consultant, Trainer & (IT)-Coach 

{Software Engineering, Open Source, Web Applications, Apache Cocoon}

                                        web(log): http://www.poetz.cc
--------------------------------------------------------------------

Re: [2.2] Debugging and inplace editing

Posted by Torsten Curdt <tc...@apache.org>.
Things have changed since my presentation in 2005. [1]
...but Reinhard worked on this lately.

cheers
--
Torsten

[1] http://www.cocoongt.org/archive/2005/Slides-and-recordings.html

On 12/13/06, Bart Molenkamp <b....@bizzdesign.nl> wrote:
> Hi,
>
> I found three tutorials on the internet about how to debug Maven web
> applications in Eclipse. All three seem to work to debug Cocoon 2.2 in
> Eclipse as well (first very basic tests). Here are the links, maybe it's
> worth linking to them from the Cocoon 2.2 documentation.
>
> http://docs.codehaus.org/display/JETTY/Debugging+with+the+Maven+Jetty+Pl
> ugin+inside+Eclipse
>
> http://docs.codehaus.org/display/MAVENUSER/Dealing+with+Eclipse-based+ID
> E
>
> http://mahertb.blogspot.com/2006/08/debugging-maven-web-application-with
> .html
>
> I'm also wondering if there is a way for the jetty plugin to work on the
> webapp source directory directly (src/main/resources/COB-INF) instead of
> copying stuff to target/my-block-1.0.0-SNAPSHOT/. For me, it's not
> really an option to stop/rebuild/start for every sitemap change,
> flowscript change, etc. Changing sources under
> target/my-block-1.0.0-SNAPSHOT and copying them back to the source
> directory isn't really an option for me either.
>
> Does someone have a good idea about how to do this?
>
> Thanks,
> Bart.
>
>