You are viewing a plain text version of this content. The canonical link for it is here.
Posted to site-commits@maven.apache.org by bu...@apache.org on 2015/09/19 15:06:31 UTC

svn commit: r966011 - in /websites/staging/maven/trunk/content: ./ developers/website/component-reference-documentation-helper.html developers/website/deploy-component-reference-documentation.html maven-site-1.0-site.jar

Author: buildbot
Date: Sat Sep 19 13:06:30 2015
New Revision: 966011

Log:
Staging update by buildbot for maven

Modified:
    websites/staging/maven/trunk/content/   (props changed)
    websites/staging/maven/trunk/content/developers/website/component-reference-documentation-helper.html
    websites/staging/maven/trunk/content/developers/website/deploy-component-reference-documentation.html
    websites/staging/maven/trunk/content/maven-site-1.0-site.jar

Propchange: websites/staging/maven/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Sat Sep 19 13:06:30 2015
@@ -1 +1 @@
-1703972
+1704011

Modified: websites/staging/maven/trunk/content/developers/website/component-reference-documentation-helper.html
==============================================================================
--- websites/staging/maven/trunk/content/developers/website/component-reference-documentation-helper.html (original)
+++ websites/staging/maven/trunk/content/developers/website/component-reference-documentation-helper.html Sat Sep 19 13:06:30 2015
@@ -446,9 +446,7 @@
                                   
             <div class="section">
 <h2><a name="Preparing_Component_Release_Documentation"></a>Preparing Component Release Documentation</h2>
