cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From conflue...@apache.org
Subject [CONF] Apache Cayenne Documentation > Ant Tasks
Date Tue, 22 Dec 2009 11:29:00 GMT
<html>
<head>
    <base href="http://cwiki.apache.org/confluence">
            <link rel="stylesheet" href="/confluence/s/1519/1/1/_/styles/combined.css?spaceKey=CAYDOC&amp;forWysiwyg=true"
type="text/css">
    </head>
<body style="background-color: white" bgcolor="white">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
     <h2><a href="http://cwiki.apache.org/confluence/display/CAYDOC/Ant+Tasks">Ant
Tasks</a></h2>
     <h4>Page <b>edited</b> by             <a href="http://cwiki.apache.org/confluence/display/~andrus">Andrus
Adamchik</a>
    </h4>
     
          <br/>
     <div class="notificationGreySide">
         <h2><a name="AntTasks-Anttasks"></a>Ant tasks</h2>

<p>Cayenne ships with Ant tasks that provide Ant frontend to a number of useful operations
in Cayenne.  These tasks are part of the cayenne-tools JAR. The following tasks are included:</p>

<ul>
	<li><b><a href="/confluence/display/CAYDOC/cgen" title="cgen">cgen</a></b>
- Java class generator</li>
	<li><b><a href="/confluence/display/CAYDOC/cdbgen" title="cdbgen">cdbgen</a></b>
- Database schema generator</li>
	<li><b><a href="/confluence/display/CAYDOC/cdataport" title="cdataport">cdataport</a></b>
- Data porting tool.</li>
	<li><b><a href="/confluence/display/CAYDOC/cdbimport" title="cdbimport">cdbimport</a></b>
- Database schema importer.</li>
</ul>


<h3><a name="AntTasks-ImportingCayenneTasksinbuild.xml"></a>Importing Cayenne
Tasks in build.xml</h3>

<p>All Cayenne tasks above can be imported at once with "typedef". First a user needs
to define Classpath structure to include cayenne-tools and a few depdendencies. Here they
are shown relative to the Cayenne distro folder. In a real project they may be copied to the
appropriate project folders and referenced accordingly:</p>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-xml">
<span class="code-tag">&lt;path id=<span class="code-quote">"classpath"</span>&gt;</span>
   <span class="code-tag">&lt;fileset dir=<span class="code-quote">"lib"</span>
&gt;</span>
      <span class="code-tag">&lt;include name=<span class="code-quote">"cayenne-tools-X.X.jar"</span>
/&gt;</span>
      <span class="code-tag">&lt;include name=<span class="code-quote">"cayenne-server-X.X.jar"</span>
/&gt;</span>
      <span class="code-tag">&lt;include name=<span class="code-quote">"third-party/vpp-2.2.1.jar"</span>
/&gt;</span>
   <span class="code-tag">&lt;/fileset&gt;</span>
<span class="code-tag">&lt;/path&gt;</span></pre>
</div></div>

<p>And then import all tasks with "typedef", referencing Antlib descriptor in Cayenne:</p>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-xml"><span class="code-tag">&lt;typedef resource=<span
class="code-quote">"org/apache/cayenne/tools/antlib.xml"</span>&gt;</span>

   <span class="code-tag">&lt;classpath refid=<span class="code-quote">"classpath"</span>/&gt;</span>

<span class="code-tag">&lt;/typedef&gt;</span></pre>
</div></div>

<h3><a name="AntTasks-Sections"></a>Sections</h3>

<ol>
	<li><a href="/confluence/display/CAYDOC/cgen" title="cgen">cgen</a></li>
	<li><a href="/confluence/display/CAYDOC/cdbgen" title="cdbgen">cdbgen</a></li>
	<li><a href="/confluence/display/CAYDOC/cdataport" title="cdataport">cdataport</a></li>
	<li><a href="/confluence/display/CAYDOC/cdbimport" title="cdbimport">cdbimport</a></li>
</ol>


     </div>
     <div id="commentsSection" class="wiki-content pageSection">
       <div style="float: right;">
            <a href="http://cwiki.apache.org/confluence/users/viewnotifications.action"
class="grey">Change Notification Preferences</a>
       </div>

       <a href="http://cwiki.apache.org/confluence/display/CAYDOC/Ant+Tasks">View Online</a>
       |
       <a href="http://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=10623&revisedVersion=11&originalVersion=10">View
Change</a>
              |
       <a href="http://cwiki.apache.org/confluence/display/CAYDOC/Ant+Tasks?showComments=true&amp;showCommentArea=true#addcomment">Add
Comment</a>
            </div>
</div>
</div>
</div>
</div>
</body>
</html>

Mime
View raw message