directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From conflue...@apache.org
Subject [CONF] Apache Directory Development > Releasing Studio
Date Fri, 13 Jan 2012 13:33:00 GMT
<html>
<head>
    <base href="https://cwiki.apache.org/confluence">
            <link rel="stylesheet" href="/confluence/s/2042/9/1/_/styles/combined.css?spaceKey=DIRxDEV&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/DIRxDEV/Releasing+Studio">Releasing
Studio</a></h2>
    <h4>Page <b>edited</b> by             <a href="https://cwiki.apache.org/confluence/display/~pamarcelot">Pierre-Arnaud
Marcelot</a>
    </h4>
        <br/>
                         <h4>Changes (5)</h4>
                                 
    
<div id="page-diffs">
                    <table class="diff" cellpadding="0" cellspacing="0">
    
            <tr><td class="diff-unchanged" >Since we are using Nexus for releases
the release process is as follows (see also [http://www.apache.org/dev/publishing-maven-artifacts.html#staging-maven]).
<br> <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">h3.
0. Verify Your Maven Settings <br> <br>Several things need to be correctly configured
in your _&#39;settings.xml&#39;_ file located at _&#39;~/.m2/settings.xml&#39;_.
<br> <br>Here&#39;s a sample file: <br>{noformat} <br>&lt;settings&gt;
<br>  &lt;servers&gt; <br>    &lt;!-- To publish a snapshot --&gt;
<br>    &lt;server&gt; <br>      &lt;id&gt;apache.snapshots.https&lt;/id&gt;
<br>      &lt;username&gt;[Your Apache ID]&lt;/username&gt; <br>
     &lt;password&gt;[Your Apache Password]&lt;/password&gt; <br>  
 &lt;/server&gt; <br>    &lt;!-- To stage a release --&gt; <br>
   &lt;server&gt; <br>      &lt;id&gt;apache.releases.https&lt;/id&gt;
<br>      &lt;username&gt;[Your Apache ID]&lt;/username&gt; <br>
     &lt;password&gt;[Your Apache Password]&lt;/password&gt; <br>  
 &lt;/server&gt; <br>  &lt;/servers&gt; <br> <br>  &lt;profiles&gt;
<br>    &lt;profile&gt; <br>      &lt;id&gt;apache-release&lt;/id&gt;
<br>      &lt;properties&gt; <br>        &lt;!-- To sign a release
--&gt; <br>        &lt;gpg.keyname&gt;[Your Code Signing Key ID]&lt;/gpg.keyname&gt;
<br>        &lt;gpg.passphrase&gt;[Your Code Signing Key Password]&lt;/gpg.passphrase&gt;
<br>      &lt;/properties&gt; <br>    &lt;/profile&gt; <br>
 &lt;/profiles&gt; <br>&lt;/settings&gt; <br>{noformat} <br>
<br></td></tr>
            <tr><td class="diff-unchanged" >h3. 1. Test the Project <br>{noformat}
<br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" > <br>Be aware that this phase
will ask you about the release version of Studio modules. <br></td></tr>
            <tr><td class="diff-changed-lines" >We use a release number scheme
that combines a version number and the date of the <span class="diff-changed-words">release<span
class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">.</span><span
class="diff-added-chars"style="background-color: #dfd;">:</span></span> <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">An
example of this release number scheme is _&#39;2.0.0.v20120111&#39;_. <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">{noformat}
<br>[Version using &#39;X.Y.Z&#39; format].v[Date using &#39;YYYYMMDD&#39;
format] <br>{noformat} <br></td></tr>
            <tr><td class="diff-unchanged" > <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">An
example of this release number scheme is _&#39;2.0.0.v20120111&#39;_ (notice the &#39;.v&#39;
string between the version and the date). <br> <br></td></tr>
            <tr><td class="diff-unchanged" >h3. 2. Deploy a Snapshot <br>{noformat}
<br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
    
            </table>
    </div>                            <h4>Full Content</h4>
                    <div class="notificationGreySide">
        <p>Since we are using Nexus for releases the release process is as follows (see
also <a href="http://www.apache.org/dev/publishing-maven-artifacts.html#staging-maven"
class="external-link" rel="nofollow">http://www.apache.org/dev/publishing-maven-artifacts.html#staging-maven</a>).</p>

<h3><a name="ReleasingStudio-0.VerifyYourMavenSettings"></a>0. Verify Your
Maven Settings</h3>

<p>Several things need to be correctly configured in your <em>'settings.xml'</em>
file located at <em>'~/.m2/settings.xml'</em>.</p>

<p>Here's a sample file:</p>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent
panelContent">
<pre>&lt;settings&gt;
  &lt;servers&gt;
    &lt;!-- To publish a snapshot --&gt;
    &lt;server&gt;
      &lt;id&gt;apache.snapshots.https&lt;/id&gt;
      &lt;username&gt;[Your Apache ID]&lt;/username&gt;
      &lt;password&gt;[Your Apache Password]&lt;/password&gt;
    &lt;/server&gt;
    &lt;!-- To stage a release --&gt;
    &lt;server&gt;
      &lt;id&gt;apache.releases.https&lt;/id&gt;
      &lt;username&gt;[Your Apache ID]&lt;/username&gt;
      &lt;password&gt;[Your Apache Password]&lt;/password&gt;
    &lt;/server&gt;
  &lt;/servers&gt;
  
  &lt;profiles&gt;
    &lt;profile&gt;
      &lt;id&gt;apache-release&lt;/id&gt;
      &lt;properties&gt;
        &lt;!-- To sign a release --&gt;
        &lt;gpg.keyname&gt;[Your Code Signing Key ID]&lt;/gpg.keyname&gt;
        &lt;gpg.passphrase&gt;[Your Code Signing Key Password]&lt;/gpg.passphrase&gt;
      &lt;/properties&gt;
    &lt;/profile&gt;
  &lt;/profiles&gt;
&lt;/settings&gt;
</pre>
</div></div>

<h3><a name="ReleasingStudio-1.TesttheProject"></a>1. Test the Project</h3>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent
panelContent">
<pre>$ mvn release:prepare -DdryRun=true
</pre>
</div></div>

<p>Be aware that this phase will ask you about the release version of Studio modules.<br/>
We use a release number scheme that combines a version number and the date of the release:</p>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent
panelContent">
<pre>[Version using 'X.Y.Z' format].v[Date using 'YYYYMMDD' format]
</pre>
</div></div>

<p>An example of this release number scheme is <em>'2.0.0.v20120111'</em>
(notice the '.v' string between the version and the date).</p>

<h3><a name="ReleasingStudio-2.DeployaSnapshot"></a>2. Deploy a Snapshot</h3>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent
panelContent">
<pre>$ mvn deploy
</pre>
</div></div>

<p>This is useful to verify your settings in ~/.m2/settings.xml (Nexus password and
GPG key)</p>

<h3><a name="ReleasingStudio-3.PreparetheRelease"></a>3. Prepare the Release</h3>

<p>First, clean the previous test release attempt with:</p>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent
panelContent">
<pre>$ mvn release:clean
</pre>
</div></div>

<p>Next, edit the root <em>'pom.xml'</em> file to comment the <em>'repository'</em>
and <em>'application'</em> profiles, as we don't want these modules (and their
sub-modules) to be released in the Maven repository.</p>

<p>Also, edit the <em>'pom.xml'</em> file of the <em>'Apache Directory
Studio Libraries Plugins'</em> module and remove the code related to skipping the deployment
of 3rd party plugins:</p>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent
panelContent">
<pre>  &lt;build&gt;
    &lt;plugins&gt;
       &lt;!-- Skip deployment of 3rd party plugins. This causes problems when 
            deploying snapshots because the 3rd party plugins don't have a 
            snapshot version. --&gt;
       &lt;plugin&gt;
         &lt;artifactId&gt;maven-deploy-plugin&lt;/artifactId&gt;
         &lt;configuration&gt;
           &lt;skip&gt;true&lt;/skip&gt;
        &lt;/configuration&gt;
      &lt;/plugin&gt;
    &lt;/plugins&gt;
  &lt;/build&gt;
</pre>
</div></div>

<p>Then, prepare the release with:</p>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent
panelContent">
<pre>$ mvn release:prepare
</pre>
</div></div>

<p>This creates a tag here: <a href="http://svn.apache.org/viewvc/directory/studio/tags/"
class="external-link" rel="nofollow">http://svn.apache.org/viewvc/directory/studio/tags/</a></p>

<h3><a name="ReleasingStudio-4.StagetheRelease"></a>4. Stage the Release</h3>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent
panelContent">
<pre>$ mvn release:perform
</pre>
</div></div>

<p>This deploys the release to a staging repository. Go to <a href="https://repository.apache.org/index.html#stagingRepositories"
class="external-link" rel="nofollow">https://repository.apache.org/index.html#stagingRepositories</a>
and close the staging repository.</p>

<h3><a name="ReleasingStudio-5.DeploytheSite"></a>5. Deploy the Site</h3>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent
panelContent">
<pre>$ cd target/checkout
$ mvn site-deploy
</pre>
</div></div>

<p>This creates and deploys the site via ssh to people.apache.org/www/directory.apache.org/studio/gen-docs.</p>

<p>Edit the people.apache.org/www/directory.apache.org/studio/gen-docs/index.html file
and add the deployed site to the list.</p>

<h3><a name="ReleasingStudio-6.Generatethedistributionpackages"></a>6. Generate
the distribution packages</h3>

<p>Move into the <em>'application'</em> sub-module:</p>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent
panelContent">
<pre>$ cd application
</pre>
</div></div>

<p>Edit the <em>'pom.xml'</em> files of this sub-modules and all other (sub-)sub-modules
to fix the parent version which still refers to the old version number (it was not modified
during the release process because the <em>'application'</em> profile was commented):</p>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent
panelContent">
<pre>$ text-editor-command pom.xml */pom.xml
</pre>
</div></div>

<p>Run the following command to generate all the distribution packages:</p>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent
panelContent">
<pre>$ mvn clean install -Prelease
</pre>
</div></div>

<p>Now, you have all the distribution packages available at <em>'../target/release'</em>:</p>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent
panelContent">
<pre>$ ls -l ../target/release
</pre>
</div></div>

<h3><a name="ReleasingStudio-7.PublishDistributionPackages"></a>7. Publish
Distribution Packages</h3>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent
panelContent">
<pre>$ cd ../target/release
$ scp apache-ldap-api-&lt;version&gt;-* people.apache.org:public_html/shared-&lt;version&gt;/
</pre>
</div></div>

<h3><a name="ReleasingStudio-8.Vote"></a>8. Vote</h3>
<p>Start a 72h vote at the dev mailing list.</p>

<h3><a name="ReleasingStudio-9.Release"></a>9. Release</h3>
<p>If the vote succeeds Studio project can be released.</p>

<p>Go to <a href="https://repository.apache.org/index.html#stagingRepositories" class="external-link"
rel="nofollow">https://repository.apache.org/index.html#stagingRepositories</a> and
release the staging repository so all artifacts are published to Maven central.</p>

<p>Move the distribution packages to people.apache.org/www/www.apache.org/dist/directory/studio.</p>
































<div class='panelMacro'><table class='warningMacro'><colgroup><col width='24'><col></colgroup><tr><td
valign='top'><img src="/confluence/images/icons/emoticons/forbidden.gif" width="16"
height="16" align="absmiddle" alt="" border="0"></td><td><b>Outdated</b><br
/></td></tr></table></div>

<p>For these examples we'll presume a release on trunk of studio. For releases on the
tags or branches change the svn checkout line to accomodate.</p>

<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent
panelContent">
<pre>$ svn co https://svn.apache.org/repos/asf/directory/studio/trunk studio
$ cd studio
$ mvn -Prelease -DdryRun=true release:prepare    # Dry-run first.  
... 
... Make sure the change made by the release plugin is correct!
...
$ mvn release:clean      # Clean up the temporary files created by the dry-run.
$ mvn -Prelease release:prepare    # Copy to tags directory.
$ mvn -Prelease release:perform    # Upload the released artifacts to the maven repository.
... 
... Make sure the jars/poms and their signature files are properly deployed to the m2-ibiblio-sync

... repository on people.apache.org before running the clean goal or else you cannot rollback
the
... release.
...
$ mvn release:clean      # Clean up the temporary files.
</pre>
</div></div>

<div class='panelMacro'><table class='warningMacro'><colgroup><col width='24'><col></colgroup><tr><td
valign='top'><img src="/confluence/images/icons/emoticons/forbidden.gif" width="16"
height="16" align="absmiddle" alt="" border="0"></td><td>During the prepare
goal's execution you'll be asked a number of questions.  Please pay close attention to each
question instead of hitting return everytime.  In particular there is a question about what
you want to call the tag.  If you do not specify the correct tag which should be the release
number 1.3.0 in this case, maven will use parent-1.3.0 instead without the <b>parent-</b>
prefix.  We don't want that so pay attention.  Look here if you have any questions regarding
what release tags should be for the studio subproject: 

<p><a href="http://svn.apache.org/viewvc/directory/studio/tags" class="external-link"
rel="nofollow">http://svn.apache.org/viewvc/directory/studio/tags</a></p></td></tr></table></div>

<p>These commands will build, tag, sign, and deploy studio artifacts and their signature
files to the repository. Check the following URLs during different stages of the process to
see Maven at work:</p>

<div class='table-wrap'>
<table class='confluenceTable'><tbody>
<tr>
<th class='confluenceTh'>Stage</th>
<th class='confluenceTh'>URL</th>
</tr>
<tr>
<td class='confluenceTd'>after release:prepare</td>
<td class='confluenceTd'> <a href="http://svn.apache.org/viewvc/directory/studio/tags"
class="external-link" rel="nofollow">http://svn.apache.org/viewvc/directory/studio/tags</a>
</td>
</tr>
<tr>
<td class='confluenceTd'>during release:perform</td>
<td class='confluenceTd'> <a href="http://people.apache.org/repo/m2-ibiblio-rsync-repository/org/apache/directory/studio/"
class="external-link" rel="nofollow">http://people.apache.org/repo/m2-ibiblio-rsync-repository/org/apache/directory/studio/</a>
</td>
</tr>
</tbody></table>
</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/DIRxDEV/Releasing+Studio">View
Online</a>
        |
        <a href="https://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=97472&revisedVersion=6&originalVersion=5">View
Changes</a>
            </div>
</div>
</div>
</div>
</div>
</body>
</html>

Mime
View raw message