A document has been updated: http://cocoon.zones.apache.org/daisy/documentation/1297.html
Document ID: 1297 Branch: main Language: default Name: Usage (unchanged) Document Type: Cocoon Document (unchanged) Updated on: 12/27/06 7:35:25 PM 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: 3187 bytes (previous version: 1465 bytes) Content diff: (2 equal lines skipped) <p class="note">Note: The Spring application context isn't refreshed. This means that changes to Spring appliation context configurations and beans of the scope --- "prototype" still need a reload of the web application context.</p> +++ <tt>prototype</tt> still need a reload of the web application context.</p> <h1>Step 1: Provide the configuration</h1> <p>If you want to use the reloading classloader plugin, you have to provide a properties file like this:</p> --- <pre>...</pre> +++ <pre>com.mycompany.myBlock.block%classes-dir=./target/classes</pre> <p>The property names consist of the block name (more exactly, the name of the --- Spring bean that represents a block) + <tt>%CLASSES_DIR</tt> (e.g. --- <tt>org.mycompany.myBlock.block%CLASSES_DIR</tt>). The value is the relative or --- absolute filesystem path.</p> +++ Spring bean that represents a block) + <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>... +++ <pre><project> +++ <build> +++ <plugins> +++ [...] +++ <plugin> +++ <groupId>org.apache.cocoon</groupId> +++ <artifactId>cocoon-rcl-plugin</artifactId> +++ <version>1.0.0-M1-SNAPSHOT</version> +++ </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 3: Invoke the plugin</h1> <p>The Maven 2 plugin can be invoked by calling</p> (8 equal lines skipped) <p>Now you can configure the Maven 2 Jetty plugin to use this web application: </p> --- <pre>... --- </pre> +++ <pre><project> +++ <build> +++ <plugins> +++ [...] +++ <plugin> +++ <groupId>org.mortbay.jetty</groupId> +++ <artifactId>maven-jetty-plugin</artifactId> +++ <version>6.0.2</version> +++ <configuration> +++ <connectors> +++ <connector implementation="org.mortbay.jetty.nio.SelectChannelConnector"> +++ <port>8888</port> +++ <maxIdleTime>30000</maxIdleTime> +++ </connector> +++ </connectors> +++ <webAppSourceDirectory>${project.build.directory}/rcl/webapp</webAppSourceDirectory> +++ <contextPath>/</contextPath> +++ <systemProperties> +++ <systemProperty> +++ <name>org.apache.cocoon.mode</name> +++ <value>dev</value> +++ </systemProperty> +++ </systemProperties> +++ </configuration> +++ </plugin> +++ [...] +++ </plugins> +++ </build> +++ </project> </pre> <p class="note">Unfortunatly, under certain (still unknown) circumstances there seems to be a problem with the reloading classloader which can only be worked around by starting your JVM in debug mode from within your IDE.</p> +++ <p>Call <tt>http://localhost:8888/[block-name]/</tt> in your browser!</p> +++ <h1>Alternative step 4: Use Jetty in 'debug mode' within Eclipse</h1> <p>TODO</p> (3 equal lines skipped)