CINXE.COM
Initial Code Import
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"/> <title>Initial Code Import</title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="description" content=""> <meta name="author" content=""> <meta name="keywords" content=""> <meta name="generator" content="JBake"> <!-- Le styles --> <link href="../css/incubator.css" rel="stylesheet"> <link href="../css/bootstrap.css" rel="stylesheet"> <link href="../css/asciidoctor.css" rel="stylesheet"> <link href="../css/base.css" rel="stylesheet"> <link href="../css/prettify.css" rel="stylesheet"> <!-- HTML5 shim, for IE6-8 support of HTML5 elements --> <!--[if lt IE 9]> <script src="../js/html5shiv.min.js"></script> <![endif]--> <!-- Fav and touch icons --> <!--<link rel="apple-touch-icon-precomposed" sizes="144x144" href="../assets/ico/apple-touch-icon-144-precomposed.png"> <link rel="apple-touch-icon-precomposed" sizes="114x114" href="../assets/ico/apple-touch-icon-114-precomposed.png"> <link rel="apple-touch-icon-precomposed" sizes="72x72" href="../assets/ico/apple-touch-icon-72-precomposed.png"> <link rel="apple-touch-icon-precomposed" href="../assets/ico/apple-touch-icon-57-precomposed.png">--> <link rel="shortcut icon" href="https://www.apache.org/favicon.ico"> <script src="https://www.apachecon.com/event-images/snippet.js"></script> </head> <body onload="prettyPrint()"> <div id="wrap"> <!-- Fixed navbar --> <div class="navbar navbar-default navbar-fixed-top" role="navigation"> <div class="container"> <div class="navbar-header"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <a class="navbar-brand" href="/"><i class="icon-home"></i>Apache Incubator</a> </div> <div class="navbar-collapse collapse"> <ul class="nav navbar-nav"> <li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown">Policies <b class="caret"></b></a> <ul class="dropdown-menu"> <li><a href="/policy/incubation.html">Incubation Policy</a></li> <li><a href="/ip-clearance/">Intellectual Property Clearance</a></li> </ul> </li> <li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown">Proposals <b class="caret"></b></a> <ul class="dropdown-menu"> <li><a href="/guides/proposal.html">A Guide To Proposal Creation</a></li> </ul> </li> <li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown">Podling Guides <b class="caret"></b></a> <ul class="dropdown-menu"> <li><a href="/cookbook">Cookbook</a></li> <li><hr><a href="/guides/roles_and_responsibilities.html">Roles and Responsibilities</a></li> <li><a href="/guides/committer.html">Committers</a></li> <li><a href="/guides/ppmc.html">Podling Project Management Committee</a></li> <li><a href="/guides/community.html">Guide to Successful Community Building</a></li> <li><hr><a href="/guides/branding.html">Incubator Branding Guide</a></li> <li><a href="/guides/publicity.html">Podling Publicity/Media Guidelines</a></li> <li><a href="/guides/press-kit.html">Podling Press Kit</a></li> <li><hr><a href="/guides/transitioning_asf.html">Initial Code Import</a></li> <li><a href="/guides/names.html">Podling Name Search Guide</a></li> <li><a href="/guides/ip_clearance.html">Podling IP Clearance</a></li> <li><hr><a href="/guides/sites.html">Podling Websites</a></li> <li><a href="/guides/podling_sourcecontrol.html">Podling Source Control</a></li> <li><hr><a href="/guides/releasemanagement.html">Release Management</a></li> <li><a href="/guides/distribution.html">Release Distribution</a></li> <li><hr><a href="/guides/graduation.html">Guide to Successful Graduation</a></li> <li><a href="/guides/retirement.html">Guide to Retirement</a></li> <li><a href="/guides/transferring.html">Transferring Resources out of the Incubator</a></li> <li><hr><a href="/projects/#current">Current Podlings</a></li> <li><a href="/clutch/">Clutch Report</a></li> </ul> </li> <li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown">PMC Guides <b class="caret"></b></a> <ul class="dropdown-menu"> <li><a href="/guides/participation.html">Guide to Participation</a></li> <li><a href="/guides/lists.html">Incubator Mailing Lists Guide</a></li> <li><a href="/guides/chair.html">Incubator Chair Guide</a></li> <li><a href="/guides/mentor.html">Mentors' Guide</a></li> <li><hr><a href="/guides/website.html">Updating the top-level Incubator website</a></li> </ul> </li> <li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown">ASF <b class="caret"></b></a> <ul class="dropdown-menu"> <li><a href="https://www.apache.org/foundation/how-it-works.html">How Apache Works</a></li> <li><a href="https://www.apache.org/dev/">Developer Documentation</a></li> <li><a href="https://www.apache.org/foundation/">Foundation</a></li> <li><a href="https://www.apache.org/legal/">Legal</a></li> <hr/> <li><a href="https://www.apache.org/licenses/">License</a></li> <li><a href="https://privacy.apache.org/policies/privacy-policy-public.html">Privacy Policy</a></li> <li><a href="https://www.apache.org/security/">Security</a></li> <li><a href="https://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li> <li><a href="https://www.apache.org/foundation/thanks.html">Thanks</a></li> <li><a href="https://www.apache.org/events/current-event">Current Events</a></li> </ul> </li> <li><a href="/faq.html">FAQs</a></li> </ul> </div><!--/.nav-collapse --> </div> </div> <div class="container"> <div class="row"> <div class="col-md-4 vcenter"><a href="https://www.apache.org/"><img src="https://www.apache.org/img/asf_logo.png" alt="The Apache Software Foundation" border="0" style="margin-top: 2px" width="200"></a></div> <div class="col-md-4 vcenter"><a href="/"><img src="https://incubator.apache.org/images/incubator_feather_egg_logo_sm.png" alt="The Apache Software Foundation Incubator" border="0" style="margin-top: 2px" width="256"></a></div> <div class="col-md-4 vcenter"> <a href="https://www.apache.org/foundation/contributing.html"><img src="https://www.apache.org/images/SupportApache-small.png" height="64" width="64"></a> <a class="acevent" data-format="square" data-width="100" data-mode="light" data-event="random"></a> </div> </div> </div> <div class="top-container container"> <div class="page-header"> <h1>Guide :: Initial Code Import</h1> </div> <div class="article-body"> Estimated Reading Time: <span class="eta"></span> <p><div id="toc" class="toc"> <div id="toctitle">Table of Contents</div> <ul class="sectlevel1"> <li><a href="#importing_history">Importing History</a></li> <li><a href="#audit_cryptography">Audit Cryptography</a></li> <li><a href="#initial_clean_up">Initial Clean Up</a></li> <li><a href="#cleanup_best_practice">Cleanup Best Practice</a></li> <li><a href="#on_repackaging">On Repackaging</a></li> <li><a href="#update_documents">Update Documents</a> <ul class="sectlevel2"> <li><a href="#update_build">Update Build</a></li> </ul> </li> <li><a href="#issue_tracking_transition">Issue Tracking Transition</a></li> </ul> </div> <div id="preamble"> <div class="sectionbody"> <div class="paragraph"> <p>For corporate contributions, you MUST complete and submit the SGA or CCLA, and Apache must receive it, before you import code.</p> </div> <div class="paragraph"> <p>For contributions composed of patches from individual contributors, it is safe to import the code once the major contributors (by volume) have completed ICLAs or SGAs.</p> </div> <div class="paragraph"> <p>In either case, attach the code to be imported to a JIRA ticket and then import it. We recommend that you tag the previous version control system so we know the precise version you are importing.</p> </div> <div class="paragraph"> <p>You MUST make a public record of the code you import. If you do not attach the import to a JIRA ticket, you MUST commit it to version control.</p> </div> </div> </div> <div class="sect1"> <h2 id="importing_history">Importing History</h2> <div class="sectionbody"> <div class="paragraph"> <p>You can commit the incoming code as a snapshot or as a complete version control export, including history (provided that the import is available in a format readable by GitHub or Subversion, depending on where the new repository is). Importing with history allows existing open source projects that want to maintain older versions at Apache to easily perform source diffs and so on. Importing just the latest code allows a clean break to be made with the past. The choice is left to the community of the incoming project.</p> </div> </div> </div> <div class="sect1"> <h2 id="audit_cryptography">Audit Cryptography</h2> <div class="sectionbody"> <div class="paragraph"> <p>Before you commit the code base into an Apache repository, the contribution <a href="http://www.apache.org/dev/crypto.html">MUST</a> be checked and any restricted cryptography reported appropriately. Read and follow <a href="http://www.apache.org/dev/crypto.html">this guide</a>.</p> </div> </div> </div> <div class="sect1"> <h2 id="initial_clean_up">Initial Clean Up</h2> <div class="sectionbody"> <div class="paragraph"> <p>Once you have created a JIRA ticket, it is time to clean up the source code.</p> </div> <div class="ulist"> <ul> <li> <p>Ensure source files use the standard Apache boilerplate headers. This may mean replacing existing license headers. The tools in <a href="https://svn.apache.org/repos/private/committers/tools">private/committers/tools</a> and <a href="https://svn.apache.org/repos/private/committers/relicense">private/committers/relicense</a> may be useful.</p> </li> <li> <p>Ensure that NOTICE and LICENSE documents are present and correct. Mentors should assist with this.</p> </li> <li> <p>Add any required notices. Consider moving copyright attributions from source documents to the NOTICE file. Read the <a href="http://www.apache.org/legal/src-headers.html">Apache policy on headers</a>.</p> </li> <li> <p>Audit the source for any potential licensing issues. Resolve any issues you find immediately or note them in the status document for later attention.</p> </li> </ul> </div> <div class="paragraph"> <p>We recommend that you start the initial cleanup before you commit the code. You MUST complete it before creating any releases.</p> </div> </div> </div> <div class="sect1"> <h2 id="cleanup_best_practice">Cleanup Best Practice</h2> <div class="sectionbody"> <div class="paragraph"> <p>We recommend that you use version control to create a public record of the cleanup process. This will assist anyone auditing code provenance (now or in the future) to easily perform due diligence without having to contact the people who performed the cleanup. The cleanup process should therefore clearly document (using version control) the evolution of the IP licensing.</p> </div> <div class="paragraph"> <p>Take particular care with commit messages during cleanup. The intended audience needs to include lawyers and code auditors. Members of the public need to be able to follow and understand the process from these messages alone.</p> </div> <div class="paragraph"> <p>We therefore recommend that, after you expand the initial source from the archive, you check it into a special directory (we suggest <strong>${project}/trunk/import</strong>) as is. This will preserve the original packaging, copyright statements and license notices. Add the standard Apache LICENSE and an appropriate NOTICE at the top for the copyright for the collective work (see <a href="http://www.apache.org/legal/src-headers.html">policy</a>). Take particular care with this commit message. As with any patch that contains code which is not the original work of the committer, you need to include the url of the Jira ticket (for the artifact imported), together with notes about the original copyright owner and any associated paperwork. Note that this is an exact import, including original headers, to stop any queries about these foreign headers.</p> </div> <div class="paragraph"> <p>The cleanup should then proceed in a number of commits. If the source provenance is complex, break the process into a number of logical steps, committing each in turn with a good message.</p> </div> <div class="paragraph"> <p>In particular, take care when relocating copyright statements and license notices into the NOTICE in the root directory: consider moving each copyright owner individually so that it is easier to audit. (See <a href="http://www.apache.org/legal/src-headers.html#notice">policy</a>.)</p> </div> <div class="paragraph"> <p>Once you have cleaned up (and <a href="#repackaging">repackaged</a>, if necessary) a section of code, normal development on it can begin.</p> </div> </div> </div> <div class="sect1"> <h2 id="on_repackaging">On Repackaging</h2> <div class="sectionbody"> <div class="paragraph"> <p>We recommend - but do not require - that you repackage source code under the Apache namespace. There is no need to use the incubator namespace. For example, you might repackage Java source code to <strong>org.apache.foo.Bar</strong> or a DTD to <strong><a href="http://podling.apache.org/foo/bar" class="bare">http://podling.apache.org/foo/bar</a></strong>.</p> </div> <div class="paragraph"> <p>Existing open source projects moving to Apache may need to consider carefully how they will approach this transition.</p> </div> </div> </div> <div class="sect1"> <h2 id="update_documents">Update Documents</h2> <div class="sectionbody"> <div class="paragraph"> <p>Check the documentation for references to the old home of the project and update them with references to Apache.</p> </div> <div class="paragraph"> <p>Read the Apache <a href="http://incubator.apache.org/guides/branding.html">Branding Guide</a>. Add appropriate disclaimers to the appropriate documentation. Consider adding a <strong>DISCLAIMER</strong> text document.</p> </div> <div class="sect2"> <h3 id="update_build">Update Build</h3> <div class="paragraph"> <p>If the project uses <a href="http://maven.apache.org">Apache Maven</a>, you need to update the pom to reflect that the project is now at Apache. In particular:</p> </div> <div class="ulist"> <ul> <li> <p>Update <strong>mailingLists</strong></p> </li> <li> <p>Update <strong>organization</strong></p> </li> <li> <p>Update <strong>url</strong></p> </li> <li> <p>Update <strong>issueManagement</strong></p> </li> <li> <p>Check <strong>licenses</strong></p> </li> <li> <p>Update <strong>scm</strong></p> </li> <li> <p>Update <strong>groupId</strong></p> </li> <li> <p>Update <strong>manifestEntries</strong>. We recommend that you use the standard Apache settings</p> </li> <li> <p>Update <strong>developers</strong> to use apache IDs (when known)</p> </li> <li> <p>Update <strong>distributionManagement</strong></p> </li> <li> <p>Consider specifying a <a href="http://maven.apache.org/pom.html#relocation">relocation</a></p> </li> </ul> </div> <div class="paragraph"> <p>If the project uses <a href="http://ant.apache.org">Apache Ant</a>, the build script will probably need to be updated. In particular: - Ensure any MANIFESTs generated refer to Apache. We recommend that you use the standard Apache settings. - Check that <strong>LICENSE</strong>, <strong>NOTICE</strong> and - if appropriate - <strong>DISCLAIMER</strong> documents are copied into binary artifacts.</p> </div> </div> </div> </div> <div class="sect1"> <h2 id="issue_tracking_transition">Issue Tracking Transition</h2> <div class="sectionbody"> <div class="paragraph"> <p>We track issues for Apache projects on Apache hardware. Some projects arrive with existing issue tracking systems. The project needs to move, for new development at least, to an Apache issue tracker. Discuss options and reach a consensus on the public dev@ email list about the best transition strategy.</p> </div> </div> </div></p> </div> </div> <div id="push"></div> </div> <div id="footer"> <div class="container"> <p class="muted credit">© 2025 The Apache Software Foundation | Licensed under the Apache License, Version 2.0.<br/> Apache Incubator, Apache, the Apache feather logo, and the Apache Incubator project logo are trademarks or registered trademarks of The Apache Software Foundation.</p> </div> </div> <script src="../js/jquery-1.11.1.min.js"></script> <script src="../js/bootstrap.min.js"></script> <script src="../js/prettify.js"></script> <script src="../js/readingTime.js"></script> <script src="../js/incubator.js"></script> </body> </html>