<h3>Building the samples with Maven<aname="Building_the_samples_with_Maven"></a></h3>
<p>This is, as usual, the easiest way.</p>
<p>There's only one configuration step: Maven downloads dependencies from an online repository (by default ibiblio), to a local repository (on UNIX usually in ~/.maven/repository). Because the rome distribution is not yet on ibiblio, you need to add it yourself, either to your local repository, or to your own intranet maven repository if you have such a thing in your organization.</p>
<p>If you built ROME run maven jar:install in the rome project to install ROME's jar in your Maven repository.</p>
<p>If you got ROME binary distribution copy the ROME's jar file to your Maven repository (on UNIX that would be <tt>cp rome-0.5/rome-0.5.jar ~/.maven/repository/rome/jars/</tt>).</p>
<p>Then building the samples it's easy as a pie, just run maven jar in the samples sub-project and you are all set.</p>
<p>To build the sample Web Application, just run maven war in the samples sub-project. The WAR file, <tt>rome-samples.war</tt>, will be created under the <tt>target</tt> directory.</p></div>
<divclass="section">
<h3>Building the samples with Ant<aname="Building_the_samples_with_Ant"></a></h3>
<p>The targets present in the build.xml are very helpful, ant get-deps will download from ibiblio to rome-samples/target/lib all the jar files ROME depends on and are needed for building an application using Rome.</p>
<p>In order to build the samples (or any subprojects), you'll need to first ensure that rome itself is built. You can do this simply by running ant in the project root directory.</p>
<p>Once this is done, change to the samples directory, and just run ant. This will produce two files, rome-samples.jar which contains the sample applications, and rome-samples.war which will contain a deployable web application war file for the FeedServlet sample.</p></div>
<divclass="section">
<h3>Running the samples with Maven<aname="Running_the_samples_with_Maven"></a></h3>
<p>The Maven goals for running the samples are defined in maven.xml.</p>
<ul>
<li><tt>maven run-agr</tt> runs the FeedAggregator sample</li>
<li><tt>maven run-conv</tt> runs the FeedConverter sample</li>
<li><tt>maven run-read</tt> runs the FeedReader sample</li>
<li><tt>maven run-write</tt> runs the FeedWriter sample</li>
<li><tt>maven run-sampleModule</tt> runs the FeedConverter sample against a file with Sample Module data (shows off custom module plugin)</li></ul>
<p>To run the sample Web Application you'll need to deploy the WAR file into your servlet container. If you are using Tomcat 4 or Tomcat 5 and the WAR file was dropped in the <tt>${TOMCAT}/webapps</tt> directory the URL for the <tt>FeedServlet</tt> would be <aclass="externalLink"href="http://localhost:8080/rome-samples/feed">http://localhost:8080/rome-samples/feed</a> in a default localhost Tomcat installation. </p></div>
<divclass="section">
<h3>Running the samples with Ant<aname="Running_the_samples_with_Ant"></a></h3>
<p>All ant targets for the samples generate the same file named toto: feel free to customize this build.xml to your own needs. Also today all these targets depends on the jar target, which represents some overhead if you have already built. Get rid of that once your project is well setup.</p>
<ul>
<li><tt>ant run-aggr</tt> runs the FeedAggregator sample</li>
<li><tt>ant run-conv</tt> runs the FeedConverter sample</li>
<li><tt>ant run-read</tt> runs the FeedReader sample</li>
<li><tt>ant run-write</tt> runs the FeedWriter sample</li>
<li><tt>ant run-sampleModule</tt> runs the FeedConverter sample against a file with Sample Module data (shows off custom module plugin)</li></ul></div></div>