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 > Top Level Pom Management Policy
Date Sun, 06 Mar 2011 22:19:00 GMT
<html>
<head>
    <base href="https://cwiki.apache.org/confluence">
            <link rel="stylesheet" href="/confluence/s/2036/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/Top+Level+Pom+Management+Policy">Top
Level Pom Management Policy</a></h2>
    <h4>Page <b>edited</b> by             <a href="https://cwiki.apache.org/confluence/display/~seelmann">Stefan
Seelmann</a>
    </h4>
        <br/>
                         <h4>Changes (1)</h4>
                                 
    
<div id="page-diffs">
                    <table class="diff" cellpadding="0" cellspacing="0">
    
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" >{noformat} <br> <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">{note}When
asked for the SCM release tag please *remove* the _project_ prefix, the version number is
enough.{note}  <br> <br></td></tr>
            <tr><td class="diff-unchanged" >This creates a tag here: [http://svn.apache.org/viewvc/directory/project/tags/]
<br> <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
    
            </table>
    </div>                            <h4>Full Content</h4>
                    <div class="notificationGreySide">
        <h2><a name="TopLevelPomManagementPolicy-WhatistheTLPPOM%3F"></a>What
is the TLP POM?</h2>

<p>The top level Maven Project Object Model (POM) for Directory is used to centralize
information about the Directory Project which is common to all projects at the TLP.  It can
be used in the POM inheritance tree to make sure subprojects use the appropriate repositories
and contain the same information that can be managed centrally rather than duplicated in every
subproject's master POM file. </p>

<h2><a name="TopLevelPomManagementPolicy-SomeHistoryRegardingMavenInteractions"></a>Some
History Regarding Maven Interactions </h2>

<p>The top level POM was used initially to build all the projects at Directory which
is a bit out of line with what it should really have been used for as stated above.  Hence
it has directives now to build all the subprojects like shared and daemon as well as apacheds.
 This causes it's misuse to facilitate building ApacheDS and all it's dependencies in one
big build.  This must stop because this usage makes it inconvenient to use for building other
projects like Triplesec and Apache Directory Studio once it moves to Maven.</p>

<p>Futhermore because of the limitations of subversion externals directives this file
is being copied into a directory that contains all the ApacheDS external dependencies.  SVN
does not allow an externals link on a file.  Externals can only be used with directories.
 So the file is being copied to build ADS in different branches and we're failing to properly
version this file.</p>

<div class='panelMacro'><table class='noteMacro'><colgroup><col width='24'><col></colgroup><tr><td
valign='top'><img src="/confluence/images/icons/emoticons/warning.gif" width="16" height="16"
align="absmiddle" alt="" border="0"></td><td>Some may ask, "If we do not copy
this pom.xml into the apacheds-with-dependencies SVN folders then how do we build ApacheDS
with all it's dependencies at one time?"  The best way around this is to create a new simple
POM with just a modules section in these SVN folders (w/ externals to ApacheDS dependencies)
and give it a totally different subproject specific artifact Id to indicate it's use for things
like this.  Deploying this placeholder pom.xml is not really necessary but it can be done.</td></tr></table></div>

<p>Another issue regarding the TLP POM file for Directory exists due to a Maven bug.
 Maven cannot resolve and download SNAPSHOT parent POMs it seems.  So if projects refer to
this TLP POM as their parent they must refer to a non-SNAPSHOT version of it.  Otherwise when
attempting to build the subproject the build will fail.  For example if the daemon subproject
refers to 1.0.5-SNAPSHOT of the TLP POM as it's parent the build for the daemon project will
fail unless this 1.0.5-SNAPSHOT pom.xml file is in the directory above the daemon sources
and the build is issued one level above the daemon folder.  If of course the 1.0.5-SNAPSHOT
is already in the local repository then there is no problem.  This situation prevents successful
builds on fresh checkouts of subprojects like daemon or apacheds when the parent TLP POM is
a SNAPSHOT.   </p>

<h2><a name="TopLevelPomManagementPolicy-CorrectiveActionstoProperlyUsetheTLPPOM"></a>Corrective
Actions to Properly Use the TLP POM</h2>

<ol>
	<li>TLP POM shall have no modules section (not used to build other projects)</li>
	<li>Remove all elements which specific to a project - only common information is to
be stored in this TLP POM</li>
	<li>Do not copy the TLP POM in SVN</li>
	<li>All Mavenized subprojects shall use this TLP POM as their parent</li>
	<li>No SNAPSHOTs of TLP pom are to be managed - changes are atomic causing a bump in
the revision with an immediate release of the TLP POM</li>
	<li>No vote needed for TLP POM release for PMC members - just a notification to release
with 4 hour grace period to accommodate the lack of using SNAPSHOT for this POM</li>
</ol>


<h2><a name="TopLevelPomManagementPolicy-ManagingReleases"></a>Managing
Releases</h2>

<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>

<p>1. Prepare the POM</p>

<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent
panelContent">
<pre>$ mvn release:prepare -DdryRun=true
</pre>
</div></div>

<p>2. Deploy a snapshot</p>
<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>

<p>3. Prepare the release</p>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent
panelContent">
<pre>$ mvn release:clean
$ mvn release:prepare
</pre>
</div></div>

<div class='panelMacro'><table class='noteMacro'><colgroup><col width='24'><col></colgroup><tr><td
valign='top'><img src="/confluence/images/icons/emoticons/warning.gif" width="16" height="16"
align="absmiddle" alt="" border="0"></td><td>When asked for the SCM release
tag please <b>remove</b> the <em>project</em> prefix, the version
number is enough.</td></tr></table></div> 

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

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

<p>This deploys the POM 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>

<p>5. Inform dev list<br/>
Inform the dev list to publish (release) this POM. After a 4 hr grace period the POM can be
released, therefor 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.</p>

<p>Only PMC members are allowed to release this POM since it requires special handling
and information associated with the TLP.  Normal committers must request that a PMC member
handle the publishing of this file.</p>

    </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/Top+Level+Pom+Management+Policy">View
Online</a>
        |
        <a href="https://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=54837&revisedVersion=10&originalVersion=9">View
Changes</a>
            </div>
</div>
</div>
</div>
</div>
</body>
</html>

Mime
View raw message