You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ch...@apache.org on 2019/03/09 13:32:28 UTC
svn commit: r32834 [22/33] - in /dev/commons/commons-release-plugin/1.6-RC1:
./ binaries/ site/ site/apidocs/ site/apidocs/org/ site/apidocs/org/apache/
site/apidocs/org/apache/commons/ site/apidocs/org/apache/commons/release/
site/apidocs/org/apache/c...
Added: dev/commons/commons-release-plugin/1.6-RC1/site/jacoco/org.apache.commons.release.plugin.velocity/HeaderHtmlVelocityDelegate.java.html
==============================================================================
--- dev/commons/commons-release-plugin/1.6-RC1/site/jacoco/org.apache.commons.release.plugin.velocity/HeaderHtmlVelocityDelegate.java.html (added)
+++ dev/commons/commons-release-plugin/1.6-RC1/site/jacoco/org.apache.commons.release.plugin.velocity/HeaderHtmlVelocityDelegate.java.html Sat Mar 9 13:32:27 2019
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="ISO-8859-1"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../jacoco-resources/report.css" type="text/css"/><link rel="shortcut icon" href="../jacoco-resources/report.gif" type="image/gif"/><title>HeaderHtmlVelocityDelegate.java</title><link rel="stylesheet" href="../jacoco-resources/prettify.css" type="text/css"/><script type="text/javascript" src="../jacoco-resources/prettify.js"></script></head><body onload="window['PR_TAB_WIDTH']=4;prettyPrint()"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="../jacoco-sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">Apache Commons Release Plugin</a> > <a href="index.source.html" class="el_package">org.apache.commons.release.plugin.v
elocity</a> > <span class="el_source">HeaderHtmlVelocityDelegate.java</span></div><h1>HeaderHtmlVelocityDelegate.java</h1><pre class="source lang-java linenums">/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.release.plugin.velocity;
+
+import java.io.Writer;
+import org.apache.velocity.Template;
+import org.apache.velocity.VelocityContext;
+import org.apache.velocity.app.VelocityEngine;
+import org.apache.velocity.runtime.RuntimeConstants;
+import org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader;
+
+/**
+ * This class' purpose is to generate the <code>HEADER.html</code> that moves along with the
+ * release for the sake of downloading the release from the distribution area.
+ *
+ * @author chtompki
+ * @since 1.3
+ */
+public class HeaderHtmlVelocityDelegate {
+ /** The location of the velocity tempate for this class. */
+ private static final String TEMPLATE = "resources/org/apache/commons/release/plugin"
+ + "/velocity/HEADER.vm";
+ /** The private constructor to be used by the {@link HeaderHtmlVelocityDelegateBuilder}. */
+ private HeaderHtmlVelocityDelegate() {
+ super();
+ }
+
+ /**
+ * For instantiating our {@link HeaderHtmlVelocityDelegate} using the {@link HeaderHtmlVelocityDelegateBuilder}.
+ *
+ * @return a {@link HeaderHtmlVelocityDelegateBuilder}.
+ */
+ public static HeaderHtmlVelocityDelegateBuilder builder() {
+<span class="fc" id="L48"> return new HeaderHtmlVelocityDelegateBuilder();</span>
+ }
+
+ /**
+ * Builds the HEADER.vm velocity template to the writer passed in.
+ *
+ * @param writer any {@link Writer} that we wish to have the filled velocity template written to.
+ * @return the {@link Writer} that we've filled out the template into.
+ */
+ public Writer render(Writer writer) {
+<span class="fc" id="L58"> VelocityEngine ve = new VelocityEngine();</span>
+<span class="fc" id="L59"> ve.setProperty(RuntimeConstants.RESOURCE_LOADER, "classpath");</span>
+<span class="fc" id="L60"> ve.setProperty("classpath.resource.loader.class", ClasspathResourceLoader.class.getName());</span>
+<span class="fc" id="L61"> ve.init();</span>
+<span class="fc" id="L62"> Template template = ve.getTemplate(TEMPLATE);</span>
+<span class="fc" id="L63"> VelocityContext context = new VelocityContext();</span>
+<span class="fc" id="L64"> template.merge(context, writer);</span>
+<span class="fc" id="L65"> return writer;</span>
+ }
+
+ /**
+ * A builder class for instantiation of the {@link HeaderHtmlVelocityDelegate}.
+ */
+ public static class HeaderHtmlVelocityDelegateBuilder {
+
+ /**
+ * Private constructor so that we can have a proper builder pattern.
+ */
+ private HeaderHtmlVelocityDelegateBuilder() {
+ super();
+ }
+
+ /**
+ * Builds up the {@link ReadmeHtmlVelocityDelegate} from the previously set parameters.
+ * @return a new {@link ReadmeHtmlVelocityDelegate}.
+ */
+ public HeaderHtmlVelocityDelegate build() {
+<span class="fc" id="L85"> return new HeaderHtmlVelocityDelegate();</span>
+ }
+ }
+}
+</pre><div class="footer"><span class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.8.2.201808211720</span></div></body></html>
\ No newline at end of file
Added: dev/commons/commons-release-plugin/1.6-RC1/site/jacoco/org.apache.commons.release.plugin.velocity/ReadmeHtmlVelocityDelegate$ReadmeHtmlVelocityDelegateBuilder.html
==============================================================================
--- dev/commons/commons-release-plugin/1.6-RC1/site/jacoco/org.apache.commons.release.plugin.velocity/ReadmeHtmlVelocityDelegate$ReadmeHtmlVelocityDelegateBuilder.html (added)
+++ dev/commons/commons-release-plugin/1.6-RC1/site/jacoco/org.apache.commons.release.plugin.velocity/ReadmeHtmlVelocityDelegate$ReadmeHtmlVelocityDelegateBuilder.html Sat Mar 9 13:32:27 2019
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="ISO-8859-1"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../jacoco-resources/report.css" type="text/css"/><link rel="shortcut icon" href="../jacoco-resources/report.gif" type="image/gif"/><title>ReadmeHtmlVelocityDelegate.ReadmeHtmlVelocityDelegateBuilder</title><script type="text/javascript" src="../jacoco-resources/sort.js"></script></head><body onload="initialSort(['breadcrumb'])"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="../jacoco-sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">Apache Commons Release Plugin</a> > <a href="index.html" class="el_package">org.apache.commons.release.plugin.velocity</a> > <span class="el_class">ReadmeHtmlVelocityDelegate.Readme
HtmlVelocityDelegateBuilder</span></div><h1>ReadmeHtmlVelocityDelegate.ReadmeHtmlVelocityDelegateBuilder</h1><table class="coverage" cellspacing="0" id="coveragetable"><thead><tr><td class="sortable" id="a" onclick="toggleSort(this)">Element</td><td class="down sortable bar" id="b" onclick="toggleSort(this)">Missed Instructions</td><td class="sortable ctr2" id="c" onclick="toggleSort(this)">Cov.</td><td class="sortable bar" id="d" onclick="toggleSort(this)">Missed Branches</td><td class="sortable ctr2" id="e" onclick="toggleSort(this)">Cov.</td><td class="sortable ctr1" id="f" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="g" onclick="toggleSort(this)">Cxty</td><td class="sortable ctr1" id="h" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="i" onclick="toggleSort(this)">Lines</td><td class="sortable ctr1" id="j" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="k" onclick="toggleSort(this)">Methods</td></tr></thead><tfoot><t
r><td>Total</td><td class="bar">0 of 26</td><td class="ctr2">100%</td><td class="bar">0 of 0</td><td class="ctr2">n/a</td><td class="ctr1">0</td><td class="ctr2">4</td><td class="ctr1">0</td><td class="ctr2">7</td><td class="ctr1">0</td><td class="ctr2">4</td></tr></tfoot><tbody><tr><td id="a0"><a href="ReadmeHtmlVelocityDelegate.java.html#L160" class="el_method">build()</a></td><td class="bar" id="b0"><img src="../jacoco-resources/greenbar.gif" width="120" height="10" title="11" alt="11"/></td><td class="ctr2" id="c0">100%</td><td class="bar" id="d0"/><td class="ctr2" id="e0">n/a</td><td class="ctr1" id="f0">0</td><td class="ctr2" id="g0">1</td><td class="ctr1" id="h0">0</td><td class="ctr2" id="i3">1</td><td class="ctr1" id="j0">0</td><td class="ctr2" id="k0">1</td></tr><tr><td id="a1"><a href="ReadmeHtmlVelocityDelegate.java.html#L131" class="el_method">withArtifactId(String)</a></td><td class="bar" id="b1"><img src="../jacoco-resources/greenbar.gif" width="54" height="10" title=
"5" alt="5"/></td><td class="ctr2" id="c1">100%</td><td class="bar" id="d1"/><td class="ctr2" id="e1">n/a</td><td class="ctr1" id="f1">0</td><td class="ctr2" id="g1">1</td><td class="ctr1" id="h1">0</td><td class="ctr2" id="i0">2</td><td class="ctr1" id="j1">0</td><td class="ctr2" id="k1">1</td></tr><tr><td id="a3"><a href="ReadmeHtmlVelocityDelegate.java.html#L141" class="el_method">withVersion(String)</a></td><td class="bar" id="b2"><img src="../jacoco-resources/greenbar.gif" width="54" height="10" title="5" alt="5"/></td><td class="ctr2" id="c2">100%</td><td class="bar" id="d2"/><td class="ctr2" id="e2">n/a</td><td class="ctr1" id="f2">0</td><td class="ctr2" id="g2">1</td><td class="ctr1" id="h2">0</td><td class="ctr2" id="i1">2</td><td class="ctr1" id="j2">0</td><td class="ctr2" id="k2">1</td></tr><tr><td id="a2"><a href="ReadmeHtmlVelocityDelegate.java.html#L151" class="el_method">withSiteUrl(String)</a></td><td class="bar" id="b3"><img src="../jacoco-resources/greenbar.gif" wi
dth="54" height="10" title="5" alt="5"/></td><td class="ctr2" id="c3">100%</td><td class="bar" id="d3"/><td class="ctr2" id="e3">n/a</td><td class="ctr1" id="f3">0</td><td class="ctr2" id="g3">1</td><td class="ctr1" id="h3">0</td><td class="ctr2" id="i2">2</td><td class="ctr1" id="j3">0</td><td class="ctr2" id="k3">1</td></tr></tbody></table><div class="footer"><span class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.8.2.201808211720</span></div></body></html>
\ No newline at end of file
Added: dev/commons/commons-release-plugin/1.6-RC1/site/jacoco/org.apache.commons.release.plugin.velocity/ReadmeHtmlVelocityDelegate.html
==============================================================================
--- dev/commons/commons-release-plugin/1.6-RC1/site/jacoco/org.apache.commons.release.plugin.velocity/ReadmeHtmlVelocityDelegate.html (added)
+++ dev/commons/commons-release-plugin/1.6-RC1/site/jacoco/org.apache.commons.release.plugin.velocity/ReadmeHtmlVelocityDelegate.html Sat Mar 9 13:32:27 2019
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="ISO-8859-1"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../jacoco-resources/report.css" type="text/css"/><link rel="shortcut icon" href="../jacoco-resources/report.gif" type="image/gif"/><title>ReadmeHtmlVelocityDelegate</title><script type="text/javascript" src="../jacoco-resources/sort.js"></script></head><body onload="initialSort(['breadcrumb'])"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="../jacoco-sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">Apache Commons Release Plugin</a> > <a href="index.html" class="el_package">org.apache.commons.release.plugin.velocity</a> > <span class="el_class">ReadmeHtmlVelocityDelegate</span></div><h1>ReadmeHtmlVelocityDelega
te</h1><table class="coverage" cellspacing="0" id="coveragetable"><thead><tr><td class="sortable" id="a" onclick="toggleSort(this)">Element</td><td class="down sortable bar" id="b" onclick="toggleSort(this)">Missed Instructions</td><td class="sortable ctr2" id="c" onclick="toggleSort(this)">Cov.</td><td class="sortable bar" id="d" onclick="toggleSort(this)">Missed Branches</td><td class="sortable ctr2" id="e" onclick="toggleSort(this)">Cov.</td><td class="sortable ctr1" id="f" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="g" onclick="toggleSort(this)">Cxty</td><td class="sortable ctr1" id="h" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="i" onclick="toggleSort(this)">Lines</td><td class="sortable ctr1" id="j" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="k" onclick="toggleSort(this)">Methods</td></tr></thead><tfoot><tr><td>Total</td><td class="bar">0 of 126</td><td class="ctr2">100%</td><td class="bar">1 of 6</td><td
class="ctr2">83%</td><td class="ctr1">1</td><td class="ctr2">6</td><td class="ctr1">0</td><td class="ctr2">31</td><td class="ctr1">0</td><td class="ctr2">3</td></tr></tfoot><tbody><tr><td id="a2"><a href="ReadmeHtmlVelocityDelegate.java.html#L75" class="el_method">render(Writer)</a></td><td class="bar" id="b0"><img src="../jacoco-resources/greenbar.gif" width="120" height="10" title="109" alt="109"/></td><td class="ctr2" id="c0">100%</td><td class="bar" id="d0"><img src="../jacoco-resources/redbar.gif" width="20" height="10" title="1" alt="1"/><img src="../jacoco-resources/greenbar.gif" width="100" height="10" title="5" alt="5"/></td><td class="ctr2" id="e0">83%</td><td class="ctr1" id="f0">1</td><td class="ctr2" id="g0">4</td><td class="ctr1" id="h0">0</td><td class="ctr2" id="i0">25</td><td class="ctr1" id="j0">0</td><td class="ctr2" id="k0">1</td></tr><tr><td id="a1"><a href="ReadmeHtmlVelocityDelegate.java.html#L52" class="el_method">ReadmeHtmlVelocityDelegate(String, String, St
ring)</a></td><td class="bar" id="b1"><img src="../jacoco-resources/greenbar.gif" width="13" height="10" title="12" alt="12"/></td><td class="ctr2" id="c1">100%</td><td class="bar" id="d1"/><td class="ctr2" id="e1">n/a</td><td class="ctr1" id="f1">0</td><td class="ctr2" id="g1">1</td><td class="ctr1" id="h1">0</td><td class="ctr2" id="i1">5</td><td class="ctr1" id="j1">0</td><td class="ctr2" id="k1">1</td></tr><tr><td id="a0"><a href="ReadmeHtmlVelocityDelegate.java.html#L64" class="el_method">builder()</a></td><td class="bar" id="b2"><img src="../jacoco-resources/greenbar.gif" width="5" height="10" title="5" alt="5"/></td><td class="ctr2" id="c2">100%</td><td class="bar" id="d2"/><td class="ctr2" id="e2">n/a</td><td class="ctr1" id="f2">0</td><td class="ctr2" id="g2">1</td><td class="ctr1" id="h2">0</td><td class="ctr2" id="i2">1</td><td class="ctr1" id="j2">0</td><td class="ctr2" id="k2">1</td></tr></tbody></table><div class="footer"><span class="right">Created with <a href="http:
//www.jacoco.org/jacoco">JaCoCo</a> 0.8.2.201808211720</span></div></body></html>
\ No newline at end of file
Added: dev/commons/commons-release-plugin/1.6-RC1/site/jacoco/org.apache.commons.release.plugin.velocity/ReadmeHtmlVelocityDelegate.java.html
==============================================================================
--- dev/commons/commons-release-plugin/1.6-RC1/site/jacoco/org.apache.commons.release.plugin.velocity/ReadmeHtmlVelocityDelegate.java.html (added)
+++ dev/commons/commons-release-plugin/1.6-RC1/site/jacoco/org.apache.commons.release.plugin.velocity/ReadmeHtmlVelocityDelegate.java.html Sat Mar 9 13:32:27 2019
@@ -0,0 +1,164 @@
+<?xml version="1.0" encoding="ISO-8859-1"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../jacoco-resources/report.css" type="text/css"/><link rel="shortcut icon" href="../jacoco-resources/report.gif" type="image/gif"/><title>ReadmeHtmlVelocityDelegate.java</title><link rel="stylesheet" href="../jacoco-resources/prettify.css" type="text/css"/><script type="text/javascript" src="../jacoco-resources/prettify.js"></script></head><body onload="window['PR_TAB_WIDTH']=4;prettyPrint()"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="../jacoco-sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">Apache Commons Release Plugin</a> > <a href="index.source.html" class="el_package">org.apache.commons.release.plugin.v
elocity</a> > <span class="el_source">ReadmeHtmlVelocityDelegate.java</span></div><h1>ReadmeHtmlVelocityDelegate.java</h1><pre class="source lang-java linenums">/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.release.plugin.velocity;
+
+import java.io.Writer;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.velocity.Template;
+import org.apache.velocity.VelocityContext;
+import org.apache.velocity.app.VelocityEngine;
+import org.apache.velocity.runtime.RuntimeConstants;
+import org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader;
+
+/**
+ * This class' purpose is to generate the <code>README.html</code> that moves along with the
+ * release for the sake of downloading the release from the distribution area.
+ *
+ * @author chtompki
+ * @since 1.3
+ */
+public class ReadmeHtmlVelocityDelegate {
+ /** The location of the velocity template for this class. */
+ private static final String TEMPLATE = "resources/org/apache/commons/release/plugin"
+ + "/velocity/README.vm";
+ /** This is supposed to represent the maven artifactId. */
+ private final String artifactId;
+ /** This is supposed to represent the maven version of the release. */
+ private final String version;
+ /** The url of the site that gets set into the <code>README.html</code>. */
+ private final String siteUrl;
+
+ /**
+ * The private constructor to be used by the {@link ReadmeHtmlVelocityDelegateBuilder}.
+ *
+ * @param artifactId sets the {@link ReadmeHtmlVelocityDelegate#artifactId}.
+ * @param version sets the {@link ReadmeHtmlVelocityDelegate#version}.
+ * @param siteUrl sets the {@link ReadmeHtmlVelocityDelegate#siteUrl}.
+ */
+<span class="fc" id="L52"> private ReadmeHtmlVelocityDelegate(String artifactId, String version, String siteUrl) {</span>
+<span class="fc" id="L53"> this.artifactId = artifactId;</span>
+<span class="fc" id="L54"> this.version = version;</span>
+<span class="fc" id="L55"> this.siteUrl = siteUrl;</span>
+<span class="fc" id="L56"> }</span>
+
+ /**
+ * Gets the {@link ReadmeHtmlVelocityDelegateBuilder} for constructing the {@link ReadmeHtmlVelocityDelegate}.
+ *
+ * @return the {@link ReadmeHtmlVelocityDelegateBuilder}.
+ */
+ public static ReadmeHtmlVelocityDelegateBuilder builder() {
+<span class="fc" id="L64"> return new ReadmeHtmlVelocityDelegateBuilder();</span>
+ }
+
+ /**
+ * Renders the <code>README.vm</code> velocity template with the variables constructed with the
+ * {@link ReadmeHtmlVelocityDelegateBuilder}.
+ *
+ * @param writer is the {@link Writer} to which we wish to render the <code>README.vm</code> template.
+ * @return a reference to the {@link Writer} passed in.
+ */
+ public Writer render(Writer writer) {
+<span class="fc" id="L75"> VelocityEngine ve = new VelocityEngine();</span>
+<span class="fc" id="L76"> ve.setProperty(RuntimeConstants.RESOURCE_LOADER, "classpath");</span>
+<span class="fc" id="L77"> ve.setProperty("classpath.resource.loader.class", ClasspathResourceLoader.class.getName());</span>
+<span class="fc" id="L78"> ve.init();</span>
+<span class="fc" id="L79"> Template template = ve.getTemplate(TEMPLATE);</span>
+<span class="fc" id="L80"> String[] splitArtifactId = artifactId.split("-");</span>
+<span class="fc" id="L81"> String wordCommons = "commons";</span>
+<span class="fc" id="L82"> String artifactShortName = "";</span>
+<span class="fc bfc" id="L83" title="All 2 branches covered."> if (splitArtifactId.length > 1) {</span>
+<span class="fc" id="L84"> artifactShortName = splitArtifactId[1];</span>
+<span class="pc bpc" id="L85" title="1 of 2 branches missed."> } else if (splitArtifactId.length == 1) {</span>
+<span class="fc" id="L86"> artifactShortName = splitArtifactId[0];</span>
+ }
+ // ".+\\d$" matches a non-empty string that terminates in a digit {0-9}.
+<span class="fc bfc" id="L89" title="All 2 branches covered."> if (artifactShortName.matches(".+\\d$")) {</span>
+<span class="fc" id="L90"> artifactShortName = artifactShortName.substring(0, artifactShortName.length() - 1);</span>
+ }
+<span class="fc" id="L92"> String artifactIdWithFirstLetterscapitalized =</span>
+<span class="fc" id="L93"> StringUtils.capitalize(wordCommons)</span>
+ + "-"
+<span class="fc" id="L95"> + artifactShortName.toUpperCase();</span>
+<span class="fc" id="L96"> VelocityContext context = new VelocityContext();</span>
+<span class="fc" id="L97"> context.internalPut("artifactIdWithFirstLetterscapitalized", artifactIdWithFirstLetterscapitalized);</span>
+<span class="fc" id="L98"> context.internalPut("artifactShortName", artifactShortName.toUpperCase());</span>
+<span class="fc" id="L99"> context.internalPut("artifactId", artifactId);</span>
+<span class="fc" id="L100"> context.internalPut("version", version);</span>
+<span class="fc" id="L101"> context.internalPut("siteUrl", siteUrl);</span>
+<span class="fc" id="L102"> template.merge(context, writer);</span>
+<span class="fc" id="L103"> return writer;</span>
+ }
+
+ /**
+ * A builder class for instantiation of the {@link ReadmeHtmlVelocityDelegate}.
+ */
+ public static class ReadmeHtmlVelocityDelegateBuilder {
+ /** The maven artifactId to use in the <code>README.vm</code> template. */
+ private String artifactId;
+ /** The maven version to use in the <code>README.vm</code> template. */
+ private String version;
+ /** The site url to use in the <code>README.vm</code> template. */
+ private String siteUrl;
+
+ /**
+ * Private constructor for using the builder through the {@link ReadmeHtmlVelocityDelegate#builder()}
+ * method.
+ */
+ private ReadmeHtmlVelocityDelegateBuilder() {
+ super();
+ }
+
+ /**
+ * Adds the artifactId to the {@link ReadmeHtmlVelocityDelegate}.
+ * @param artifactId the {@link String} representing the maven artifactId.
+ * @return the builder to continue building.
+ */
+ public ReadmeHtmlVelocityDelegateBuilder withArtifactId(String artifactId) {
+<span class="fc" id="L131"> this.artifactId = artifactId;</span>
+<span class="fc" id="L132"> return this;</span>
+ }
+
+ /**
+ * Adds the version to the {@link ReadmeHtmlVelocityDelegate}.
+ * @param version the maven version.
+ * @return the builder to continue building.
+ */
+ public ReadmeHtmlVelocityDelegateBuilder withVersion(String version) {
+<span class="fc" id="L141"> this.version = version;</span>
+<span class="fc" id="L142"> return this;</span>
+ }
+
+ /**
+ * Adds the siteUrl to the {@link ReadmeHtmlVelocityDelegate}.
+ * @param siteUrl the site url to be used in the <code>README.html</code>
+ * @return the builder to continue building.
+ */
+ public ReadmeHtmlVelocityDelegateBuilder withSiteUrl(String siteUrl) {
+<span class="fc" id="L151"> this.siteUrl = siteUrl;</span>
+<span class="fc" id="L152"> return this;</span>
+ }
+
+ /**
+ * Builds up the {@link ReadmeHtmlVelocityDelegate} from the previously set parameters.
+ * @return a new {@link ReadmeHtmlVelocityDelegate}.
+ */
+ public ReadmeHtmlVelocityDelegate build() {
+<span class="fc" id="L160"> return new ReadmeHtmlVelocityDelegate(this.artifactId, this.version, this.siteUrl);</span>
+ }
+ }
+}
+</pre><div class="footer"><span class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.8.2.201808211720</span></div></body></html>
\ No newline at end of file
Added: dev/commons/commons-release-plugin/1.6-RC1/site/jacoco/org.apache.commons.release.plugin.velocity/index.html
==============================================================================
--- dev/commons/commons-release-plugin/1.6-RC1/site/jacoco/org.apache.commons.release.plugin.velocity/index.html (added)
+++ dev/commons/commons-release-plugin/1.6-RC1/site/jacoco/org.apache.commons.release.plugin.velocity/index.html Sat Mar 9 13:32:27 2019
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="ISO-8859-1"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../jacoco-resources/report.css" type="text/css"/><link rel="shortcut icon" href="../jacoco-resources/report.gif" type="image/gif"/><title>org.apache.commons.release.plugin.velocity</title><script type="text/javascript" src="../jacoco-resources/sort.js"></script></head><body onload="initialSort(['breadcrumb', 'coveragetable'])"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="index.source.html" class="el_source">Source Files</a><a href="../jacoco-sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">Apache Commons Release Plugin</a> > <span class="el_package">org.apache.commons.release.plugin.velocity</span></div><h1>org
.apache.commons.release.plugin.velocity</h1><table class="coverage" cellspacing="0" id="coveragetable"><thead><tr><td class="sortable" id="a" onclick="toggleSort(this)">Element</td><td class="down sortable bar" id="b" onclick="toggleSort(this)">Missed Instructions</td><td class="sortable ctr2" id="c" onclick="toggleSort(this)">Cov.</td><td class="sortable bar" id="d" onclick="toggleSort(this)">Missed Branches</td><td class="sortable ctr2" id="e" onclick="toggleSort(this)">Cov.</td><td class="sortable ctr1" id="f" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="g" onclick="toggleSort(this)">Cxty</td><td class="sortable ctr1" id="h" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="i" onclick="toggleSort(this)">Lines</td><td class="sortable ctr1" id="j" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="k" onclick="toggleSort(this)">Methods</td><td class="sortable ctr1" id="l" onclick="toggleSort(this)">Missed</td><td class="sorta
ble ctr2" id="m" onclick="toggleSort(this)">Classes</td></tr></thead><tfoot><tr><td>Total</td><td class="bar">0 of 191</td><td class="ctr2">100%</td><td class="bar">1 of 6</td><td class="ctr2">83%</td><td class="ctr1">1</td><td class="ctr2">13</td><td class="ctr1">0</td><td class="ctr2">48</td><td class="ctr1">0</td><td class="ctr2">10</td><td class="ctr1">0</td><td class="ctr2">4</td></tr></tfoot><tbody><tr><td id="a2"><a href="ReadmeHtmlVelocityDelegate.html" class="el_class">ReadmeHtmlVelocityDelegate</a></td><td class="bar" id="b0"><img src="../jacoco-resources/greenbar.gif" width="120" height="10" title="126" alt="126"/></td><td class="ctr2" id="c0">100%</td><td class="bar" id="d0"><img src="../jacoco-resources/redbar.gif" width="20" height="10" title="1" alt="1"/><img src="../jacoco-resources/greenbar.gif" width="100" height="10" title="5" alt="5"/></td><td class="ctr2" id="e0">83%</td><td class="ctr1" id="f0">1</td><td class="ctr2" id="g0">6</td><td class="ctr1" id="h0">0</td
><td class="ctr2" id="i0">31</td><td class="ctr1" id="j0">0</td><td class="ctr2" id="k1">3</td><td class="ctr1" id="l0">0</td><td class="ctr2" id="m0">1</td></tr><tr><td id="a0"><a href="HeaderHtmlVelocityDelegate.html" class="el_class">HeaderHtmlVelocityDelegate</a></td><td class="bar" id="b1"><img src="../jacoco-resources/greenbar.gif" width="32" height="10" title="34" alt="34"/></td><td class="ctr2" id="c1">100%</td><td class="bar" id="d1"/><td class="ctr2" id="e1">n/a</td><td class="ctr1" id="f1">0</td><td class="ctr2" id="g2">2</td><td class="ctr1" id="h1">0</td><td class="ctr2" id="i1">9</td><td class="ctr1" id="j1">0</td><td class="ctr2" id="k2">2</td><td class="ctr1" id="l1">0</td><td class="ctr2" id="m1">1</td></tr><tr><td id="a3"><a href="ReadmeHtmlVelocityDelegate$ReadmeHtmlVelocityDelegateBuilder.html" class="el_class">ReadmeHtmlVelocityDelegate.ReadmeHtmlVelocityDelegateBuilder</a></td><td class="bar" id="b2"><img src="../jacoco-resources/greenbar.gif" width="24" height
="10" title="26" alt="26"/></td><td class="ctr2" id="c2">100%</td><td class="bar" id="d2"/><td class="ctr2" id="e2">n/a</td><td class="ctr1" id="f2">0</td><td class="ctr2" id="g1">4</td><td class="ctr1" id="h2">0</td><td class="ctr2" id="i2">7</td><td class="ctr1" id="j2">0</td><td class="ctr2" id="k0">4</td><td class="ctr1" id="l2">0</td><td class="ctr2" id="m2">1</td></tr><tr><td id="a1"><a href="HeaderHtmlVelocityDelegate$HeaderHtmlVelocityDelegateBuilder.html" class="el_class">HeaderHtmlVelocityDelegate.HeaderHtmlVelocityDelegateBuilder</a></td><td class="bar" id="b3"><img src="../jacoco-resources/greenbar.gif" width="4" height="10" title="5" alt="5"/></td><td class="ctr2" id="c3">100%</td><td class="bar" id="d3"/><td class="ctr2" id="e3">n/a</td><td class="ctr1" id="f3">0</td><td class="ctr2" id="g3">1</td><td class="ctr1" id="h3">0</td><td class="ctr2" id="i3">1</td><td class="ctr1" id="j3">0</td><td class="ctr2" id="k3">1</td><td class="ctr1" id="l3">0</td><td class="ctr2" id
="m3">1</td></tr></tbody></table><div class="footer"><span class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.8.2.201808211720</span></div></body></html>
\ No newline at end of file
Added: dev/commons/commons-release-plugin/1.6-RC1/site/jacoco/org.apache.commons.release.plugin.velocity/index.source.html
==============================================================================
--- dev/commons/commons-release-plugin/1.6-RC1/site/jacoco/org.apache.commons.release.plugin.velocity/index.source.html (added)
+++ dev/commons/commons-release-plugin/1.6-RC1/site/jacoco/org.apache.commons.release.plugin.velocity/index.source.html Sat Mar 9 13:32:27 2019
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="ISO-8859-1"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../jacoco-resources/report.css" type="text/css"/><link rel="shortcut icon" href="../jacoco-resources/report.gif" type="image/gif"/><title>org.apache.commons.release.plugin.velocity</title><script type="text/javascript" src="../jacoco-resources/sort.js"></script></head><body onload="initialSort(['breadcrumb', 'coveragetable'])"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="index.html" class="el_class">Classes</a><a href="../jacoco-sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">Apache Commons Release Plugin</a> > <span class="el_package">org.apache.commons.release.plugin.velocity</span></div><h1>org.apache.commo
ns.release.plugin.velocity</h1><table class="coverage" cellspacing="0" id="coveragetable"><thead><tr><td class="sortable" id="a" onclick="toggleSort(this)">Element</td><td class="down sortable bar" id="b" onclick="toggleSort(this)">Missed Instructions</td><td class="sortable ctr2" id="c" onclick="toggleSort(this)">Cov.</td><td class="sortable bar" id="d" onclick="toggleSort(this)">Missed Branches</td><td class="sortable ctr2" id="e" onclick="toggleSort(this)">Cov.</td><td class="sortable ctr1" id="f" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="g" onclick="toggleSort(this)">Cxty</td><td class="sortable ctr1" id="h" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="i" onclick="toggleSort(this)">Lines</td><td class="sortable ctr1" id="j" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="k" onclick="toggleSort(this)">Methods</td><td class="sortable ctr1" id="l" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id=
"m" onclick="toggleSort(this)">Classes</td></tr></thead><tfoot><tr><td>Total</td><td class="bar">0 of 191</td><td class="ctr2">100%</td><td class="bar">1 of 6</td><td class="ctr2">83%</td><td class="ctr1">1</td><td class="ctr2">13</td><td class="ctr1">0</td><td class="ctr2">48</td><td class="ctr1">0</td><td class="ctr2">10</td><td class="ctr1">0</td><td class="ctr2">4</td></tr></tfoot><tbody><tr><td id="a1"><a href="ReadmeHtmlVelocityDelegate.java.html" class="el_source">ReadmeHtmlVelocityDelegate.java</a></td><td class="bar" id="b0"><img src="../jacoco-resources/greenbar.gif" width="120" height="10" title="152" alt="152"/></td><td class="ctr2" id="c0">100%</td><td class="bar" id="d0"><img src="../jacoco-resources/redbar.gif" width="20" height="10" title="1" alt="1"/><img src="../jacoco-resources/greenbar.gif" width="100" height="10" title="5" alt="5"/></td><td class="ctr2" id="e0">83%</td><td class="ctr1" id="f0">1</td><td class="ctr2" id="g0">10</td><td class="ctr1" id="h0">0</td>
<td class="ctr2" id="i0">38</td><td class="ctr1" id="j0">0</td><td class="ctr2" id="k0">7</td><td class="ctr1" id="l0">0</td><td class="ctr2" id="m0">2</td></tr><tr><td id="a0"><a href="HeaderHtmlVelocityDelegate.java.html" class="el_source">HeaderHtmlVelocityDelegate.java</a></td><td class="bar" id="b1"><img src="../jacoco-resources/greenbar.gif" width="30" height="10" title="39" alt="39"/></td><td class="ctr2" id="c1">100%</td><td class="bar" id="d1"/><td class="ctr2" id="e1">n/a</td><td class="ctr1" id="f1">0</td><td class="ctr2" id="g1">3</td><td class="ctr1" id="h1">0</td><td class="ctr2" id="i1">10</td><td class="ctr1" id="j1">0</td><td class="ctr2" id="k1">3</td><td class="ctr1" id="l1">0</td><td class="ctr2" id="m1">2</td></tr></tbody></table><div class="footer"><span class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.8.2.201808211720</span></div></body></html>
\ No newline at end of file
Added: dev/commons/commons-release-plugin/1.6-RC1/site/jacoco/org.apache.commons.release.plugin/SharedFunctions.html
==============================================================================
--- dev/commons/commons-release-plugin/1.6-RC1/site/jacoco/org.apache.commons.release.plugin/SharedFunctions.html (added)
+++ dev/commons/commons-release-plugin/1.6-RC1/site/jacoco/org.apache.commons.release.plugin/SharedFunctions.html Sat Mar 9 13:32:27 2019
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="ISO-8859-1"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../jacoco-resources/report.css" type="text/css"/><link rel="shortcut icon" href="../jacoco-resources/report.gif" type="image/gif"/><title>SharedFunctions</title><script type="text/javascript" src="../jacoco-resources/sort.js"></script></head><body onload="initialSort(['breadcrumb'])"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="../jacoco-sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">Apache Commons Release Plugin</a> > <a href="index.html" class="el_package">org.apache.commons.release.plugin</a> > <span class="el_class">SharedFunctions</span></div><h1>SharedFunctions</h1><table class="coverage" cellspacing
="0" id="coveragetable"><thead><tr><td class="sortable" id="a" onclick="toggleSort(this)">Element</td><td class="down sortable bar" id="b" onclick="toggleSort(this)">Missed Instructions</td><td class="sortable ctr2" id="c" onclick="toggleSort(this)">Cov.</td><td class="sortable bar" id="d" onclick="toggleSort(this)">Missed Branches</td><td class="sortable ctr2" id="e" onclick="toggleSort(this)">Cov.</td><td class="sortable ctr1" id="f" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="g" onclick="toggleSort(this)">Cxty</td><td class="sortable ctr1" id="h" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="i" onclick="toggleSort(this)">Lines</td><td class="sortable ctr1" id="j" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="k" onclick="toggleSort(this)">Methods</td></tr></thead><tfoot><tr><td>Total</td><td class="bar">55 of 106</td><td class="ctr2">48%</td><td class="bar">2 of 4</td><td class="ctr2">50%</td><td class="ctr1">2</t
d><td class="ctr2">5</td><td class="ctr1">11</td><td class="ctr2">24</td><td class="ctr1">0</td><td class="ctr2">3</td></tr></tfoot><tbody><tr><td id="a0"><a href="SharedFunctions.java.html#L90" class="el_method">copyFile(Log, File, File)</a></td><td class="bar" id="b0"><img src="../jacoco-resources/redbar.gif" width="90" height="10" title="28" alt="28"/><img src="../jacoco-resources/greenbar.gif" width="16" height="10" title="5" alt="5"/></td><td class="ctr2" id="c2">15%</td><td class="bar" id="d1"/><td class="ctr2" id="e1">n/a</td><td class="ctr1" id="f1">0</td><td class="ctr2" id="g1">1</td><td class="ctr1" id="h1">4</td><td class="ctr2" id="i1">7</td><td class="ctr1" id="j0">0</td><td class="ctr2" id="k0">1</td></tr><tr><td id="a1"><a href="SharedFunctions.java.html#L64" class="el_method">initDirectory(Log, File)</a></td><td class="bar" id="b1"><img src="../jacoco-resources/redbar.gif" width="87" height="10" title="27" alt="27"/><img src="../jacoco-resources/greenbar.gif" width=
"32" height="10" title="10" alt="10"/></td><td class="ctr2" id="c1">27%</td><td class="bar" id="d0"><img src="../jacoco-resources/redbar.gif" width="60" height="10" title="2" alt="2"/><img src="../jacoco-resources/greenbar.gif" width="60" height="10" title="2" alt="2"/></td><td class="ctr2" id="e0">50%</td><td class="ctr1" id="f0">2</td><td class="ctr2" id="g0">3</td><td class="ctr1" id="h0">7</td><td class="ctr2" id="i0">11</td><td class="ctr1" id="j1">0</td><td class="ctr2" id="k1">1</td></tr><tr><td id="a2"><a href="SharedFunctions.java.html#L113" class="el_method">setAuthentication(ScmProviderRepository, String, Settings, SettingsDecrypter, String, String)</a></td><td class="bar" id="b2"><img src="../jacoco-resources/greenbar.gif" width="116" height="10" title="36" alt="36"/></td><td class="ctr2" id="c0">100%</td><td class="bar" id="d2"/><td class="ctr2" id="e2">n/a</td><td class="ctr1" id="f2">0</td><td class="ctr2" id="g2">1</td><td class="ctr1" id="h2">0</td><td class="ctr2"
id="i2">6</td><td class="ctr1" id="j2">0</td><td class="ctr2" id="k2">1</td></tr></tbody></table><div class="footer"><span class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.8.2.201808211720</span></div></body></html>
\ No newline at end of file
Added: dev/commons/commons-release-plugin/1.6-RC1/site/jacoco/org.apache.commons.release.plugin/SharedFunctions.java.html
==============================================================================
--- dev/commons/commons-release-plugin/1.6-RC1/site/jacoco/org.apache.commons.release.plugin/SharedFunctions.java.html (added)
+++ dev/commons/commons-release-plugin/1.6-RC1/site/jacoco/org.apache.commons.release.plugin/SharedFunctions.java.html Sat Mar 9 13:32:27 2019
@@ -0,0 +1,121 @@
+<?xml version="1.0" encoding="ISO-8859-1"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../jacoco-resources/report.css" type="text/css"/><link rel="shortcut icon" href="../jacoco-resources/report.gif" type="image/gif"/><title>SharedFunctions.java</title><link rel="stylesheet" href="../jacoco-resources/prettify.css" type="text/css"/><script type="text/javascript" src="../jacoco-resources/prettify.js"></script></head><body onload="window['PR_TAB_WIDTH']=4;prettyPrint()"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="../jacoco-sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">Apache Commons Release Plugin</a> > <a href="index.source.html" class="el_package">org.apache.commons.release.plugin</a> > <sp
an class="el_source">SharedFunctions.java</span></div><h1>SharedFunctions.java</h1><pre class="source lang-java linenums">/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.release.plugin;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.Optional;
+
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.logging.Log;
+import org.apache.maven.scm.provider.ScmProviderRepository;
+import org.apache.maven.settings.Server;
+import org.apache.maven.settings.Settings;
+import org.apache.maven.settings.crypto.DefaultSettingsDecryptionRequest;
+import org.apache.maven.settings.crypto.SettingsDecrypter;
+import org.apache.maven.settings.crypto.SettingsDecryptionResult;
+import org.codehaus.plexus.util.FileUtils;
+
+/**
+ * Shared static functions for all of our Mojos.
+ *
+ * @author chtompki
+ * @since 1.0
+ */
+public final class SharedFunctions {
+
+ /**
+ * I want a buffer that is an array with 1024 elements of bytes. We declare
+ * the constant here for the sake of making the code more readable.
+ */
+ public static final int BUFFER_BYTE_SIZE = 1024;
+
+ /**
+ * Making the constructor private because the class only contains static methods.
+ */
+ private SharedFunctions() {
+ // Utility Class
+ }
+
+ /**
+ * Cleans and then initializes an empty directory that is given by the <code>workingDirectory</code>
+ * parameter.
+ *
+ * @param log is the Maven log for output logging, particularly in regards to error management.
+ * @param workingDirectory is a {@link File} that represents the directory to first attempt to delete then create.
+ * @throws MojoExecutionException when an {@link IOException} or {@link NullPointerException} is caught for the
+ * purpose of bubbling the exception up to Maven properly.
+ */
+ public static void initDirectory(Log log, File workingDirectory) throws MojoExecutionException {
+<span class="pc bpc" id="L64" title="1 of 2 branches missed."> if (workingDirectory.exists()) {</span>
+ try {
+<span class="nc" id="L66"> FileUtils.deleteDirectory(workingDirectory);</span>
+<span class="nc" id="L67"> } catch (IOException | NullPointerException e) {</span>
+<span class="nc" id="L68"> final String message = String.format("Unable to remove directory %s: %s", workingDirectory,</span>
+<span class="nc" id="L69"> e.getMessage());</span>
+<span class="nc" id="L70"> log.error(message);</span>
+<span class="nc" id="L71"> throw new MojoExecutionException(message, e);</span>
+<span class="nc" id="L72"> }</span>
+ }
+<span class="pc bpc" id="L74" title="1 of 2 branches missed."> if (!workingDirectory.exists()) {</span>
+<span class="fc" id="L75"> workingDirectory.mkdirs();</span>
+ }
+<span class="fc" id="L77"> }</span>
+
+ /**
+ * Copies a {@link File} from the <code>fromFile</code> to the <code>toFile</code> and logs the failure
+ * using the Maven {@link Log}.
+ *
+ * @param log the {@link Log}, the maven logger.
+ * @param fromFile the {@link File} from which to copy.
+ * @param toFile the {@link File} to which to copy into.
+ * @throws MojoExecutionException if an {@link IOException} or {@link NullPointerException} is caught.
+ */
+ public static void copyFile(Log log, File fromFile, File toFile) throws MojoExecutionException {
+ try {
+<span class="fc" id="L90"> FileUtils.copyFile(fromFile, toFile);</span>
+<span class="nc" id="L91"> } catch (IOException | NullPointerException e) {</span>
+<span class="nc" id="L92"> final String message = String.format("Unable to copy file %s tp %s: %s", fromFile, toFile, e.getMessage());</span>
+<span class="nc" id="L93"> log.error(message);</span>
+<span class="nc" id="L94"> throw new MojoExecutionException(message, e);</span>
+<span class="fc" id="L95"> }</span>
+<span class="fc" id="L96"> }</span>
+
+ /**
+ * Set authentication information on the specified {@link ScmProviderRepository}.
+ * @param providerRepository target.
+ * @param distServer temp.
+ * @param settings temp.
+ * @param settingsDecrypter temp.
+ * @param username temp.
+ * @param password temp.
+ */
+ public static void setAuthentication(ScmProviderRepository providerRepository,
+ String distServer,
+ Settings settings,
+ SettingsDecrypter settingsDecrypter,
+ String username,
+ String password) {
+<span class="fc" id="L113"> Optional<Server> server =</span>
+<span class="fc" id="L114"> Optional.ofNullable(distServer).map(settings::getServer).map(DefaultSettingsDecryptionRequest::new)</span>
+<span class="fc" id="L115"> .map(settingsDecrypter::decrypt).map(SettingsDecryptionResult::getServer);</span>
+
+<span class="fc" id="L117"> providerRepository.setUser(server.map(Server::getUsername).orElse(username));</span>
+<span class="fc" id="L118"> providerRepository.setPassword(server.map(Server::getPassword).orElse(password));</span>
+<span class="fc" id="L119"> }</span>
+}
+</pre><div class="footer"><span class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.8.2.201808211720</span></div></body></html>
\ No newline at end of file
Added: dev/commons/commons-release-plugin/1.6-RC1/site/jacoco/org.apache.commons.release.plugin/index.html
==============================================================================
--- dev/commons/commons-release-plugin/1.6-RC1/site/jacoco/org.apache.commons.release.plugin/index.html (added)
+++ dev/commons/commons-release-plugin/1.6-RC1/site/jacoco/org.apache.commons.release.plugin/index.html Sat Mar 9 13:32:27 2019
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="ISO-8859-1"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../jacoco-resources/report.css" type="text/css"/><link rel="shortcut icon" href="../jacoco-resources/report.gif" type="image/gif"/><title>org.apache.commons.release.plugin</title><script type="text/javascript" src="../jacoco-resources/sort.js"></script></head><body onload="initialSort(['breadcrumb', 'coveragetable'])"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="index.source.html" class="el_source">Source Files</a><a href="../jacoco-sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">Apache Commons Release Plugin</a> > <span class="el_package">org.apache.commons.release.plugin</span></div><h1>org.apache.commons.re
lease.plugin</h1><table class="coverage" cellspacing="0" id="coveragetable"><thead><tr><td class="sortable" id="a" onclick="toggleSort(this)">Element</td><td class="down sortable bar" id="b" onclick="toggleSort(this)">Missed Instructions</td><td class="sortable ctr2" id="c" onclick="toggleSort(this)">Cov.</td><td class="sortable bar" id="d" onclick="toggleSort(this)">Missed Branches</td><td class="sortable ctr2" id="e" onclick="toggleSort(this)">Cov.</td><td class="sortable ctr1" id="f" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="g" onclick="toggleSort(this)">Cxty</td><td class="sortable ctr1" id="h" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="i" onclick="toggleSort(this)">Lines</td><td class="sortable ctr1" id="j" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="k" onclick="toggleSort(this)">Methods</td><td class="sortable ctr1" id="l" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="m" onclick="t
oggleSort(this)">Classes</td></tr></thead><tfoot><tr><td>Total</td><td class="bar">55 of 106</td><td class="ctr2">48%</td><td class="bar">2 of 4</td><td class="ctr2">50%</td><td class="ctr1">2</td><td class="ctr2">5</td><td class="ctr1">11</td><td class="ctr2">24</td><td class="ctr1">0</td><td class="ctr2">3</td><td class="ctr1">0</td><td class="ctr2">1</td></tr></tfoot><tbody><tr><td id="a0"><a href="SharedFunctions.html" class="el_class">SharedFunctions</a></td><td class="bar" id="b0"><img src="../jacoco-resources/redbar.gif" width="62" height="10" title="55" alt="55"/><img src="../jacoco-resources/greenbar.gif" width="57" height="10" title="51" alt="51"/></td><td class="ctr2" id="c0">48%</td><td class="bar" id="d0"><img src="../jacoco-resources/redbar.gif" width="60" height="10" title="2" alt="2"/><img src="../jacoco-resources/greenbar.gif" width="60" height="10" title="2" alt="2"/></td><td class="ctr2" id="e0">50%</td><td class="ctr1" id="f0">2</td><td class="ctr2" id="g0">5</td
><td class="ctr1" id="h0">11</td><td class="ctr2" id="i0">24</td><td class="ctr1" id="j0">0</td><td class="ctr2" id="k0">3</td><td class="ctr1" id="l0">0</td><td class="ctr2" id="m0">1</td></tr></tbody></table><div class="footer"><span class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.8.2.201808211720</span></div></body></html>
\ No newline at end of file
Added: dev/commons/commons-release-plugin/1.6-RC1/site/jacoco/org.apache.commons.release.plugin/index.source.html
==============================================================================
--- dev/commons/commons-release-plugin/1.6-RC1/site/jacoco/org.apache.commons.release.plugin/index.source.html (added)
+++ dev/commons/commons-release-plugin/1.6-RC1/site/jacoco/org.apache.commons.release.plugin/index.source.html Sat Mar 9 13:32:27 2019
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="ISO-8859-1"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../jacoco-resources/report.css" type="text/css"/><link rel="shortcut icon" href="../jacoco-resources/report.gif" type="image/gif"/><title>org.apache.commons.release.plugin</title><script type="text/javascript" src="../jacoco-resources/sort.js"></script></head><body onload="initialSort(['breadcrumb', 'coveragetable'])"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="index.html" class="el_class">Classes</a><a href="../jacoco-sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">Apache Commons Release Plugin</a> > <span class="el_package">org.apache.commons.release.plugin</span></div><h1>org.apache.commons.release.plugin<
/h1><table class="coverage" cellspacing="0" id="coveragetable"><thead><tr><td class="sortable" id="a" onclick="toggleSort(this)">Element</td><td class="down sortable bar" id="b" onclick="toggleSort(this)">Missed Instructions</td><td class="sortable ctr2" id="c" onclick="toggleSort(this)">Cov.</td><td class="sortable bar" id="d" onclick="toggleSort(this)">Missed Branches</td><td class="sortable ctr2" id="e" onclick="toggleSort(this)">Cov.</td><td class="sortable ctr1" id="f" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="g" onclick="toggleSort(this)">Cxty</td><td class="sortable ctr1" id="h" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="i" onclick="toggleSort(this)">Lines</td><td class="sortable ctr1" id="j" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="k" onclick="toggleSort(this)">Methods</td><td class="sortable ctr1" id="l" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="m" onclick="toggleSort(thi
s)">Classes</td></tr></thead><tfoot><tr><td>Total</td><td class="bar">55 of 106</td><td class="ctr2">48%</td><td class="bar">2 of 4</td><td class="ctr2">50%</td><td class="ctr1">2</td><td class="ctr2">5</td><td class="ctr1">11</td><td class="ctr2">24</td><td class="ctr1">0</td><td class="ctr2">3</td><td class="ctr1">0</td><td class="ctr2">1</td></tr></tfoot><tbody><tr><td id="a0"><a href="SharedFunctions.java.html" class="el_source">SharedFunctions.java</a></td><td class="bar" id="b0"><img src="../jacoco-resources/redbar.gif" width="62" height="10" title="55" alt="55"/><img src="../jacoco-resources/greenbar.gif" width="57" height="10" title="51" alt="51"/></td><td class="ctr2" id="c0">48%</td><td class="bar" id="d0"><img src="../jacoco-resources/redbar.gif" width="60" height="10" title="2" alt="2"/><img src="../jacoco-resources/greenbar.gif" width="60" height="10" title="2" alt="2"/></td><td class="ctr2" id="e0">50%</td><td class="ctr1" id="f0">2</td><td class="ctr2" id="g0">5</td><
td class="ctr1" id="h0">11</td><td class="ctr2" id="i0">24</td><td class="ctr1" id="j0">0</td><td class="ctr2" id="k0">3</td><td class="ctr1" id="l0">0</td><td class="ctr2" id="m0">1</td></tr></tbody></table><div class="footer"><span class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.8.2.201808211720</span></div></body></html>
\ No newline at end of file
Added: dev/commons/commons-release-plugin/1.6-RC1/site/japicmp.html
==============================================================================
--- dev/commons/commons-release-plugin/1.6-RC1/site/japicmp.html (added)
+++ dev/commons/commons-release-plugin/1.6-RC1/site/japicmp.html Sat Mar 9 13:32:27 2019
@@ -0,0 +1,284 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia at 09 March 2019
+ | 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="ISO-8859-1" />
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+ <meta name="Date-Revision-yyyymmdd" content="20190309" />
+ <meta http-equiv="Content-Language" content="en" />
+ <title>Commons Release Plugin – </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="http://commons.apache.org/" 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="http://commons.apache.org/proper/commons-release-plugin/">Apache Commons Release Plugin ™</a>
+ <ul class="nav">
+
+ <li id="publishDate">Last Published: 09 March 2019</li>
+ <li class="divider">|</li> <li id="projectVersion">Version: 1.6</li>
+ </ul>
+ <div class="pull-right"> <ul class="nav">
+ <li>
+ <a href="http://www.apachecon.com/" class="externalLink" title="ApacheCon">
+ ApacheCon</a>
+ </li>
+ <li>
+ <a href="http://www.apache.org" class="externalLink" title="Apache">
+ Apache</a>
+ </li>
+ <li>
+ <a href="../../" title="Commons">
+ Commons</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">Release Plugin</li>
+ <li class="none">
+ <a href="index.html" title="Overview">
+ Overview</a>
+ </li>
+ <li class="none">
+ <a href="download_commons-release-plugin.cgi" title="Download">
+ Download</a>
+ </li>
+ <li class="none">
+ <a href="release-history.html" title="Release History">
+ Release History</a>
+ </li>
+ <li class="none">
+ <a href="plugin-info.html" title="Plugin Documentation">
+ Plugin Documentation</a>
+ </li>
+ <li class="none">
+ <a href="javadocs/api-release/index.html" title="Javadoc (Latest release)">
+ Javadoc (Latest release)</a>
+ </li>
+ <li class="expanded">
+ <a href="development.html" title="Help">
+ Help</a>
+ <ul>
+ <li class="none">
+ <a href="issue-tracking.html" title="Issue Tracking">
+ Issue Tracking</a>
+ </li>
+ <li class="none">
+ <a href="development.html" title="Development">
+ Development</a>
+ </li>
+ </ul>
+ </li>
+ </ul>
+ <ul class="nav nav-list">
+ <li class="nav-header"><i class="icon-info-sign"></i>Project Documentation</li>
+ <li class="collapsed">
+ <a href="project-info.html" title="Project Information">
+ Project Information</a>
+ </li>
+ <li class="expanded">
+ <a href="project-reports.html" title="Project Reports">
+ Project Reports</a>
+ <ul>
+ <li class="none">
+ <a href="changes-report.html" title="Changes">
+ Changes</a>
+ </li>
+ <li class="none">
+ <a href="jira-report.html" title="JIRA Report">
+ JIRA Report</a>
+ </li>
+ <li class="none">
+ <a href="apidocs/index.html" title="Javadoc">
+ Javadoc</a>
+ </li>
+ <li class="none">
+ <a href="xref/index.html" title="Source Xref">
+ Source Xref</a>
+ </li>
+ <li class="none">
+ <a href="xref-test/index.html" title="Test Source Xref">
+ Test Source Xref</a>
+ </li>
+ <li class="none">
+ <a href="rat-report.html" title="Rat Report">
+ Rat Report</a>
+ </li>
+ <li class="none active">
+ <a href="japicmp.html" title="japicmp">
+ japicmp</a>
+ </li>
+ <li class="none">
+ <a href="plugin-info.html" title="Plugin Documentation">
+ Plugin Documentation</a>
+ </li>
+ <li class="none">
+ <a href="checkstyle.html" title="Checkstyle">
+ Checkstyle</a>
+ </li>
+ <li class="none">
+ <a href="findbugs.html" title="FindBugs">
+ FindBugs</a>
+ </li>
+ <li class="none">
+ <a href="clirr-report.html" title="Clirr">
+ Clirr</a>
+ </li>
+ <li class="none">
+ <a href="pmd.html" title="PMD">
+ PMD</a>
+ </li>
+ <li class="none">
+ <a href="taglist.html" title="Tag List">
+ Tag List</a>
+ </li>
+ <li class="none">
+ <a href="jacoco/index.html" title="JaCoCo">
+ JaCoCo</a>
+ </li>
+ <li class="none">
+ <a href="jacoco-aggregate/index.html" title="JaCoCo Aggregate">
+ JaCoCo Aggregate</a>
+ </li>
+ </ul>
+ </li>
+ </ul>
+ <ul class="nav nav-list">
+ <li class="nav-header">Commons</li>
+ <li class="none">
+ <a href="../../" title="Home">
+ Home</a>
+ </li>
+ <li class="none">
+ <a href="http://www.apache.org/licenses/" class="externalLink" title="License">
+ License</a>
+ </li>
+ <li class="collapsed">
+ <a href="../../components.html" title="Components">
+ Components</a>
+ </li>
+ <li class="collapsed">
+ <a href="../../sandbox/index.html" title="Sandbox">
+ Sandbox</a>
+ </li>
+ <li class="collapsed">
+ <a href="../../dormant/index.html" 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-pom.html" 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="../../releases/index.html" title="Releasing Components">
+ Releasing Components</a>
+ </li>
+ <li class="none">
+ <a href="http://wiki.apache.org/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="http://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="http://www.apache.org/foundation/getinvolved.html" class="externalLink" title="Get Involved">
+ Get Involved</a>
+ </li>
+ <li class="none">
+ <a href="http://www.apache.org/dev/" class="externalLink" title="Developer Resources">
+ Developer Resources</a>
+ </li>
+ <li class="none">
+ <a href="http://www.apache.org/foundation/policies/conduct.html" class="externalLink" title="Code of Conduct">
+ Code of Conduct</a>
+ </li>
+ <li class="none">
+ <a href="http://www.apache.org/foundation/sponsorship.html" class="externalLink" title="Sponsorship">
+ Sponsorship</a>
+ </li>
+ <li class="none">
+ <a href="http://www.apache.org/foundation/thanks.html" class="externalLink" title="Thanks">
+ Thanks</a>
+ </li>
+ </ul>
+ </div>
+ <div id="poweredBy">
+ <a href="http://www.apache.org/events/current-event.html" title="ApacheCon" class="builtBy">
+ <img class="builtBy" alt="ApacheCon" src="http://www.apache.org/events/current-event-125x125.png" />
+ </a>
+ <a href="http://maven.apache.org/" title="Maven" class="builtBy">
+ <img class="builtBy" alt="Maven" src="http://maven.apache.org/images/logos/maven-feather.png" />
+ </a>
+ </div>
+ </td>
+ <td class="content">
+
+ </td>
+ </tr>
+ </table>
+ </div>
+
+ <div class="footer">
+ <p>Copyright © 2018-2019
+ <a href="https://www.apache.org/">The Apache Software Foundation</a>.
+ All Rights Reserved.</p>
+ </div>
+ </body>
+
+</html>