<ahref="http://maven.apache.org/"title="Built by Maven"class="poweredBy">
<imgclass="poweredBy"alt="Built by Maven"src="../../../images/logos/maven-feather.png"/>
</a>
</div>
</div>
<divid="bodyColumn">
<divid="contentBox">
<divclass="section">
<h2>Rome v0.3, How to build and run the tutorials sample code<aname="Rome_v0.3_How_to_build_and_run_the_tutorials_sample_code"></a></h2>
<divclass="section">
<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 <tt>~/.maven/repository</tt>). 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.3/rome-0.3.jar   ~/.maven/repository/rome/jars/</tt>).</p>
<p>Then building the samples it's easy as a pie, just run maven jar in the rome-samples project and you are all set.</p></div>
<divclass="section">
<h3>Building the samples with Ant<aname="Building_the_samples_with_Ant"></a></h3>
<p>Hopefully maven is helpful in supporting poor ant users who did not make the switch yet We generated an Ant build.xml file in order for you to be able to build rome-samples with Ant. (Actually, Maven did it for us, the maven ant goal).</p>
<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>The only thing that will be left out is Rome's jar file itself: you'll need to copy it to the rome-samples/target/lib directory (For example in UNIX would be <tt>cp rome-0.3/rome-0.3.jar  rome-samples/target/lib</tt>, where rome-0.3 is the binary distribution).</p>
<p>To build rome-samples just run <tt>ant jar</tt>.</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. They should all generate the same file named toto, but somehow it ends up empty. However the output is correctly sent to the console. We'll fix that glitch later.</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></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>