rome/RssAndAtOMUtilitiEsROMEV0.5AndAboveTutorialsAndArticles/RssAndAtOMUtilitiEsROMEV0.5HowToBuildAndRunTheTutorialsSampleCode.html

132 lines
No EOL
8.4 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- Generated by Apache Maven Doxia Site Renderer 1.4 at 2013-09-27 -->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>ROME - Rss and atOM utilitiEs (ROME) v0.5, How to build and run the tutorials sample code</title>
<style type="text/css" media="all">
@import url("../css/maven-base.css");
@import url("../css/maven-theme.css");
@import url("../css/site.css");
</style>
<link rel="stylesheet" href="../css/print.css" type="text/css" media="print" />
<meta name="author" content="mkurz" />
<meta name="Date-Creation-yyyymmdd" content="20110815" />
<meta name="Date-Revision-yyyymmdd" content="20130927" />
<meta http-equiv="Content-Language" content="en" />
</head>
<body class="composite">
<div id="banner">
<a href="http://github.com/" id="bannerLeft">
<img src="../images/romelogo.png" alt="ROME" />
</a>
<div class="clear">
<hr/>
</div>
</div>
<div id="breadcrumbs">
<div class="xright">
<span id="publishDate">Last Published: 2013-09-27</span>
&nbsp;| <span id="projectVersion">Version: 1.1-SNAPSHOT</span>
</div>
<div class="clear">
<hr/>
</div>
</div>
<div id="leftColumn">
<div id="navcolumn">
<h5>Rome</h5>
<ul>
<li class="none">
<a href="../index.html" title="Overview">Overview</a>
</li>
<li class="collapsed">
<a href="../HowRomeWorks/index.html" title="How Rome Works">How Rome Works</a>
</li>
<li class="none">
<a href="../RssAndAtOMUtilitiEsROMEV0.5AndAboveTutorialsAndArticles/index.html" title="Tutorials And Articles">Tutorials And Articles</a>
</li>
<li class="collapsed">
<a href="../ROMEReleases/index.html" title="Releases">Releases</a>
</li>
<li class="none">
<a href="../ROMEDevelopmentProposals/index.html" title="ROME Development Proposals">ROME Development Proposals</a>
</li>
</ul>
<h5>Project Documentation</h5>
<ul>
<li class="collapsed">
<a href="../project-info.html" title="Project Information">Project Information</a>
</li>
<li class="collapsed">
<a href="../project-reports.html" title="Project Reports">Project Reports</a>
</li>
</ul>
<a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy">
<img class="poweredBy" alt="Built by Maven" src="../images/logos/maven-feather.png" />
</a>
</div>
</div>
<div id="bodyColumn">
<div id="contentBox">
<div class="section">
<h2>Rss and atOM utilitiEs (ROME) v0.5, How to build and run the tutorials sample code<a name="Rss_and_atOM_utilitiEs_ROME_v0.5_How_to_build_and_run_the_tutorials_sample_code"></a></h2>
<p>These instructions are outdated</p>
<div class="section">
<h3>Building the samples with Maven<a name="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>
<div class="section">
<h3>Building the samples with Ant<a name="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>
<div class="section">
<h3>Running the samples with Maven<a name="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 <a class="externalLink" href="http://localhost:8080/rome-samples/feed">http://localhost:8080/rome-samples/feed</a> in a default localhost Tomcat installation. </p></div>
<div class="section">
<h3>Running the samples with Ant<a name="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>
</div>
</div>
<div class="clear">
<hr/>
</div>
<div id="footer">
<div class="xright">
Copyright &#169; 2004-2013
<a href="http://www.rometools.org">ROME Project</a>.
All Rights Reserved.
</div>
<div class="clear">
<hr/>
</div>
</div>
</body>
</html>