CINXE.COM
Apache Commons – Publish Sites
<!DOCTYPE html> <!-- | Generated by Apache Maven Doxia at 19 November 2024 | Rendered using Apache Maven Fluido Skin 1.3.0 --> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="author" content="Commons Documentation Team" /> <meta name="Date-Revision-yyyymmdd" content="20241119" /> <meta http-equiv="Content-Language" content="en" /> <title>Apache Commons – Publish Sites</title> <link rel="stylesheet" href="./css/bootstrap.min.css" type="text/css" /> <link rel="stylesheet" href="./css/site.css" type="text/css" /> <link rel="stylesheet" href="./css/print.css" media="print" /> <script type="text/javascript" src="./js/jquery.min.js"></script> <script type="text/javascript" src="./js/bootstrap.min.js"></script> <script type="text/javascript" src="./js/prettify.min.js"></script> <script type="text/javascript" src="./js/site.js"></script> </head> <body class="composite"> <a href="./" id="bannerLeft" title="Apache Commons logo"> <img class="logo-left" src="images/commons-logo.png" alt="Apache Commons logo"/> </a> <div class="clear"></div> <div class="navbar"> <div class="navbar-inner"> <div class="container-fluid"> <a class="brand" href="https://commons.apache.org/">Apache Commons ™</a> <ul class="nav"> <li id="publishDate">Last Published: 19 November 2024</li> <li class="divider">|</li> <li id="projectVersion">Version: unspecified</li> </ul> <div class="pull-right"> <ul class="nav"> <li> <a href="components.html" title="Components"> Components</a> </li> <li> <a href="sandbox.html" title="Sandbox"> Sandbox</a> </li> <li> <a href="dormant.html" title="Dormant"> Dormant</a> </li> <li> <a href="https://www.apachecon.com/" class="externalLink" title="ApacheCon"> ApacheCon</a> </li> <li> <a href="https://www.apache.org" class="externalLink" title="Apache"> Apache</a> </li> </ul> </div> </div> </div> </div> <div class="container-fluid"> <table class="layout-table"> <tr> <td class="sidebar"> <div class="well sidebar-nav"> <ul class="nav nav-list"> <li class="nav-header">Commons</li> <li class="none"> <a href="index.html" title="Home"> Home</a> </li> <li class="none"> <a href="https://www.apache.org/licenses/" class="externalLink" title="License"> License</a> </li> <li class="none"> <a href="mail-lists.html" title="Mailing Lists"> Mailing Lists</a> </li> <li class="none"> <a href="team.html" title="PMC"> PMC</a> </li> <li class="collapsed"> <a href="components.html" title="Components"> Components</a> </li> <li class="collapsed"> <a href="sandbox.html" title="Sandbox"> Sandbox</a> </li> <li class="collapsed"> <a href="dormant.html" title="Dormant"> Dormant</a> </li> </ul> <ul class="nav nav-list"> <li class="nav-header">Releases</li> <li class="none"> <a href="downloads/index.html" title="Releases"> Releases</a> </li> </ul> <ul class="nav nav-list"> <li class="nav-header">Source Repositories</li> <li class="none"> <a href="scminfo.html" title="General Information"> General Information</a> </li> <li class="none"> <a href="https://svn.apache.org/viewvc/commons/sandbox/" class="externalLink" title="Sandbox"> Sandbox</a> </li> <li class="none"> <a href="https://svn.apache.org/viewvc/commons/dormant/" class="externalLink" title="Dormant"> Dormant</a> </li> </ul> <ul class="nav nav-list"> <li class="nav-header">General Information</li> <li class="none"> <a href="security.html" title="Security"> Security</a> </li> <li class="none"> <a href="volunteering.html" title="Volunteering"> Volunteering</a> </li> <li class="none"> <a href="patches.html" title="Contributing Patches"> Contributing Patches</a> </li> <li class="none"> <a href="building.html" title="Building Components"> Building Components</a> </li> <li class="none"> <a href="commons-parent" title="Commons Parent POM"> Commons Parent POM</a> </li> <li class="none"> <a href="build-plugin/index.html" title="Commons Build Plugin"> Commons Build Plugin</a> </li> <li class="none"> <a href="release-plugin/index.html" title="Commons Release Plugin"> Commons Release Plugin</a> </li> <li class="none active"> <a href="site-publish.html" title="Site Publication"> Site Publication</a> </li> <li class="none"> <a href="releases/index.html" title="Releasing Components"> Releasing Components</a> </li> <li class="none"> <a href="https://cwiki.apache.org/confluence/display/COMMONS/FrontPage" class="externalLink" title="Wiki"> Wiki</a> </li> </ul> <ul class="nav nav-list"> <li class="nav-header">ASF</li> <li class="none"> <a href="https://www.apache.org/foundation/how-it-works.html" class="externalLink" title="How the ASF works"> How the ASF works</a> </li> <li class="none"> <a href="https://www.apache.org/foundation/getinvolved.html" class="externalLink" title="Get Involved"> Get Involved</a> </li> <li class="none"> <a href="https://www.apache.org/dev/" class="externalLink" title="Developer Resources"> Developer Resources</a> </li> <li class="none"> <a href="https://www.apache.org/foundation/policies/conduct.html" class="externalLink" title="Code of Conduct"> Code of Conduct</a> </li> <li class="none"> <a href="https://privacy.apache.org/policies/privacy-policy-public.html" class="externalLink" title="Privacy"> Privacy</a> </li> <li class="none"> <a href="https://www.apache.org/foundation/sponsorship.html" class="externalLink" title="Sponsorship"> Sponsorship</a> </li> <li class="none"> <a href="https://www.apache.org/foundation/thanks.html" class="externalLink" title="Thanks"> Thanks</a> </li> </ul> </div> <div id="poweredBy"> <a href="https://www.apache.org/events/current-event.html" title="ApacheCon" class="builtBy"> <img class="builtBy" alt="ApacheCon" src="https://www.apache.org/events/current-event-125x125.png" /> </a> <a href="https://maven.apache.org/" title="Maven" class="builtBy"> <img class="builtBy" alt="Maven" src="https://maven.apache.org/images/logos/maven-feather.png" /> </a> </div> </td> <td class="content"> <section> <h2><a name="Introduction"></a>Introduction</h2> <p> Commons sites use a solution based on both BuildBot (for the main site) and svnpubsub publication based on the <a class="externalLink" href="http://maven.apache.org/plugins/maven-scm-publish-plugin/">maven-scm-publish-plugin</a> for the component sites. </p> </section> <section> <h2><a name="Main_site"></a>Main site</h2> <p> The main site content is now located in svn: https://svn.apache.org/repos/asf/commons/cms-site/trunk/ .<br /> Site files are located under context/xdocs. You can test your changes locally using: </p> <div> <pre>mvn clean site</pre></div> This will generate output under target/site. If you are happy with the changes, commit the source updates. <p>After you commit, <a class="externalLink" href="http://ci.apache.org/builders/commons-site">buildbot</a> handles the site generation, with the output published to the <a class="externalLink" href="https://svn.apache.org/repos/infra/websites/staging/commons/trunk/content/index.html">staging site</a>. This is then automatically published to the production site. </p> <p> If you wish to stage the changes without publication to production site, update the site locally using </p> <div> <pre>bash commons-site-build.sh</pre></div> This fetches the current staging site and updates it, but does not commit it. If you wish to commit the staging site for review, commit the updated copy using a command of the form: <div> <pre>svn commit target/site -m 'Update the staging site prior to deployment'</pre></div> </section> <section> <h2><a name="Components"></a>Components</h2> <p> Components do not use Buildbot. Instead component sites need to be built locally and checked in to SVN. The generated site is checked in to: </p> <ul> <li>proper: https://svn.apache.org/repos/infra/websites/production/commons/content/proper/</li> <li>sandbox: https://svn.apache.org/repos/infra/websites/production/commons/content/sandbox/</li> <li>dormant: https://svn.apache.org/repos/infra/websites/production/commons/content/dormant/</li> </ul> <p> Components must use parent 28 (sandbox parent: 10) or later. </p> <p> The maven-scm-publish plugin can be used to automatically upload the generated site. </p> <p>Maven will create a working copy of the site svn directory (<code>~/commons-sites/</code> by default) publish your site to it and commit the changes. It will not prompt you for your svn password so the commit will fail unless subversion is configured to store your password. If it fails, you can commit the changes manually.</p> <p>In order to publish the site of a single module project use</p> <div> <pre> mvn clean site-deploy</pre></div> <p>and for a multi modules project use</p> <div> <pre> mvn clean site site:stage scm-publish:publish-scm</pre></div> <p> The site can also be built locally and checked into the appropriate location manually. </p> <section> <h3><a name="Configuration"></a>Configuration</h3> <p> Default deployment targets are: </p> <ul> <li>propers: https://svn.apache.org/repos/infra/websites/production/commons/content/proper/${project.artifactId}</li> <li>sandbox: https://svn.apache.org/repos/infra/websites/production/commons/content/sandbox/${project.artifactId}</li> <li>dormant: https://svn.apache.org/repos/infra/websites/production/commons/content/dormant/${project.artifactId}</li> </ul> <p> The maven-scm-publish-plugin will delete any content not generated by the Maven site plugin. To avoid deletion of previous apis javadocs or other static content, the pom needs some configuration:</p> <div> <pre><plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-scm-publish-plugin</artifactId> <configuration> <ignorePathsToDelete> <ignorePathToDelete>javadocs</ignorePathToDelete> <!-- other paths to ignore --> </ignorePathsToDelete> </configuration> </plugin></pre></div> <p>All declared paths won't be deleted from svn but rather have to be imported manually.</p> </section> </section> </td> </tr> </table> </div> <div class="footer"> <p>Copyright © 2024 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved.</p> <?xml version="1.0" encoding="UTF-8"?> <div class="center">Apache Commons, Apache, the Apache feather logo, and the Apache Commons project logos are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.</div> </div> </body> </html>