cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From conflue...@apache.org
Subject [CONF] Apache Cayenne Website > Building Cayenne
Date Wed, 04 Aug 2010 16:14:00 GMT
<html>
<head>
    <base href="https://cwiki.apache.org/confluence">
            <link rel="stylesheet" href="/confluence/s/1810/9/1/_/styles/combined.css?spaceKey=CAYSITE&amp;forWysiwyg=true"
type="text/css">
    </head>
<body style="background: white;" bgcolor="white" class="email-body">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
    <h2><a href="https://cwiki.apache.org/confluence/display/CAYSITE/Building+Cayenne">Building
Cayenne</a></h2>
    <h4>Page <b>edited</b> by             <a href="https://cwiki.apache.org/confluence/display/~andrus">Andrus
Adamchik</a>
    </h4>
        <br/>
                         <h4>Changes (22)</h4>
                                 
    
<div id="page-diffs">
            <table class="diff" cellpadding="0" cellspacing="0">
            <tr><td class="diff-unchanged" >h2. Building Cayenne <br> <br></td></tr>
            <tr><td class="diff-changed-lines" >h3. <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">Prepare</span>
<span class="diff-added-words"style="background-color: #dfd;">Prerequisites</span>
<br></td></tr>
            <tr><td class="diff-unchanged" > <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">{info:title=Useful