-<!-- TODO add javascript to make this dynamic:
-1. select a component category to display index page, archives and list content (sorted by 
-2. select a component to update instructions to publish release documentation -->
+<p>select component category, then type artifact id and version to generate svn commands:</p>
 
 <table border="0" class="table table-striped">
 
@@ -460,17 +458,17 @@
 
 <ul>
 
-<li><a href="#core">core</a></li>
+<li><a href="?core">core</a></li>
 
-<li><a href="#shared">shared components</a></li>
+<li><a href="?shared">shared components</a></li>
 
-<li><a href="#plugins">plugins</a></li>
+<li><a href="?plugins">plugins</a></li>
 
-<li><a href="#pom">poms</a></li>
+<li><a href="?pom">poms</a></li>
 
-<li><a href="#skins">skins</a></li>
+<li><a href="?skins">skins</a></li>
 
-<li><a href="#others">others</a></li>
+<li><a href="?others">others</a></li>
 </ul>
  
 </td>
@@ -478,41 +476,87 @@
 
 </div>
 <div class="section">
-<h2><a name="plugins_content"></a>plugins content</h2>
+<h2><a name="Component_information"></a>Component information</h2>
 
+artifact id: <input type="text" name="artifactId" id="artifactId"></input><br />
+version: <input type="text" name="version" id="version"></input><br />
+<button onclick="instructions()">Publish instructions</button>
 
-<ul>
-
-<li>maven-javadoc-plugin: <a href="/plugins/maven-javadoc-plugin/">current</a> / <a href="/plugins-archives/maven-javadoc-plugin-LATEST/">LATEST</a></li>
-
-<li>...</li>
-</ul>
 </td></tr>
 
 
 <tr class="b">
 <td colspan="2">
-instructions to publish maven-javadoc-plugin 1.9 release documentation
+instructions to publish component release documentation
 
 <div>
-<pre>svnmucc -m &quot;Publish maven-javadoc-plugin 1.9 documentation&quot; \
+<pre id="svnmucc">svnmucc -m &quot;Publish ${artifactId} ${version} documentation&quot; \
   -U https://svn.apache.org/repos/infra/websites/production/maven/components \
-  cp HEAD plugins-archives/maven-javadoc-plugin-LATEST plugins-archives/maven-javadoc-plugin-1.9 \
-  rm plugins/maven-javadoc-plugin \
-  cp HEAD plugins-archives/maven-javadoc-plugin-LATEST plugins/maven-javadoc-plugin</pre></div>
+  cp HEAD ${category}-archives/${artifactId}-LATEST ${category}-archives/${artifactId}-${version} \
+  rm ${category}/${artifactId} \
+  cp HEAD ${category}-archives/${artifactId}-LATEST ${category}/${artifactId}</pre></div>
 </td></tr>
 
 
 <tr class="a">
 <td>category index page<br />
-<iframe src="/plugins/" width="100%" height="300px"></iframe>
+<iframe id="index-page" src="" width="100%" height="300px"></iframe>
 </td>
 
 <td>archives directory<br />
-<iframe src="/plugins-archives/?C=M;O=D" width="100%" height="300px"></iframe>
+<iframe id="archives" src="" width="100%" height="300px"></iframe>
 </td>
 </tr>
-</table></div>
+</table>
+<script type="text/javascript">
+//<![CDATA[
+function selectCategory(index, archive) {
+  indexPage.setAttribute('src', 'http://maven.apache.org/' + index);
+  archives.setAttribute('src', 'http://maven.apache.org/' + archive + '?C=M;O=D');
+}
+var category = document.location.search.substr(1);
+var indexPage = document.getElementById('index-page');
+var archives = document.getElementById('archives');
+if (category == "core") {
+  selectCategory('docs/history.html', 'ref/');
+} else if (category == "others") {
+  selectCategory('', 'components/');
+} else if (category != "") {
+  selectCategory(category + '/', category+'-archives/');
+}
+var svnmuccTemplate = document.getElementById('svnmucc').innerHTML;
+
+function escapeRegExp(string) {
+    return string.replace(/([.*+?^=!:${}()|\[\]\/\\])/g, "\\$1");
+}
+function replaceAll(string, find, replace) {
+  return string.replace(new RegExp(escapeRegExp(find), 'g'), replace);
+}
+
+function instructions() {
+  var category = document.location.search.substr(1);
+  var artifactId = document.getElementById('artifactId').value;
+  var version = document.getElementById('version').value;
+  var svnmucc = svnmuccTemplate;
+  if (category == "others") {
+    // category directory is based on artifactId
+    svnmucc = replaceAll(svnmucc, '${category}/${artifactId}', '${artifactId}');
+    category = artifactId;
+  }
+  if (category == "core") {
+    artifactId = "Maven";
+    svnmucc = svnmucc.substr(0, svnmucc.indexOf("  rm "))
+    svnmucc = replaceAll(svnmucc, '${artifactId}-LATEST', '3-LATEST');
+    svnmucc = replaceAll(svnmucc, '${category}-archives', 'ref');
+    svnmucc = replaceAll(svnmucc, '${artifactId}-${version}', '${version}');
+  }
+  svnmucc = replaceAll(svnmucc, '${category}', category);
+  svnmucc = replaceAll(svnmucc, '${artifactId}', artifactId);
+  svnmucc = replaceAll(svnmucc, '${version}', version);
+  document.getElementById('svnmucc').innerHTML = svnmucc;
+}
+//]]>
+</script></div>
                   </div>
             </div>
           </div>

Modified: websites/staging/maven/trunk/content/developers/website/deploy-component-reference-documentation.html
==============================================================================
--- websites/staging/maven/trunk/content/developers/website/deploy-component-reference-documentation.html (original)
+++ websites/staging/maven/trunk/content/developers/website/deploy-component-reference-documentation.html Sat Sep 19 13:06:30 2015
@@ -502,7 +502,8 @@ svn cp %SVNPUBSUB%/xxx-archives/yyy-$ver
   -U https://svn.apache.org/repos/infra/websites/production/maven/components \
   cp HEAD xxx-archives/yyy-LATEST xxx-archives/yyy-$version \
   rm xxx/yyy \
-  cp HEAD xxx-archives/yyy-LATEST xxx/yyy</pre></div></div>
+  cp HEAD xxx-archives/yyy-LATEST xxx/yyy</pre></div>
+<p>You can also use <a href="./component-reference-documentation-helper.html">Component Reference Documentation Helper</a> to prepare svnmucc command line.</p></div>
 <div class="section">
 <h3><a name="Updating_index_page_in_the_Maven_site"></a>Updating index page in the Maven site</h3>
 <p>Some component types have an index page refering to each components of the same type. This is the case for plugins (see <a href="/plugins/">index</a>), shared (see <a href="/shared/">index</a>), poms (see <a href="/pom/">index</a>) and skins (see <a href="/skins/">index</a>).</p>

Modified: websites/staging/maven/trunk/content/maven-site-1.0-site.jar
==============================================================================
Binary files - no diff available.