A document has been updated: http://cocoon.zones.apache.org/daisy/documentation/1297.html
Document ID: 1297 Branch: main Language: default Name: Using the Reloading Classloader (unchanged) Document Type: Cocoon Document (unchanged) Updated on: 5/2/07 11:25:22 AM Updated by: Reinhard Pötz A new version has been created, state: publish Parts ===== Content ------- This part has been updated. Mime type: text/xml (unchanged) File name: (unchanged) Size: 4527 bytes (previous version: 4809 bytes) Content diff: (11 equal lines skipped) configurations are based on the <a href="daisy:1159">Getting Started guide</a>. </p> --- <h1>Step 1: Provide the configuration</h1> +++ <h1>Step 1: Enable the plugin in pom.xml</h1> --- <p>If you want to use the reloading classloader plugin, you have to provide a --- properties file <tt>rcl.properties</tt> in the root directory of the block that --- you want to run with a content like this:</p> --- --- <pre><strong>com.mycompany.myBlock1.block%classes-dir</strong>=./target/classes</pre> --- --- <p>The property names consist of the name of the block servlet which is the --- unique name of the Spring bean + <tt>%classes_dir</tt> . The value is the --- relative or absolute filesystem path.</p> --- --- <h1>Step 2: Enable the plugin in pom.xml</h1> --- <p>In the pom.xml you have to add the plugin:</p> <pre><project> (4 equal lines skipped) <groupId>org.apache.cocoon</groupId> <artifactId>cocoon-maven-plugin</artifactId> <version>1.0.0-M1-SNAPSHOT</version> --- </plugin> +++ </plugin> [...] </plugins> </build> </project> </pre> --- <p class="note">For now you have to build the plugin yourself since it hasn't --- been released yet. For this you have to checkout Cocoon trunk and run <tt>mvn --- install</tt>.</p> +++ <h1>Step 2: Configure the plugin</h1> --- <h1>Step 3: Configure the plugin</h1> --- <p>You can also provide configuration properties. Use the <a href="war-mojo.html">goal documentation</a> generated from the Javadoc comments to find out more.</p> --- <h1>Step 4: Invoke the plugin</h1> +++ <p>The central configuration file is rcl.properties which has to be put into the +++ root directory of the block that you want to run, e.g.</p> +++ <pre><strong>com.mycompany.myBlock1.block%classes-dir</strong>=./target/classes</pre> +++ +++ <p>The property names consist of the name of the block servlet which is the +++ unique name of the Spring bean + <tt>%classes_dir</tt> . The value is the +++ relative or absolute filesystem path.</p> +++ +++ <h1>Step 3: Invoke the plugin</h1> +++ <p>The Maven 2 plugin can be invoked by calling</p> <pre>mvn cocoon:rcl</pre> (22 equal lines skipped) </plugin> </pre> --- <h1>Step 5: Create Eclipse project files</h1> +++ <h1>Step 4: Create Eclipse project files</h1> <p>Move to <tt>getting-started-app/ </tt>and invoke</p> <pre>mvn eclipse:eclipse</pre> <p>and import the new Eclipse project into your Eclipse workspace.</p> --- <h1>Step 6: Start the servlet container</h1> +++ <h1>Step 5: Start the servlet container</h1> <h2>Alternative A: The Maven Jetty plugin</h2> (38 equal lines skipped) <p>There is a <a href="daisy:1301">tutorial</a> that describes how to debug Cocoon.</p> --- <h1>Step 7: Change a class file</h1> +++ <h1>Step 6: Change a class file</h1> <p>Now it's time to see the reloading classloader in action. Open <tt>getting-started-app/myBlock1/src/main/java/com/mycompany/???</tt> and change (4 equal lines skipped)