Information} <br>The suggested version of Maven is 2.2.1.  Older versions may not build
Cayenne. <br>{info}	 <br> <br></td></tr>
            <tr><td class="diff-unchanged" >* [Download Maven2|http://maven.apache.org/].
<br>* Check out the repository trunk (or another appropriate branch). eg: <br>
<br></td></tr>
            <tr><td class="diff-changed-lines" >{noformat}svn co https://svn.apache.org/repos/asf/cayenne/main/trunk/
<span class="diff-changed-words">cayenne<span class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">{noformat}</span></span>
<br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">cd
cayenne/ <br>{noformat} <br></td></tr>
            <tr><td class="diff-unchanged" > <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">bq.
All examples below assume the user is in {{&quot;cayenne&quot;}} folder. <br>
<br></td></tr>
            <tr><td class="diff-unchanged" >h3. Build All Modules <br> <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">{noformat}cd
cayenne &amp;&amp; mvn install{noformat} <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">{noformat}mvn
clean install{noformat} <br></td></tr>
            <tr><td class="diff-unchanged" > <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">h4.
First Time Bootstrap <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">In
order to skip the unit tests (to speed up the build process or because some tests are failing):
<br></td></tr>
            <tr><td class="diff-unchanged" > <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">When
building for the first time (with clean local repo), you must bootstrap the repository by
executing the command above. On subsequent runs, you can use other maven commands like &quot;clean&quot;,
and/or build modules one by one. <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">{noformat}mvn
-Dmaven.test.skip=true clean install{noformat} <br></td></tr>
            <tr><td class="diff-unchanged" > <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">h4.
Skipping integration tests <br> <br>In order to skip the tests (to speed up the
build process or because some tests are failing): <br> <br>{noformat}mvn -Dmaven.test.skip=true
install{noformat} <br> <br></td></tr>
            <tr><td class="diff-unchanged" >h4. Windows Woes <br>Full tree
build may fail on Windows if the Maven2 repository directory contains spaces, which it does
by default (&quot;C:\Documents and Settings\user\.m2&quot;). This is a [bug in Maven|http://jira.codehaus.org/browse/MSUREFIRE-139].
Until it is fixed, the workaround is to relocate a repository to a directory with no spaces,
e.g. &quot;C:\.m2&quot;. This can be done by entering the new location in the {{settings.xml}}
itself located in the default directory: <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" >C:\  [succeeded] <br>C:\Documents
and Settings [succeeded] <br></td></tr>
            <tr><td class="diff-changed-lines" >C:\Documents and <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">Settings\borutb\Desktop</span>
<span class="diff-added-words"style="background-color: #dfd;">Settings\user\Desktop</span>
[failed] <br></td></tr>
            <tr><td class="diff-unchanged" >{code} <br> <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" > <br>A generic assembly is built
like this: <br></td></tr>
            <tr><td class="diff-changed-lines" >{noformat}cd <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">cayenne/assembly</span>
<span class="diff-added-words"style="background-color: #dfd;">assembly</span>
&amp;&amp; mvn clean package{noformat} <br></td></tr>
            <tr><td class="diff-unchanged" > <br>A Windows assembly is built
like this: <br></td></tr>
            <tr><td class="diff-changed-lines" >{noformat}cd <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">cayenne/assembly</span>
<span class="diff-added-words"style="background-color: #dfd;">assembly</span>
&amp;&amp; mvn -P windows clean package{noformat} <br></td></tr>
            <tr><td class="diff-unchanged" > <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">A
Mac assembly is built with a shell script as Maven does not have a plugin to create a .dmg:
<br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">A
Mac assembly is built with a shell script as we haven&#39;t integrated a .dmg plugin yet:
<br></td></tr>
            <tr><td class="diff-changed-lines" >{noformat}cd <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">cayenne/assembly</span>
<span class="diff-added-words"style="background-color: #dfd;">assembly</span>
&amp;&amp; ./build-mac.sh{noformat} <br></td></tr>
            <tr><td class="diff-unchanged" > <br>h3. Refresh Documentation
from Wiki <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" >To rebuild the docs from Confluence
Wiki, a build must be done with &quot;wiki-docs&quot; profile activated: <br>
<br></td></tr>
            <tr><td class="diff-changed-lines" >{noformat}# cd <span class="diff-changed-words"><span
class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">cayenne/</span>docs/doc</span>
<br></td></tr>
            <tr><td class="diff-unchanged" ># mvn -P wiki-docs clean install -Dconfluence.userName=username
-Dconfluence.password=password <br># svn ci -m &quot;docs updated&quot;{noformat}
<br> <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">{note}Note
that building this from parent directory (&quot;cayenne/docs&quot;) will result in
the docs placed in the wrong location. We need to fix it in the POM.{note} <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">If
you have a custom keystore under ~/.keystore, you may need to explicitly specify a JVM shared
keystore to avoid build errors related to HTTPS access: <br></td></tr>
            <tr><td class="diff-unchanged" > <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">Since
Confluence installation at Apache switched to using HTTPS access, we&#39;ve seen Java
errors if a user has a custom keystore under ~/.keystore. If the build fails with errors similar
to {{&quot;PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException:
unable to find valid certification path to requested target&quot;}}, you must explicitly
specify a JVM shared keystore: <br> <br></td></tr>
            <tr><td class="diff-unchanged" >{noformat}mvn -P wiki-docs clean install
-Dconfluence.userName=username -Dconfluence.password=password \ <br>  -Djavax.net.ssl.trustStore=&lt;JAVA_HOME&gt;/lib/security/cacerts{noformat}
<br></td></tr>
        </table>
</div>                            <h4>Full Content</h4>
                    <div class="notificationGreySide">
        <h2><a name="BuildingCayenne-BuildingCayenne"></a>Building Cayenne</h2>

<h3><a name="BuildingCayenne-Prerequisites"></a>Prerequisites</h3>

<ul>
	<li><a href="http://maven.apache.org/" class="external-link" rel="nofollow">Download
Maven2</a>.</li>
	<li>Check out the repository trunk (or another appropriate branch). eg:</li>
</ul>


<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent
panelContent">
<pre>svn co https://svn.apache.org/repos/asf/cayenne/main/trunk/ cayenne
cd cayenne/
</pre>
</div></div>

<blockquote><p>All examples below assume the user is in <tt>"cayenne"</tt>
folder.</p></blockquote>

<h3><a name="BuildingCayenne-BuildAllModules"></a>Build All Modules</h3>

<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent
panelContent">
<pre>mvn clean install</pre>
</div></div>

<p>In order to skip the unit tests (to speed up the build process or because some tests
are failing):</p>

<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent
panelContent">
<pre>mvn -Dmaven.test.skip=true clean install</pre>
</div></div>

<h4><a name="BuildingCayenne-WindowsWoes"></a>Windows Woes</h4>
<p>Full tree build may fail on Windows if the Maven2 repository directory contains spaces,
which it does by default ("C:\Documents and Settings\user\.m2"). This is a <a href="http://jira.codehaus.org/browse/MSUREFIRE-139"
class="external-link" rel="nofollow">bug in Maven</a>. Until it is fixed, the workaround
is to relocate a repository to a directory with no spaces, e.g. "C:\.m2". This can be done
by entering the new location in the <tt>settings.xml</tt> itself located in the
default directory:</p>

<div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader"
style="border-bottom-width: 1px;"><b>C:\Documents and Settings\user\.m2\settings.xml</b></div><div
class="codeContent panelContent">
<pre class="code-java">&lt;settings&gt;
   &lt;localRepository&gt;c:\.m2&lt;/localRepository&gt;
&lt;/settings&gt;</pre>
</div></div>

<p>It has also been reported that there are issues with Subversion on Windows with long
paths:</p>

<div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader"
style="border-bottom-width: 1px;"><b>Long Path Problems in Subversion on Windows</b></div><div
class="codeContent panelContent">
<pre class="code-java">
C:\  [succeeded]
C:\Documents and Settings [succeeded]
C:\Documents and Settings\user\Desktop [failed]
</pre>
</div></div>

<h3><a name="BuildingCayenne-BuildAssemblies"></a>Build Assemblies</h3>

<p>A generic assembly is built like this:</p>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent
panelContent">
<pre>cd assembly &amp;&amp; mvn clean package</pre>
</div></div>

<p>A Windows assembly is built like this:</p>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent
panelContent">
<pre>cd assembly &amp;&amp; mvn -P windows clean package</pre>
</div></div>

<p>A Mac assembly is built with a shell script as we haven't integrated a .dmg plugin
yet:</p>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent
panelContent">
<pre>cd assembly &amp;&amp; ./build-mac.sh</pre>
</div></div>

<h3><a name="BuildingCayenne-RefreshDocumentationfromWiki"></a>Refresh Documentation
from Wiki</h3>

<p>To rebuild the docs from Confluence Wiki, a build must be done with "wiki-docs" profile
activated:</p>

<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent
panelContent">
<pre># cd docs/doc
# mvn -P wiki-docs clean install -Dconfluence.userName=username -Dconfluence.password=password
# svn ci -m "docs updated"</pre>
</div></div>

<p>If you have a custom keystore under ~/.keystore, you may need to explicitly specify
a JVM shared keystore to avoid build errors related to HTTPS access:</p>

<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent
panelContent">
<pre>mvn -P wiki-docs clean install -Dconfluence.userName=username -Dconfluence.password=password
\
  -Djavax.net.ssl.trustStore=&lt;JAVA_HOME&gt;/lib/security/cacerts</pre>
</div></div>
    </div>
        <div id="commentsSection" class="wiki-content pageSection">
        <div style="float: right;">
            <a href="https://cwiki.apache.org/confluence/users/viewnotifications.action"
class="grey">Change Notification Preferences</a>
        </div>
        <a href="https://cwiki.apache.org/confluence/display/CAYSITE/Building+Cayenne">View
Online</a>
        |
        <a href="https://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=9731&revisedVersion=31&originalVersion=30">View
Changes</a>
            </div>
</div>
</div>
</div>
</div>
</body>
</html>

Mime
View raw message