blob: 3d9655eb19163076b6e690bfac2d49b433af8e05 [file] [log] [blame]
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title xmlns:d="http://docbook.org/ns/docbook">Chapter&nbsp;1.&nbsp;Setup</title><link rel="stylesheet" type="text/css" href="css/cayenne-doc.css"><meta xmlns:d="http://docbook.org/ns/docbook" name="keywords" content="Cayenne 4.0 documentation"><meta xmlns:d="http://docbook.org/ns/docbook" name="description" content="User documentation for Apache Cayenne version 4.0"><link rel="home" href="index.html" title="Cayenne Guide"><link rel="up" href="cayenne-guide-part1.html" title="Part&nbsp;I.&nbsp;Object Relational Mapping with Cayenne"><link rel="prev" href="cayenne-guide-part1.html" title="Part&nbsp;I.&nbsp;Object Relational Mapping with Cayenne"><link rel="next" href="cayenne-mapping-structure.html" title="Chapter&nbsp;2.&nbsp;Cayenne Mapping Structure"><script xmlns:d="http://docbook.org/ns/docbook" type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-7036673-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div xmlns:d="http://docbook.org/ns/docbook" class="navheader"><table width="100%" summary="Navigation header"><tr><th class="versioninfo">v.4.0 (4.0.M5)</th><th align="center">Chapter&nbsp;1.&nbsp;Setup</th><th></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="cayenne-guide-part1.html">Prev</a>&nbsp;</td><th width="60%" align="center"><a accesskey="u" href="cayenne-guide-part1.html">Part&nbsp;I.&nbsp;Object Relational Mapping with Cayenne</a></th><td width="20%" align="right">&nbsp;<a accesskey="n" href="cayenne-mapping-structure.html">Next</a></td></tr></table><hr></div><div class="chapter"><div class="titlepage"><div><div><h2 class="title"><a name="setup"></a>Chapter&nbsp;1.&nbsp;Setup</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl class="toc"><dt><span class="section"><a href="setup.html#system-requirements">System Requirements</a></span></dt><dt><span class="section"><a href="setup.html#running-cayennemodeler">Running CayenneModeler</a></span></dt></dl></div><div class="section"><div class="titlepage"><div><div><h2 class="title"><a name="system-requirements"></a>System Requirements</h2></div></div></div><p>
</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p><span class="italic">Java</span>: Cayenne runtime framework and
CayenneModeler GUI tool are written in 100% Java, and run on any
Java-compatible platform. Minimal required JDK version depends on the
version of Cayenne you are using, as shown in the following table:
</p><div class="table"><a name="d0e38"></a><p class="title"><b>Table&nbsp;1.1.&nbsp;Cayenne Version History</b></p><div class="table-contents"><table frame="void"><col width="28%"><col width="36%"><col width="36%"><tbody><tr>
<th>Cayenne Version</th>
<th>Java Version</th>
<th>Status</th>
</tr><tr>
<td>4.0</td>
<td>Java 1.7 or newer</td>
<td>Alpha (in development)</td>
</tr><tr>
<td>3.1</td>
<td>Java 1.5 or newer</td>
<td>Stable</td>
</tr><tr>
<td>3.0</td>
<td>Java 1.5</td>
<td>Aging</td>
</tr><tr>
<td>1.2 / 2.0</td>
<td>Java 1.4</td>
<td>Legacy</td>
</tr><tr>
<td>1.1</td>
<td>Java 1.3</td>
<td>Legacy</td>
</tr></tbody></table></div></div><p><br class="table-break"></p></li></ul></div><p>
</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p><span class="italic">JDBC Driver:</span> An appropriate DB-specific
JDBC driver is needed to access the database. It can be included in the
application or used in web container DataSource configuration.</p></li></ul></div><p>
</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p><span class="italic">Third-party Libraries:</span> Cayenne runtime
framework has a minimal set of required and a few more optional dependencies
on third-party open source packages. See
<a class="link" href="including-cayenne-in-project.html" title="Chapter&nbsp;4.&nbsp;Including Cayenne in a Project">"Including Cayenne in a Project"</a>
chapter for details.
</p></li></ul></div><p>
</p></div><div class="section"><div class="titlepage"><div><div><h2 class="title"><a name="running-cayennemodeler"></a>Running CayenneModeler</h2></div></div></div><p>CayenneModeler GUI tool is intended to work with object relational mapping projects. While
you can edit your XML by hand, it is rarely needed, as the Modeler is a pretty advanced
tool included in Cayenne distribution. To obtain CayenneModeler, download Cayenne
distribution archive from
<a class="link" href="http://cayenne.apache.org/download.html" target="_top">http://cayenne.apache.org/download.html</a>
matching the OS you are using. Of course Java needs to be installed on the machine where
you are going to run the Modeler.
</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>OS X distribution contains CayenneModeler.app at the root of the distribution disk
image.
</p></li><li class="listitem"><p>Windows distribution contains CayenneModeler.exe file in the
<code class="code">bin</code>
directory.
</p></li><li class="listitem"><p>Cross-platform distribution (targeting Linux, but as the name implies, compatible with any
OS) contains a runnable CayenneModeler.jar in the <code class="code">bin</code> directory. It can be
executed either by double-clicking, or if the environment is not configured to execute
jars, by running from command-line:
</p><pre class="screen"><code class="prompt">$</code> java -jar CayenneModeler.jar</pre></li></ul></div><p>The Modeler can also be started from Maven. While it may look like an exotic way to start a
GUI application, it has its benefits - no need to download Cayenne distribution, the
version of the Modeler always matches the version of the framework, the plugin can find
mapping files in the project automatically. So it is an attractive option to some
developers. Maven option requires a declaration in the
POM:
</p><pre class="programlisting"><span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;build&gt;</span>
<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;plugins&gt;</span>
<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;plugin&gt;</span>
<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;groupId&gt;</span>org.apache.cayenne.plugins<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/groupId&gt;</span>
<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;artifactId&gt;</span>maven-cayenne-modeler-plugin<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/artifactId&gt;</span>
<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;version&gt;</span>4.0.M5<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/version&gt;</span>
<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/plugin&gt;</span>
<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/plugins&gt;</span>
<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/build&gt;</span></pre><p>
</p><p>And then can be run as
</p><pre class="screen"><code class="prompt">$</code> mvn cayenne-modeler:run</pre><p>
</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="cayenne-guide-part1.html">Prev</a>&nbsp;</td><td width="20%" align="center"><a accesskey="u" href="cayenne-guide-part1.html">Up</a></td><td width="40%" align="right">&nbsp;<a accesskey="n" href="cayenne-mapping-structure.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Part&nbsp;I.&nbsp;Object Relational Mapping with Cayenne&nbsp;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&nbsp;Chapter&nbsp;2.&nbsp;Cayenne Mapping Structure</td></tr></table></div></body></html>