Ken Starks wrote:
Reinhard Pötz wrote:
Ken Starks wrote:
Reinhard Pötz wrote:
Ken Starks wrote:
I am still working through the introductory tutorials for Cocoon 2.2,
together with watching the screencast by Grzegorz Kossakowski.

According to my version, this is Task 8 (see below), but whatever I do,
I get a resounding NO to both questions at the end.
NO -- RCL [UPDATE] in the console
NO -- change in the browser

Can someone please do one of the following:
   confirm it doesn't work for them either   OR
   confirm that it works for them, 'out of the box'  OR
   explain exactly how to configure things so it does work.


+++++++++++++++++++++++++++++++++++++++++++++++++++++++++


Task 8. myBlock2{changing a spring-bean)
-------------------------------------------
In this task, we make some minor changes to a java file, and observe the effect in
both the Maven console and in the Browser.
If the RCL `class reloader' is working, the changes should happen without
stopping Jetty.

checklist
--------
* select myBlock2 in Eclipse
* mvn jetty:run
* see what happens in the console and the browser
* edit myBean.java
* see what happens when you save it
    + watch the output in the maven console
       ? Did you get a RCL [UPDATE] message ?
    + refresh http://localhost:8888/myBlock2/spring-bean
       ? did the browser show your edits ?


Once I saw it failing because the automatic compilation of Java sources was turned off. Can you make sure that all classes are compiled to ./target/classes?

Thanks for such an ultra-fast response.
my ./target/classes/ directory indeed contains no classes. it just gets a chain of empty directories, as you would expect,
corresponding to my GroupId and artifactId.

Unfortunately i do not know how to 'make sure all classes are compiled there', beacuse i have not
learned Java yet. Can you explain?

My working environment is usually Maven, Eclipse, and the 'Maven integration for eclipse' plugin from
http://m2eclipse.sonatype.org/
But any sort of explanation would be VERY gratefully recieved.

When you run the Maven eclipse:eclipse goal, you should find a file .classpath in the root directory of your module. Make sure that you have an entry

<classpathentry kind="output" path="target/classes"/>

there.

After verifying this, go to the "Project" menu of Eclipse and make sure that "Build Automatically" is checked.

Finally go to "Project - Clean ..." and rebuild your workspace completely. Now class reloading should work.

HTH

I have now tried your suggestions several times but with no success.
a. NO -- .class files under ..target/classes/..../ when the project is built.
b. NO -- RCL [UPDATE] in the console
c. NO -- change in the browser

What might i try next?


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Sorry, I am getting the .class files under ../target/classes/.. they just are not visible in Eclipse, even after a 'refresh'

This morning I have narrowed the problem down a bit more.

First I built a block where there are no spaces in the path; it did not help.

Then, in a different command window, I compiled an altered MyBean.java by hand. RCL did pick this up quite happily, and the altered output came to the Browser without stopping Jetty.



++++++++ In detail +++++++++++
development directory: C:\LargeWhite\
groupid : whauphill.ken
artifactid: anotherBlock

Command Window One:
 cd C:\LargeWhite\anotherblock
 mvn jetty:run > jetty_run.txt

Command Window Two :
 cd C:\LargeWhite\anotherBlock\src\main\java\whauphill\ken\anotherBlock\
 ( edit MyBean.java)
 javac -d C:\LargeWhite\anotherBlock\target\classes\  MyBean.java

 # and for luck
 cd C:\LargeWhite\anotherBlock\target\classes\whauphill\ken\anotherBlock\
 touch MyFalseBean.class
 mv MyFalseBean.class MyFalseBean2.class
 rm MyFalsebean2.class

+++++++++ result ++++++++++

At each stage the output to the browser was as expected.
the output to the main console was also as expected
 (On this run, some was redirected to a file)

+++++++  The important bit, I think +++++++++
 (when I compiled the new MyBean.java )

RCL [update]: C:\LargeWhite\anotherBlock\.\target\classes\whauphill\ken\anotherBlock\MyBean.class


++++++++++++++++ The complete output to the file +++++++++++++++


[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'jetty'.
[INFO] ------------------------------------------------------------------------
[INFO] Building anotherBlock
[INFO]    task-segment: [jetty:run]
[INFO] ------------------------------------------------------------------------
[INFO] Preparing jetty:run
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:compile]
[INFO] Nothing to compile - all classes are up to date
[INFO] Preparing cocoon:prepare
[WARNING] Removing: prepare from forked lifecycle, to prevent recursive invocation.
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:compile]
[INFO] Nothing to compile - all classes are up to date
[INFO] [cocoon:prepare {execution: prepare}]
[INFO] Preparing a Cocoon web application.
[INFO] Deploying string-template to WEB-INF/log4j.xml
[INFO] Adding lib to WEB-INF/lib: commons-logging:commons-logging:1.1:jar
[INFO] Adding lib to WEB-INF/lib: org.apache.commons:commons-jci-core:1.0:jar
[INFO] Adding lib to WEB-INF/lib: commons-io:commons-io:1.3.1:jar
[INFO] Adding lib to WEB-INF/lib: log4j:log4j:1.2.14:jar
[INFO] Adding lib to WEB-INF/lib: commons-logging:commons-logging-api:1.1:jar
[INFO] Adding lib to WEB-INF/lib: javax.servlet:servlet-api:2.3:jar
[INFO] Adding lib to WEB-INF/lib: org.apache.cocoon:cocoon-rcl-webapp-wrapper:1.0.0-M2:jar
[INFO] Adding lib to WEB-INF/lib: org.apache.commons:commons-jci-fam:1.0:jar
[INFO] No patches to apply
[INFO] [resources:testResources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:testCompile]
[INFO] No sources to compile
[INFO] [jetty:run]
[INFO] Configuring Jetty for project: anotherBlock
[INFO] Webapp source directory = C:\LargeWhite\anotherBlock\target\rcl\webapp [INFO] web.xml file = C:\LargeWhite\anotherBlock\target\rcl\webapp\WEB-INF\web.xml
[INFO] Classes = C:\LargeWhite\anotherBlock\target\classes
[INFO] Property org.apache.cocoon.mode=dev was set
[INFO] Context path = /
[INFO] Tmp directory =  determined at runtime
[INFO] Web defaults = org/mortbay/jetty/webapp/webdefault.xml
[INFO] Web overrides =  none
[INFO] Webapp directory = C:\LargeWhite\anotherBlock\target\rcl\webapp
[INFO] Starting jetty 6.1.7 ...
Loading catalog: file:/C:/LargeWhite/anotherBlock/target/work/cocoon_xml_resolver_entities/catalog
[INFO] Started Jetty Server
RCL [update]: C:\LargeWhite\anotherBlock\.\target\classes\whauphill\ken\anotherBlock\MyBean.class RCL [create]: C:\LargeWhite\anotherBlock\.\target\classes\whauphill\ken\anotherBlock\MyFalseBean.class RCL [create]: C:\LargeWhite\anotherBlock\.\target\classes\whauphill\ken\anotherBlock\MyFalseBean2.class RCL [delete]: C:\LargeWhite\anotherBlock\.\target\classes\whauphill\ken\anotherBlock\MyFalseBean.class RCL [delete]: C:\LargeWhite\anotherBlock\.\target\classes\whauphill\ken\anotherBlock\MyFalseBean2.class
[INFO] Jetty server exiting.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5 minutes 56 seconds
[INFO] Finished at: Tue Jul 29 11:36:04 BST 2008
[INFO] Final Memory: 26M/254M
[INFO] ------------------------------------------------------------------------
Terminate batch job (Y/N)?




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to