You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@commons.apache.org by ch...@apache.org on 2019/09/02 19:25:04 UTC
svn commit: r1049536 [11/22] - in
/websites/production/commons/content/proper/commons-release-plugin: ./
apidocs/ apidocs/org/apache/commons/release/plugin/
apidocs/org/apache/commons/release/plugin/class-use/
apidocs/org/apache/commons/release/plugin/...
Modified: websites/production/commons/content/proper/commons-release-plugin/jacoco/org.apache.commons.release.plugin.mojos/CommonsDistributionDetachmentMojo.html
==============================================================================
--- websites/production/commons/content/proper/commons-release-plugin/jacoco/org.apache.commons.release.plugin.mojos/CommonsDistributionDetachmentMojo.html (original)
+++ websites/production/commons/content/proper/commons-release-plugin/jacoco/org.apache.commons.release.plugin.mojos/CommonsDistributionDetachmentMojo.html Mon Sep 2 19:25:02 2019
@@ -1 +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>CommonsDistributionDetachmentMojo</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.mojos</a> > <span class="el_class">CommonsDistributionDetachmentMojo</span></div><h1>CommonsDistri
butionDetachmentMojo</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">70 of 430</td><td class="ctr2">83%</td><td class="ba
r">4 of 22</td><td class="ctr2">81%</td><td class="ctr1">4</td><td class="ctr2">20</td><td class="ctr1">15</td><td class="ctr2">92</td><td class="ctr1">0</td><td class="ctr2">9</td></tr></tfoot><tbody><tr><td id="a6"><a href="CommonsDistributionDetachmentMojo.java.html#L153" class="el_method">putAttachedArtifactInSha512Map(Artifact)</a></td><td class="bar" id="b0"><img src="../jacoco-resources/redbar.gif" width="37" height="10" title="30" alt="30"/><img src="../jacoco-resources/greenbar.gif" width="25" height="10" title="21" alt="21"/></td><td class="ctr2" id="c8">41%</td><td class="bar" id="d4"/><td class="ctr2" id="e4">n/a</td><td class="ctr1" id="f2">0</td><td class="ctr2" id="g4">1</td><td class="ctr1" id="h0">6</td><td class="ctr2" id="i3">11</td><td class="ctr1" id="j0">0</td><td class="ctr2" id="k0">1</td></tr><tr><td id="a5"><a href="CommonsDistributionDetachmentMojo.java.html#L217" class="el_method">hashArtifacts()</a></td><td class="bar" id="b1"><img src="../jacoco-resourc
es/redbar.gif" width="19" height="10" title="16" alt="16"/><img src="../jacoco-resources/greenbar.gif" width="74" height="10" title="60" alt="60"/></td><td class="ctr2" id="c7">78%</td><td class="bar" id="d2"><img src="../jacoco-resources/greenbar.gif" width="34" height="10" title="4" alt="4"/></td><td class="ctr2" id="e0">100%</td><td class="ctr1" id="f3">0</td><td class="ctr2" id="g1">3</td><td class="ctr1" id="h2">2</td><td class="ctr2" id="i1">13</td><td class="ctr1" id="j1">0</td><td class="ctr2" id="k1">1</td></tr><tr><td id="a2"><a href="CommonsDistributionDetachmentMojo.java.html#L113" class="el_method">execute()</a></td><td class="bar" id="b2"><img src="../jacoco-resources/redbar.gif" width="12" height="10" title="10" alt="10"/><img src="../jacoco-resources/greenbar.gif" width="107" height="10" title="87" alt="87"/></td><td class="ctr2" id="c4">89%</td><td class="bar" id="d0"><img src="../jacoco-resources/redbar.gif" width="25" height="10" title="3" alt="3"/><img src="../ja
coco-resources/greenbar.gif" width="94" height="10" title="11" alt="11"/></td><td class="ctr2" id="e2">78%</td><td class="ctr1" id="f0">3</td><td class="ctr2" id="g0">8</td><td class="ctr1" id="h1">4</td><td class="ctr2" id="i0">25</td><td class="ctr1" id="j2">0</td><td class="ctr2" id="k2">1</td></tr><tr><td id="a8"><a href="CommonsDistributionDetachmentMojo.java.html#L177" class="el_method">writeAllArtifactsInSha512PropertiesFile()</a></td><td class="bar" id="b3"><img src="../jacoco-resources/redbar.gif" width="8" height="10" title="7" alt="7"/><img src="../jacoco-resources/greenbar.gif" width="39" height="10" title="32" alt="32"/></td><td class="ctr2" id="c5">82%</td><td class="bar" id="d5"/><td class="ctr2" id="e5">n/a</td><td class="ctr1" id="f4">0</td><td class="ctr2" id="g5">1</td><td class="ctr1" id="h3">2</td><td class="ctr2" id="i4">8</td><td class="ctr1" id="j3">0</td><td class="ctr2" id="k3">1</td></tr><tr><td id="a3"><a href="CommonsDistributionDetachmentMojo.java.html#
L259" class="el_method">getArtifactKey(Artifact)</a></td><td class="bar" id="b4"><img src="../jacoco-resources/redbar.gif" width="8" height="10" title="7" alt="7"/><img src="../jacoco-resources/greenbar.gif" width="33" height="10" title="27" alt="27"/></td><td class="ctr2" id="c6">79%</td><td class="bar" id="d1"><img src="../jacoco-resources/redbar.gif" width="8" height="10" title="1" alt="1"/><img src="../jacoco-resources/greenbar.gif" width="8" height="10" title="1" alt="1"/></td><td class="ctr2" id="e3">50%</td><td class="ctr1" id="f1">1</td><td class="ctr2" id="g2">2</td><td class="ctr1" id="h4">1</td><td class="ctr2" id="i5">7</td><td class="ctr1" id="j4">0</td><td class="ctr2" id="k4">1</td></tr><tr><td id="a1"><a href="CommonsDistributionDetachmentMojo.java.html#L194" class="el_method">copyRemovedArtifactsToWorkingDirectory()</a></td><td class="bar" id="b5"><img src="../jacoco-resources/greenbar.gif" width="91" height="10" title="74" alt="74"/></td><td class="ctr2" id="c0">10
0%</td><td class="bar" id="d3"><img src="../jacoco-resources/greenbar.gif" width="17" height="10" title="2" alt="2"/></td><td class="ctr2" id="e1">100%</td><td class="ctr1" id="f5">0</td><td class="ctr2" id="g3">2</td><td class="ctr1" id="h5">0</td><td class="ctr2" id="i2">13</td><td class="ctr1" id="j5">0</td><td class="ctr2" id="k5">1</td></tr><tr><td id="a7"><a href="CommonsDistributionDetachmentMojo.java.html#L65" class="el_method">static {...}</a></td><td class="bar" id="b6"><img src="../jacoco-resources/greenbar.gif" width="29" height="10" title="24" alt="24"/></td><td class="ctr2" id="c1">100%</td><td class="bar" id="d6"/><td class="ctr2" id="e6">n/a</td><td class="ctr1" id="f6">0</td><td class="ctr2" id="g6">1</td><td class="ctr1" id="h6">0</td><td class="ctr2" id="i6">7</td><td class="ctr1" id="j6">0</td><td class="ctr2" id="k6">1</td></tr><tr><td id="a4"><a href="CommonsDistributionDetachmentMojo.java.html#L244" class="el_method">getSha512FilePath(File, File)</a></td><td c
lass="bar" id="b7"><img src="../jacoco-resources/greenbar.gif" width="27" height="10" title="22" alt="22"/></td><td class="ctr2" id="c2">100%</td><td class="bar" id="d7"/><td class="ctr2" id="e7">n/a</td><td class="ctr1" id="f7">0</td><td class="ctr2" id="g7">1</td><td class="ctr1" id="h7">0</td><td class="ctr2" id="i7">5</td><td class="ctr1" id="j7">0</td><td class="ctr2" id="k7">1</td></tr><tr><td id="a0"><a href="CommonsDistributionDetachmentMojo.java.html#L54" class="el_method">CommonsDistributionDetachmentMojo()</a></td><td class="bar" id="b8"><img src="../jacoco-resources/greenbar.gif" width="16" height="10" title="13" alt="13"/></td><td class="ctr2" id="c3">100%</td><td class="bar" id="d8"/><td class="ctr2" id="e8">n/a</td><td class="ctr1" id="f8">0</td><td class="ctr2" id="g8">1</td><td class="ctr1" id="h8">0</td><td class="ctr2" id="i8">3</td><td class="ctr1" id="j8">0</td><td class="ctr2" id="k8">1</td></tr></tbody></table><div class="footer"><span class="right">Created wi
th <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.8.2.201808211720</span></div></body></html>
\ No newline at end of file
+<?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>CommonsDistributionDetachmentMojo</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.mojos</a> > <span class="el_class">CommonsDistributionDetachmentMojo</span></div><h1>CommonsDistri
butionDetachmentMojo</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">63 of 402</td><td class="ctr2">84%</td><td class="ba
r">3 of 20</td><td class="ctr2">85%</td><td class="ctr1">3</td><td class="ctr2">19</td><td class="ctr1">14</td><td class="ctr2">86</td><td class="ctr1">0</td><td class="ctr2">9</td></tr></tfoot><tbody><tr><td id="a6"><a href="CommonsDistributionDetachmentMojo.java.html#L154" class="el_method">putAttachedArtifactInSha512Map(Artifact)</a></td><td class="bar" id="b0"><img src="../jacoco-resources/redbar.gif" width="37" height="10" title="30" alt="30"/><img src="../jacoco-resources/greenbar.gif" width="25" height="10" title="21" alt="21"/></td><td class="ctr2" id="c8">41%</td><td class="bar" id="d3"/><td class="ctr2" id="e3">n/a</td><td class="ctr1" id="f1">0</td><td class="ctr2" id="g3">1</td><td class="ctr1" id="h0">6</td><td class="ctr2" id="i3">11</td><td class="ctr1" id="j0">0</td><td class="ctr2" id="k0">1</td></tr><tr><td id="a5"><a href="CommonsDistributionDetachmentMojo.java.html#L218" class="el_method">hashArtifacts()</a></td><td class="bar" id="b1"><img src="../jacoco-resourc
es/redbar.gif" width="19" height="10" title="16" alt="16"/><img src="../jacoco-resources/greenbar.gif" width="76" height="10" title="62" alt="62"/></td><td class="ctr2" id="c7">79%</td><td class="bar" id="d1"><img src="../jacoco-resources/greenbar.gif" width="34" height="10" title="4" alt="4"/></td><td class="ctr2" id="e0">100%</td><td class="ctr1" id="f2">0</td><td class="ctr2" id="g1">3</td><td class="ctr1" id="h2">2</td><td class="ctr2" id="i1">13</td><td class="ctr1" id="j1">0</td><td class="ctr2" id="k1">1</td></tr><tr><td id="a2"><a href="CommonsDistributionDetachmentMojo.java.html#L114" class="el_method">execute()</a></td><td class="bar" id="b2"><img src="../jacoco-resources/redbar.gif" width="12" height="10" title="10" alt="10"/><img src="../jacoco-resources/greenbar.gif" width="107" height="10" title="87" alt="87"/></td><td class="ctr2" id="c5">89%</td><td class="bar" id="d0"><img src="../jacoco-resources/redbar.gif" width="25" height="10" title="3" alt="3"/><img src="../ja
coco-resources/greenbar.gif" width="94" height="10" title="11" alt="11"/></td><td class="ctr2" id="e2">78%</td><td class="ctr1" id="f0">3</td><td class="ctr2" id="g0">8</td><td class="ctr1" id="h1">4</td><td class="ctr2" id="i0">25</td><td class="ctr1" id="j2">0</td><td class="ctr2" id="k2">1</td></tr><tr><td id="a8"><a href="CommonsDistributionDetachmentMojo.java.html#L178" class="el_method">writeAllArtifactsInSha512PropertiesFile()</a></td><td class="bar" id="b3"><img src="../jacoco-resources/redbar.gif" width="8" height="10" title="7" alt="7"/><img src="../jacoco-resources/greenbar.gif" width="39" height="10" title="32" alt="32"/></td><td class="ctr2" id="c6">82%</td><td class="bar" id="d4"/><td class="ctr2" id="e4">n/a</td><td class="ctr1" id="f3">0</td><td class="ctr2" id="g4">1</td><td class="ctr1" id="h3">2</td><td class="ctr2" id="i4">8</td><td class="ctr1" id="j3">0</td><td class="ctr2" id="k3">1</td></tr><tr><td id="a1"><a href="CommonsDistributionDetachmentMojo.java.html#
L195" class="el_method">copyRemovedArtifactsToWorkingDirectory()</a></td><td class="bar" id="b4"><img src="../jacoco-resources/greenbar.gif" width="91" height="10" title="74" alt="74"/></td><td class="ctr2" id="c0">100%</td><td class="bar" id="d2"><img src="../jacoco-resources/greenbar.gif" width="17" height="10" title="2" alt="2"/></td><td class="ctr2" id="e1">100%</td><td class="ctr1" id="f4">0</td><td class="ctr2" id="g2">2</td><td class="ctr1" id="h4">0</td><td class="ctr2" id="i2">13</td><td class="ctr1" id="j4">0</td><td class="ctr2" id="k4">1</td></tr><tr><td id="a7"><a href="CommonsDistributionDetachmentMojo.java.html#L66" class="el_method">static {...}</a></td><td class="bar" id="b5"><img src="../jacoco-resources/greenbar.gif" width="29" height="10" title="24" alt="24"/></td><td class="ctr2" id="c1">100%</td><td class="bar" id="d5"/><td class="ctr2" id="e5">n/a</td><td class="ctr1" id="f5">0</td><td class="ctr2" id="g5">1</td><td class="ctr1" id="h5">0</td><td class="ctr2"
id="i5">7</td><td class="ctr1" id="j5">0</td><td class="ctr2" id="k5">1</td></tr><tr><td id="a4"><a href="CommonsDistributionDetachmentMojo.java.html#L245" class="el_method">getSha512FilePath(File, File)</a></td><td class="bar" id="b6"><img src="../jacoco-resources/greenbar.gif" width="27" height="10" title="22" alt="22"/></td><td class="ctr2" id="c2">100%</td><td class="bar" id="d6"/><td class="ctr2" id="e6">n/a</td><td class="ctr1" id="f6">0</td><td class="ctr2" id="g6">1</td><td class="ctr1" id="h6">0</td><td class="ctr2" id="i6">5</td><td class="ctr1" id="j6">0</td><td class="ctr2" id="k6">1</td></tr><tr><td id="a0"><a href="CommonsDistributionDetachmentMojo.java.html#L55" class="el_method">CommonsDistributionDetachmentMojo()</a></td><td class="bar" id="b7"><img src="../jacoco-resources/greenbar.gif" width="16" height="10" title="13" alt="13"/></td><td class="ctr2" id="c3">100%</td><td class="bar" id="d7"/><td class="ctr2" id="e7">n/a</td><td class="ctr1" id="f7">0</td><td class
="ctr2" id="g7">1</td><td class="ctr1" id="h7">0</td><td class="ctr2" id="i7">3</td><td class="ctr1" id="j7">0</td><td class="ctr2" id="k7">1</td></tr><tr><td id="a3"><a href="CommonsDistributionDetachmentMojo.java.html#L260" class="el_method">getArtifactKey(Artifact)</a></td><td class="bar" id="b8"><img src="../jacoco-resources/greenbar.gif" width="4" height="10" title="4" alt="4"/></td><td class="ctr2" id="c4">100%</td><td class="bar" id="d8"/><td class="ctr2" id="e8">n/a</td><td class="ctr1" id="f8">0</td><td class="ctr2" id="g8">1</td><td class="ctr1" id="h8">0</td><td class="ctr2" id="i8">1</td><td class="ctr1" id="j8">0</td><td class="ctr2" id="k8">1</td></tr></tbody></table><div class="footer"><span class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.8.3.201901230119</span></div></body></html>
\ No newline at end of file
Modified: websites/production/commons/content/proper/commons-release-plugin/jacoco/org.apache.commons.release.plugin.mojos/CommonsDistributionDetachmentMojo.java.html
==============================================================================
--- websites/production/commons/content/proper/commons-release-plugin/jacoco/org.apache.commons.release.plugin.mojos/CommonsDistributionDetachmentMojo.java.html (original)
+++ websites/production/commons/content/proper/commons-release-plugin/jacoco/org.apache.commons.release.plugin.mojos/CommonsDistributionDetachmentMojo.java.html Mon Sep 2 19:25:02 2019
@@ -25,10 +25,11 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
-import java.util.Properties;
+import java.util.Locale;
import java.util.Set;
import org.apache.commons.codec.digest.DigestUtils;
+import org.apache.commons.collections4.properties.SortedProperties;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.release.plugin.SharedFunctions;
import org.apache.maven.artifact.Artifact;
@@ -51,7 +52,7 @@ import org.apache.maven.project.MavenPro
defaultPhase = LifecyclePhase.VERIFY,
threadSafe = true,
aggregator = true)
-<span class="fc" id="L54">public class CommonsDistributionDetachmentMojo extends AbstractMojo {</span>
+<span class="fc" id="L55">public class CommonsDistributionDetachmentMojo extends AbstractMojo {</span>
/**
* A list of "artifact types" in the Maven vernacular, to
@@ -62,26 +63,26 @@ import org.apache.maven.project.MavenPro
*/
private static final Set<String> ARTIFACT_TYPES_TO_DETACH;
static {
-<span class="fc" id="L65"> Set<String> hashSet = new HashSet<>();</span>
-<span class="fc" id="L66"> hashSet.add("zip");</span>
-<span class="fc" id="L67"> hashSet.add("tar.gz");</span>
-<span class="fc" id="L68"> hashSet.add("zip.asc");</span>
-<span class="fc" id="L69"> hashSet.add("tar.gz.asc");</span>
-<span class="fc" id="L70"> ARTIFACT_TYPES_TO_DETACH = Collections.unmodifiableSet(hashSet);</span>
-<span class="fc" id="L71"> }</span>
+<span class="fc" id="L66"> final Set<String> hashSet = new HashSet<>();</span>
+<span class="fc" id="L67"> hashSet.add("zip");</span>
+<span class="fc" id="L68"> hashSet.add("tar.gz");</span>
+<span class="fc" id="L69"> hashSet.add("zip.asc");</span>
+<span class="fc" id="L70"> hashSet.add("tar.gz.asc");</span>
+<span class="fc" id="L71"> ARTIFACT_TYPES_TO_DETACH = Collections.unmodifiableSet(hashSet);</span>
+<span class="fc" id="L72"> }</span>
/**
* This list is supposed to hold the Maven references to the aforementioned artifacts so that we
* can upload them to svn after they've been detached from the Maven deployment.
*/
-<span class="fc" id="L77"> private final List<Artifact> detachedArtifacts = new ArrayList<>();</span>
+<span class="fc" id="L78"> private final List<Artifact> detachedArtifacts = new ArrayList<>();</span>
/**
- * A {@link Properties} of {@link Artifact} â {@link String} containing the sha256 signatures
+ * A {@link SortedProperties} of {@link Artifact} â {@link String} containing the sha512 signatures
* for the individual artifacts, where the {@link Artifact} is represented as:
* <code>groupId:artifactId:version:type=sha512</code>.
*/
-<span class="fc" id="L84"> private final Properties artifactSha512s = new Properties();</span>
+<span class="fc" id="L85"> private final SortedProperties artifactSha512s = new SortedProperties();</span>
/**
* The maven project context injection so that we can get a hold of the variables at hand.
@@ -110,37 +111,37 @@ import org.apache.maven.project.MavenPro
@Override
public void execute() throws MojoExecutionException {
-<span class="pc bpc" id="L113" title="1 of 2 branches missed."> if (!isDistModule) {</span>
-<span class="nc" id="L114"> getLog().info(</span>
+<span class="pc bpc" id="L114" title="1 of 2 branches missed."> if (!isDistModule) {</span>
+<span class="nc" id="L115"> getLog().info(</span>
"This module is marked as a non distribution or assembly module, and the plugin will not run.");
-<span class="nc" id="L116"> return;</span>
+<span class="nc" id="L117"> return;</span>
}
-<span class="fc bfc" id="L118" title="All 2 branches covered."> if (StringUtils.isEmpty(distSvnStagingUrl)) {</span>
-<span class="fc" id="L119"> getLog().warn("commons.distSvnStagingUrl is not set, the commons-release-plugin will not run.");</span>
-<span class="fc" id="L120"> return;</span>
+<span class="fc bfc" id="L119" title="All 2 branches covered."> if (StringUtils.isEmpty(distSvnStagingUrl)) {</span>
+<span class="fc" id="L120"> getLog().warn("commons.distSvnStagingUrl is not set, the commons-release-plugin will not run.");</span>
+<span class="fc" id="L121"> return;</span>
}
-<span class="fc" id="L122"> getLog().info("Detaching Assemblies");</span>
-<span class="fc bfc" id="L123" title="All 2 branches covered."> for (Object attachedArtifact : project.getAttachedArtifacts()) {</span>
-<span class="fc" id="L124"> putAttachedArtifactInSha512Map((Artifact) attachedArtifact);</span>
-<span class="fc bfc" id="L125" title="All 2 branches covered."> if (ARTIFACT_TYPES_TO_DETACH.contains(((Artifact) attachedArtifact).getType())) {</span>
-<span class="fc" id="L126"> detachedArtifacts.add((Artifact) attachedArtifact);</span>
+<span class="fc" id="L123"> getLog().info("Detaching Assemblies");</span>
+<span class="fc bfc" id="L124" title="All 2 branches covered."> for (final Object attachedArtifact : project.getAttachedArtifacts()) {</span>
+<span class="fc" id="L125"> putAttachedArtifactInSha512Map((Artifact) attachedArtifact);</span>
+<span class="fc bfc" id="L126" title="All 2 branches covered."> if (ARTIFACT_TYPES_TO_DETACH.contains(((Artifact) attachedArtifact).getType())) {</span>
+<span class="fc" id="L127"> detachedArtifacts.add((Artifact) attachedArtifact);</span>
}
-<span class="fc" id="L128"> }</span>
-<span class="pc bpc" id="L129" title="1 of 2 branches missed."> if (detachedArtifacts.isEmpty()) {</span>
-<span class="nc" id="L130"> getLog().info("Current project contains no distributions. Not executing.");</span>
-<span class="nc" id="L131"> return;</span>
+<span class="fc" id="L129"> }</span>
+<span class="pc bpc" id="L130" title="1 of 2 branches missed."> if (detachedArtifacts.isEmpty()) {</span>
+<span class="nc" id="L131"> getLog().info("Current project contains no distributions. Not executing.");</span>
+<span class="nc" id="L132"> return;</span>
}
-<span class="fc bfc" id="L133" title="All 2 branches covered."> for (Artifact artifactToRemove : detachedArtifacts) {</span>
-<span class="fc" id="L134"> project.getAttachedArtifacts().remove(artifactToRemove);</span>
-<span class="fc" id="L135"> }</span>
-<span class="pc bpc" id="L136" title="1 of 2 branches missed."> if (!workingDirectory.exists()) {</span>
-<span class="fc" id="L137"> SharedFunctions.initDirectory(getLog(), workingDirectory);</span>
+<span class="fc bfc" id="L134" title="All 2 branches covered."> for (final Artifact artifactToRemove : detachedArtifacts) {</span>
+<span class="fc" id="L135"> project.getAttachedArtifacts().remove(artifactToRemove);</span>
+<span class="fc" id="L136"> }</span>
+<span class="pc bpc" id="L137" title="1 of 2 branches missed."> if (!workingDirectory.exists()) {</span>
+<span class="fc" id="L138"> SharedFunctions.initDirectory(getLog(), workingDirectory);</span>
}
-<span class="fc" id="L139"> writeAllArtifactsInSha512PropertiesFile();</span>
-<span class="fc" id="L140"> copyRemovedArtifactsToWorkingDirectory();</span>
-<span class="fc" id="L141"> getLog().info("");</span>
-<span class="fc" id="L142"> hashArtifacts();</span>
-<span class="fc" id="L143"> }</span>
+<span class="fc" id="L140"> writeAllArtifactsInSha512PropertiesFile();</span>
+<span class="fc" id="L141"> copyRemovedArtifactsToWorkingDirectory();</span>
+<span class="fc" id="L142"> getLog().info("");</span>
+<span class="fc" id="L143"> hashArtifacts();</span>
+<span class="fc" id="L144"> }</span>
/**
* Takes an attached artifact and puts the signature in the map.
@@ -148,25 +149,25 @@ import org.apache.maven.project.MavenPro
* @throws MojoExecutionException if an {@link IOException} occurs when getting the sha512 of the
* artifact.
*/
- private void putAttachedArtifactInSha512Map(Artifact artifact) throws MojoExecutionException {
+ private void putAttachedArtifactInSha512Map(final Artifact artifact) throws MojoExecutionException {
try {
-<span class="fc" id="L153"> String artifactKey = getArtifactKey(artifact);</span>
-<span class="fc" id="L154"> try (FileInputStream fis = new FileInputStream(artifact.getFile())) {</span>
-<span class="fc" id="L155"> artifactSha512s.put(artifactKey, DigestUtils.sha512Hex(fis));</span>
+<span class="fc" id="L154"> final String artifactKey = getArtifactKey(artifact);</span>
+<span class="fc" id="L155"> try (FileInputStream fis = new FileInputStream(artifact.getFile())) {</span>
+<span class="fc" id="L156"> artifactSha512s.put(artifactKey, DigestUtils.sha512Hex(fis));</span>
}
-<span class="nc" id="L157"> } catch (IOException e) {</span>
-<span class="nc" id="L158"> throw new MojoExecutionException(</span>
+<span class="nc" id="L158"> } catch (final IOException e) {</span>
+<span class="nc" id="L159"> throw new MojoExecutionException(</span>
"Could not find artifact signature for: "
-<span class="nc" id="L160"> + artifact.getArtifactId()</span>
+<span class="nc" id="L161"> + artifact.getArtifactId()</span>
+ "-"
-<span class="nc" id="L162"> + artifact.getClassifier()</span>
+<span class="nc" id="L163"> + artifact.getClassifier()</span>
+ "-"
-<span class="nc" id="L164"> + artifact.getVersion()</span>
+<span class="nc" id="L165"> + artifact.getVersion()</span>
+ " type: "
-<span class="nc" id="L166"> + artifact.getType(),</span>
+<span class="nc" id="L167"> + artifact.getType(),</span>
e);
-<span class="fc" id="L168"> }</span>
-<span class="fc" id="L169"> }</span>
+<span class="fc" id="L169"> }</span>
+<span class="fc" id="L170"> }</span>
/**
* Writes to ./target/commons-release-plugin/sha512.properties the artifact sha512's.
@@ -174,14 +175,14 @@ import org.apache.maven.project.MavenPro
* @throws MojoExecutionException if we can't write the file due to an {@link IOException}.
*/
private void writeAllArtifactsInSha512PropertiesFile() throws MojoExecutionException {
-<span class="fc" id="L177"> File propertiesFile = new File(workingDirectory, "sha512.properties");</span>
-<span class="fc" id="L178"> getLog().info("Writting " + propertiesFile);</span>
-<span class="fc" id="L179"> try (FileOutputStream fileWriter = new FileOutputStream(propertiesFile)) {</span>
-<span class="fc" id="L180"> artifactSha512s.store(fileWriter, "Release SHA-512s");</span>
-<span class="nc" id="L181"> } catch (IOException e) {</span>
-<span class="nc" id="L182"> throw new MojoExecutionException("Failure to write SHA-512's", e);</span>
-<span class="fc" id="L183"> }</span>
-<span class="fc" id="L184"> }</span>
+<span class="fc" id="L178"> final File propertiesFile = new File(workingDirectory, "sha512.properties");</span>
+<span class="fc" id="L179"> getLog().info("Writting " + propertiesFile);</span>
+<span class="fc" id="L180"> try (FileOutputStream fileWriter = new FileOutputStream(propertiesFile)) {</span>
+<span class="fc" id="L181"> artifactSha512s.store(fileWriter, "Release SHA-512s");</span>
+<span class="nc" id="L182"> } catch (final IOException e) {</span>
+<span class="nc" id="L183"> throw new MojoExecutionException("Failure to write SHA-512's", e);</span>
+<span class="fc" id="L184"> }</span>
+<span class="fc" id="L185"> }</span>
/**
* A helper method to copy the newly detached artifacts to <code>target/commons-release-plugin</code>
@@ -191,22 +192,22 @@ import org.apache.maven.project.MavenPro
* properly wrapped so that Maven can handle it.
*/
private void copyRemovedArtifactsToWorkingDirectory() throws MojoExecutionException {
-<span class="fc" id="L194"> final String wdAbsolutePath = workingDirectory.getAbsolutePath();</span>
-<span class="fc" id="L195"> getLog().info(</span>
-<span class="fc" id="L196"> "Copying " + detachedArtifacts.size() + " detached artifacts to working directory " + wdAbsolutePath);</span>
-<span class="fc bfc" id="L197" title="All 2 branches covered."> for (Artifact artifact: detachedArtifacts) {</span>
-<span class="fc" id="L198"> File artifactFile = artifact.getFile();</span>
-<span class="fc" id="L199"> StringBuilder copiedArtifactAbsolutePath = new StringBuilder(wdAbsolutePath);</span>
-<span class="fc" id="L200"> copiedArtifactAbsolutePath.append("/");</span>
-<span class="fc" id="L201"> copiedArtifactAbsolutePath.append(artifactFile.getName());</span>
-<span class="fc" id="L202"> File copiedArtifact = new File(copiedArtifactAbsolutePath.toString());</span>
-<span class="fc" id="L203"> getLog().info("Copying: " + artifactFile.getName());</span>
-<span class="fc" id="L204"> SharedFunctions.copyFile(getLog(), artifactFile, copiedArtifact);</span>
-<span class="fc" id="L205"> }</span>
-<span class="fc" id="L206"> }</span>
+<span class="fc" id="L195"> final String wdAbsolutePath = workingDirectory.getAbsolutePath();</span>
+<span class="fc" id="L196"> getLog().info(</span>
+<span class="fc" id="L197"> "Copying " + detachedArtifacts.size() + " detached artifacts to working directory " + wdAbsolutePath);</span>
+<span class="fc bfc" id="L198" title="All 2 branches covered."> for (final Artifact artifact: detachedArtifacts) {</span>
+<span class="fc" id="L199"> final File artifactFile = artifact.getFile();</span>
+<span class="fc" id="L200"> final StringBuilder copiedArtifactAbsolutePath = new StringBuilder(wdAbsolutePath);</span>
+<span class="fc" id="L201"> copiedArtifactAbsolutePath.append("/");</span>
+<span class="fc" id="L202"> copiedArtifactAbsolutePath.append(artifactFile.getName());</span>
+<span class="fc" id="L203"> final File copiedArtifact = new File(copiedArtifactAbsolutePath.toString());</span>
+<span class="fc" id="L204"> getLog().info("Copying: " + artifactFile.getName());</span>
+<span class="fc" id="L205"> SharedFunctions.copyFile(getLog(), artifactFile, copiedArtifact);</span>
+<span class="fc" id="L206"> }</span>
+<span class="fc" id="L207"> }</span>
/**
- * A helper method that creates sha256 and sha512 signature files for our detached artifacts in the
+ * A helper method that creates sha512 signature files for our detached artifacts in the
* <code>target/commons-release-plugin</code> directory for the purpose of being uploaded by
* the {@link CommonsDistributionStagingMojo}.
*
@@ -214,24 +215,24 @@ import org.apache.maven.project.MavenPro
* properly wrapped so that Maven can handle it.
*/
private void hashArtifacts() throws MojoExecutionException {
-<span class="fc bfc" id="L217" title="All 2 branches covered."> for (Artifact artifact : detachedArtifacts) {</span>
-<span class="fc bfc" id="L218" title="All 2 branches covered."> if (!artifact.getFile().getName().contains("asc")) {</span>
-<span class="fc" id="L219"> String artifactKey = getArtifactKey(artifact);</span>
+<span class="fc bfc" id="L218" title="All 2 branches covered."> for (final Artifact artifact : detachedArtifacts) {</span>
+<span class="fc bfc" id="L219" title="All 2 branches covered."> if (!artifact.getFile().getName().toLowerCase(Locale.ROOT).contains("asc")) {</span>
+<span class="fc" id="L220"> final String artifactKey = getArtifactKey(artifact);</span>
try {
String digest;
// SHA-512
-<span class="fc" id="L223"> digest = artifactSha512s.getProperty(artifactKey.toString());</span>
-<span class="fc" id="L224"> getLog().info(artifact.getFile().getName() + " sha512: " + digest);</span>
-<span class="fc" id="L225"> try (PrintWriter printWriter = new PrintWriter(</span>
-<span class="fc" id="L226"> getSha512FilePath(workingDirectory, artifact.getFile()))) {</span>
-<span class="fc" id="L227"> printWriter.println(digest);</span>
+<span class="fc" id="L224"> digest = artifactSha512s.getProperty(artifactKey.toString());</span>
+<span class="fc" id="L225"> getLog().info(artifact.getFile().getName() + " sha512: " + digest);</span>
+<span class="fc" id="L226"> try (PrintWriter printWriter = new PrintWriter(</span>
+<span class="fc" id="L227"> getSha512FilePath(workingDirectory, artifact.getFile()))) {</span>
+<span class="fc" id="L228"> printWriter.println(digest);</span>
}
-<span class="nc" id="L229"> } catch (IOException e) {</span>
-<span class="nc" id="L230"> throw new MojoExecutionException("Could not sign file: " + artifact.getFile().getName(), e);</span>
-<span class="fc" id="L231"> }</span>
+<span class="nc" id="L230"> } catch (final IOException e) {</span>
+<span class="nc" id="L231"> throw new MojoExecutionException("Could not sign file: " + artifact.getFile().getName(), e);</span>
+<span class="fc" id="L232"> }</span>
}
-<span class="fc" id="L233"> }</span>
-<span class="fc" id="L234"> }</span>
+<span class="fc" id="L234"> }</span>
+<span class="fc" id="L235"> }</span>
/**
* A helper method to create a file path for the <code>sha512</code> signature file from a given file.
@@ -240,30 +241,23 @@ import org.apache.maven.project.MavenPro
* @param file the {@link File} whose name we should use to create the <code>.sha512</code> file.
* @return a {@link String} that is the absolute path to the <code>.sha512</code> file.
*/
- private String getSha512FilePath(File directory, File file) {
-<span class="fc" id="L244"> StringBuilder buffer = new StringBuilder(directory.getAbsolutePath());</span>
-<span class="fc" id="L245"> buffer.append("/");</span>
-<span class="fc" id="L246"> buffer.append(file.getName());</span>
-<span class="fc" id="L247"> buffer.append(".sha512");</span>
-<span class="fc" id="L248"> return buffer.toString();</span>
+ private String getSha512FilePath(final File directory, final File file) {
+<span class="fc" id="L245"> final StringBuilder buffer = new StringBuilder(directory.getAbsolutePath());</span>
+<span class="fc" id="L246"> buffer.append("/");</span>
+<span class="fc" id="L247"> buffer.append(file.getName());</span>
+<span class="fc" id="L248"> buffer.append(".sha512");</span>
+<span class="fc" id="L249"> return buffer.toString();</span>
}
/**
- * Generates the unique artifact key for storage in our sha256 map and sha512 map. For example,
+ * Generates the unique artifact key for storage in our sha512 map. For example,
* commons-test-1.4-src.tar.gz should have it's name as the key.
*
* @param artifact the {@link Artifact} that we wish to generate a key for.
* @return the generated key
*/
- private String getArtifactKey(Artifact artifact) {
-<span class="fc" id="L259"> StringBuilder artifactKey = new StringBuilder();</span>
-<span class="fc" id="L260"> artifactKey.append(artifact.getArtifactId()).append('-')</span>
-<span class="fc" id="L261"> .append(artifact.getVersion()).append('-');</span>
-<span class="pc bpc" id="L262" title="1 of 2 branches missed."> if (artifact.hasClassifier()) {</span>
-<span class="nc" id="L263"> artifactKey.append(artifact.getClassifier()).append('-');</span>
- }
-<span class="fc" id="L265"> artifactKey.append(artifact.getType());</span>
-<span class="fc" id="L266"> return artifactKey.toString();</span>
+ private String getArtifactKey(final Artifact artifact) {
+<span class="fc" id="L260"> return artifact.getFile().getName();</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
+</pre><div class="footer"><span class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.8.3.201901230119</span></div></body></html>
\ No newline at end of file
Modified: websites/production/commons/content/proper/commons-release-plugin/jacoco/org.apache.commons.release.plugin.mojos/CommonsDistributionStagingMojo.html
==============================================================================
--- websites/production/commons/content/proper/commons-release-plugin/jacoco/org.apache.commons.release.plugin.mojos/CommonsDistributionStagingMojo.html (original)
+++ websites/production/commons/content/proper/commons-release-plugin/jacoco/org.apache.commons.release.plugin.mojos/CommonsDistributionStagingMojo.html Mon Sep 2 19:25:02 2019
@@ -1 +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>CommonsDistributionStagingMojo</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.mojos</a> > <span class="el_class">CommonsDistributionStagingMojo</span></div><h1>CommonsDistribution
StagingMojo</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">250 of 801</td><td class="ctr2">68%</td><td class="bar">13 of
36</td><td class="ctr2">63%</td><td class="ctr1">11</td><td class="ctr2">27</td><td class="ctr1">38</td><td class="ctr2">143</td><td class="ctr1">0</td><td class="ctr2">9</td></tr></tfoot><tbody><tr><td id="a6"><a href="CommonsDistributionStagingMojo.java.html#L188" class="el_method">execute()</a></td><td class="bar" id="b0"><img src="../jacoco-resources/redbar.gif" width="61" height="10" title="174" alt="174"/><img src="../jacoco-resources/greenbar.gif" width="58" height="10" title="165" alt="165"/></td><td class="ctr2" id="c8">48%</td><td class="bar" id="d0"><img src="../jacoco-resources/redbar.gif" width="67" height="10" title="9" alt="9"/><img src="../jacoco-resources/greenbar.gif" width="52" height="10" title="7" alt="7"/></td><td class="ctr2" id="e3">43%</td><td class="ctr1" id="f0">7</td><td class="ctr2" id="g0">9</td><td class="ctr1" id="h0">23</td><td class="ctr2" id="i0">52</td><td class="ctr1" id="j0">0</td><td class="ctr2" id="k0">1</td></tr><tr><td id="a0"><a href="Com
monsDistributionStagingMojo.java.html#L411" class="el_method">buildReadmeAndHeaderHtmlFiles()</a></td><td class="bar" id="b1"><img src="../jacoco-resources/redbar.gif" width="14" height="10" title="42" alt="42"/><img src="../jacoco-resources/greenbar.gif" width="29" height="10" title="83" alt="83"/></td><td class="ctr2" id="c6">66%</td><td class="bar" id="d4"/><td class="ctr2" id="e4">n/a</td><td class="ctr1" id="f4">0</td><td class="ctr2" id="g4">1</td><td class="ctr1" id="h1">8</td><td class="ctr2" id="i1">26</td><td class="ctr1" id="j1">0</td><td class="ctr2" id="k1">1</td></tr><tr><td id="a2"><a href="CommonsDistributionStagingMojo.java.html#L339" class="el_method">copyDistributionsIntoScmDirectoryStructureAndAddToSvn(File, ScmProvider, ScmRepository)</a></td><td class="bar" id="b2"><img src="../jacoco-resources/redbar.gif" width="6" height="10" title="18" alt="18"/><img src="../jacoco-resources/greenbar.gif" width="42" height="10" title="121" alt="121"/></td><td class="ctr2" id
="c5">87%</td><td class="bar" id="d2"><img src="../jacoco-resources/redbar.gif" width="7" height="10" title="1" alt="1"/><img src="../jacoco-resources/greenbar.gif" width="52" height="10" title="7" alt="7"/></td><td class="ctr2" id="e0">87%</td><td class="ctr1" id="f2">1</td><td class="ctr2" id="g2">5</td><td class="ctr1" id="h3">3</td><td class="ctr2" id="i2">24</td><td class="ctr1" id="j2">0</td><td class="ctr2" id="k2">1</td></tr><tr><td id="a5"><a href="CommonsDistributionStagingMojo.java.html#L377" class="el_method">copySiteToScmDirectory()</a></td><td class="bar" id="b3"><img src="../jacoco-resources/redbar.gif" width="5" height="10" title="16" alt="16"/><img src="../jacoco-resources/greenbar.gif" width="8" height="10" title="24" alt="24"/></td><td class="ctr2" id="c7">60%</td><td class="bar" id="d3"><img src="../jacoco-resources/redbar.gif" width="7" height="10" title="1" alt="1"/><img src="../jacoco-resources/greenbar.gif" width="7" height="10" title="1" alt="1"/></td><td cl
ass="ctr2" id="e2">50%</td><td class="ctr1" id="f3">1</td><td class="ctr2" id="g3">2</td><td class="ctr1" id="h2">4</td><td class="ctr2" id="i4">9</td><td class="ctr1" id="j3">0</td><td class="ctr2" id="k3">1</td></tr><tr><td id="a3"><a href="CommonsDistributionStagingMojo.java.html#L459" class="el_method">copyHeaderAndReadmeToSubdirectories(File, File)</a></td><td class="bar" id="b4"><img src="../jacoco-resources/greenbar.gif" width="28" height="10" title="80" alt="80"/></td><td class="ctr2" id="c0">100%</td><td class="bar" id="d5"/><td class="ctr2" id="e5">n/a</td><td class="ctr1" id="f5">0</td><td class="ctr2" id="g5">1</td><td class="ctr1" id="h4">0</td><td class="ctr2" id="i3">16</td><td class="ctr1" id="j4">0</td><td class="ctr2" id="k4">1</td></tr><tr><td id="a7"><a href="CommonsDistributionStagingMojo.java.html#L274" class="el_method">listNotHiddenFilesAndDirectories(File, List)</a></td><td class="bar" id="b5"><img src="../jacoco-resources/greenbar.gif" width="15" height="10
" title="45" alt="45"/></td><td class="ctr2" id="c1">100%</td><td class="bar" id="d1"><img src="../jacoco-resources/redbar.gif" width="15" height="10" title="2" alt="2"/><img src="../jacoco-resources/greenbar.gif" width="60" height="10" title="8" alt="8"/></td><td class="ctr2" id="e1">80%</td><td class="ctr1" id="f1">2</td><td class="ctr2" id="g1">6</td><td class="ctr1" id="h5">0</td><td class="ctr2" id="i5">8</td><td class="ctr1" id="j5">0</td><td class="ctr2" id="k5">1</td></tr><tr><td id="a4"><a href="CommonsDistributionStagingMojo.java.html#L297" class="el_method">copyReleaseNotesToWorkingDirectory()</a></td><td class="bar" id="b6"><img src="../jacoco-resources/greenbar.gif" width="9" height="10" title="26" alt="26"/></td><td class="ctr2" id="c2">100%</td><td class="bar" id="d6"/><td class="ctr2" id="e6">n/a</td><td class="ctr1" id="f6">0</td><td class="ctr2" id="g6">1</td><td class="ctr1" id="h6">0</td><td class="ctr2" id="i6">5</td><td class="ctr1" id="j6">0</td><td class="ctr
2" id="k6">1</td></tr><tr><td id="a8"><a href="CommonsDistributionStagingMojo.java.html#L485" class="el_method">setBaseDir(File)</a></td><td class="bar" id="b7"><img src="../jacoco-resources/greenbar.gif" width="1" height="10" title="4" alt="4"/></td><td class="ctr2" id="c3">100%</td><td class="bar" id="d7"/><td class="ctr2" id="e7">n/a</td><td class="ctr1" id="f7">0</td><td class="ctr2" id="g7">1</td><td class="ctr1" id="h7">0</td><td class="ctr2" id="i7">2</td><td class="ctr1" id="j7">0</td><td class="ctr2" id="k7">1</td></tr><tr><td id="a1"><a href="CommonsDistributionStagingMojo.java.html#L68" class="el_method">CommonsDistributionStagingMojo()</a></td><td class="bar" id="b8"><img src="../jacoco-resources/greenbar.gif" width="1" height="10" title="3" alt="3"/></td><td class="ctr2" id="c4">100%</td><td class="bar" id="d8"/><td class="ctr2" id="e8">n/a</td><td class="ctr1" id="f8">0</td><td class="ctr2" id="g8">1</td><td class="ctr1" id="h8">0</td><td class="ctr2" id="i8">1</td><td
class="ctr1" id="j8">0</td><td class="ctr2" id="k8">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
+<?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>CommonsDistributionStagingMojo</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.mojos</a> > <span class="el_class">CommonsDistributionStagingMojo</span></div><h1>CommonsDistribution
StagingMojo</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">250 of 801</td><td class="ctr2">68%</td><td class="bar">13 of
36</td><td class="ctr2">63%</td><td class="ctr1">11</td><td class="ctr2">27</td><td class="ctr1">38</td><td class="ctr2">144</td><td class="ctr1">0</td><td class="ctr2">9</td></tr></tfoot><tbody><tr><td id="a6"><a href="CommonsDistributionStagingMojo.java.html#L188" class="el_method">execute()</a></td><td class="bar" id="b0"><img src="../jacoco-resources/redbar.gif" width="61" height="10" title="174" alt="174"/><img src="../jacoco-resources/greenbar.gif" width="58" height="10" title="165" alt="165"/></td><td class="ctr2" id="c8">48%</td><td class="bar" id="d0"><img src="../jacoco-resources/redbar.gif" width="67" height="10" title="9" alt="9"/><img src="../jacoco-resources/greenbar.gif" width="52" height="10" title="7" alt="7"/></td><td class="ctr2" id="e3">43%</td><td class="ctr1" id="f0">7</td><td class="ctr2" id="g0">9</td><td class="ctr1" id="h0">23</td><td class="ctr2" id="i0">53</td><td class="ctr1" id="j0">0</td><td class="ctr2" id="k0">1</td></tr><tr><td id="a0"><a href="Com
monsDistributionStagingMojo.java.html#L412" class="el_method">buildReadmeAndHeaderHtmlFiles()</a></td><td class="bar" id="b1"><img src="../jacoco-resources/redbar.gif" width="14" height="10" title="42" alt="42"/><img src="../jacoco-resources/greenbar.gif" width="29" height="10" title="83" alt="83"/></td><td class="ctr2" id="c6">66%</td><td class="bar" id="d4"/><td class="ctr2" id="e4">n/a</td><td class="ctr1" id="f4">0</td><td class="ctr2" id="g4">1</td><td class="ctr1" id="h1">8</td><td class="ctr2" id="i1">26</td><td class="ctr1" id="j1">0</td><td class="ctr2" id="k1">1</td></tr><tr><td id="a2"><a href="CommonsDistributionStagingMojo.java.html#L340" class="el_method">copyDistributionsIntoScmDirectoryStructureAndAddToSvn(File, ScmProvider, ScmRepository)</a></td><td class="bar" id="b2"><img src="../jacoco-resources/redbar.gif" width="6" height="10" title="18" alt="18"/><img src="../jacoco-resources/greenbar.gif" width="42" height="10" title="121" alt="121"/></td><td class="ctr2" id
="c5">87%</td><td class="bar" id="d2"><img src="../jacoco-resources/redbar.gif" width="7" height="10" title="1" alt="1"/><img src="../jacoco-resources/greenbar.gif" width="52" height="10" title="7" alt="7"/></td><td class="ctr2" id="e0">87%</td><td class="ctr1" id="f2">1</td><td class="ctr2" id="g2">5</td><td class="ctr1" id="h3">3</td><td class="ctr2" id="i2">24</td><td class="ctr1" id="j2">0</td><td class="ctr2" id="k2">1</td></tr><tr><td id="a5"><a href="CommonsDistributionStagingMojo.java.html#L378" class="el_method">copySiteToScmDirectory()</a></td><td class="bar" id="b3"><img src="../jacoco-resources/redbar.gif" width="5" height="10" title="16" alt="16"/><img src="../jacoco-resources/greenbar.gif" width="8" height="10" title="24" alt="24"/></td><td class="ctr2" id="c7">60%</td><td class="bar" id="d3"><img src="../jacoco-resources/redbar.gif" width="7" height="10" title="1" alt="1"/><img src="../jacoco-resources/greenbar.gif" width="7" height="10" title="1" alt="1"/></td><td cl
ass="ctr2" id="e2">50%</td><td class="ctr1" id="f3">1</td><td class="ctr2" id="g3">2</td><td class="ctr1" id="h2">4</td><td class="ctr2" id="i4">9</td><td class="ctr1" id="j3">0</td><td class="ctr2" id="k3">1</td></tr><tr><td id="a3"><a href="CommonsDistributionStagingMojo.java.html#L460" class="el_method">copyHeaderAndReadmeToSubdirectories(File, File)</a></td><td class="bar" id="b4"><img src="../jacoco-resources/greenbar.gif" width="28" height="10" title="80" alt="80"/></td><td class="ctr2" id="c0">100%</td><td class="bar" id="d5"/><td class="ctr2" id="e5">n/a</td><td class="ctr1" id="f5">0</td><td class="ctr2" id="g5">1</td><td class="ctr1" id="h4">0</td><td class="ctr2" id="i3">16</td><td class="ctr1" id="j4">0</td><td class="ctr2" id="k4">1</td></tr><tr><td id="a7"><a href="CommonsDistributionStagingMojo.java.html#L275" class="el_method">listNotHiddenFilesAndDirectories(File, List)</a></td><td class="bar" id="b5"><img src="../jacoco-resources/greenbar.gif" width="15" height="10
" title="45" alt="45"/></td><td class="ctr2" id="c1">100%</td><td class="bar" id="d1"><img src="../jacoco-resources/redbar.gif" width="15" height="10" title="2" alt="2"/><img src="../jacoco-resources/greenbar.gif" width="60" height="10" title="8" alt="8"/></td><td class="ctr2" id="e1">80%</td><td class="ctr1" id="f1">2</td><td class="ctr2" id="g1">6</td><td class="ctr1" id="h5">0</td><td class="ctr2" id="i5">8</td><td class="ctr1" id="j5">0</td><td class="ctr2" id="k5">1</td></tr><tr><td id="a4"><a href="CommonsDistributionStagingMojo.java.html#L298" class="el_method">copyReleaseNotesToWorkingDirectory()</a></td><td class="bar" id="b6"><img src="../jacoco-resources/greenbar.gif" width="9" height="10" title="26" alt="26"/></td><td class="ctr2" id="c2">100%</td><td class="bar" id="d6"/><td class="ctr2" id="e6">n/a</td><td class="ctr1" id="f6">0</td><td class="ctr2" id="g6">1</td><td class="ctr1" id="h6">0</td><td class="ctr2" id="i6">5</td><td class="ctr1" id="j6">0</td><td class="ctr
2" id="k6">1</td></tr><tr><td id="a8"><a href="CommonsDistributionStagingMojo.java.html#L486" class="el_method">setBaseDir(File)</a></td><td class="bar" id="b7"><img src="../jacoco-resources/greenbar.gif" width="1" height="10" title="4" alt="4"/></td><td class="ctr2" id="c3">100%</td><td class="bar" id="d7"/><td class="ctr2" id="e7">n/a</td><td class="ctr1" id="f7">0</td><td class="ctr2" id="g7">1</td><td class="ctr1" id="h7">0</td><td class="ctr2" id="i7">2</td><td class="ctr1" id="j7">0</td><td class="ctr2" id="k7">1</td></tr><tr><td id="a1"><a href="CommonsDistributionStagingMojo.java.html#L68" class="el_method">CommonsDistributionStagingMojo()</a></td><td class="bar" id="b8"><img src="../jacoco-resources/greenbar.gif" width="1" height="10" title="3" alt="3"/></td><td class="ctr2" id="c4">100%</td><td class="bar" id="d8"/><td class="ctr2" id="e8">n/a</td><td class="ctr1" id="f8">0</td><td class="ctr2" id="g8">1</td><td class="ctr1" id="h8">0</td><td class="ctr2" id="i8">1</td><td
class="ctr1" id="j8">0</td><td class="ctr2" id="k8">1</td></tr></tbody></table><div class="footer"><span class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.8.3.201901230119</span></div></body></html>
\ No newline at end of file
Modified: websites/production/commons/content/proper/commons-release-plugin/jacoco/org.apache.commons.release.plugin.mojos/CommonsDistributionStagingMojo.java.html
==============================================================================
--- websites/production/commons/content/proper/commons-release-plugin/jacoco/org.apache.commons.release.plugin.mojos/CommonsDistributionStagingMojo.java.html (original)
+++ websites/production/commons/content/proper/commons-release-plugin/jacoco/org.apache.commons.release.plugin.mojos/CommonsDistributionStagingMojo.java.html Mon Sep 2 19:25:02 2019
@@ -200,12 +200,13 @@ import java.util.List;
}
<span class="fc" id="L201"> getLog().info("Preparing to stage distributions");</span>
try {
-<span class="fc" id="L203"> ScmManager scmManager = new BasicScmManager();</span>
+<span class="fc" id="L203"> final ScmManager scmManager = new BasicScmManager();</span>
<span class="fc" id="L204"> scmManager.setScmProvider("svn", new SvnExeScmProvider());</span>
-<span class="fc" id="L205"> ScmRepository repository = scmManager.makeScmRepository(distSvnStagingUrl);</span>
-<span class="fc" id="L206"> ScmProvider provider = scmManager.getProviderByRepository(repository);</span>
-<span class="fc" id="L207"> SvnScmProviderRepository providerRepository = (SvnScmProviderRepository) repository.getProviderRepository();</span>
-<span class="fc" id="L208"> SharedFunctions.setAuthentication(</span>
+<span class="fc" id="L205"> final ScmRepository repository = scmManager.makeScmRepository(distSvnStagingUrl);</span>
+<span class="fc" id="L206"> final ScmProvider provider = scmManager.getProviderByRepository(repository);</span>
+<span class="fc" id="L207"> final SvnScmProviderRepository providerRepository = (SvnScmProviderRepository) repository</span>
+<span class="fc" id="L208"> .getProviderRepository();</span>
+<span class="fc" id="L209"> SharedFunctions.setAuthentication(</span>
providerRepository,
distServer,
settings,
@@ -213,74 +214,74 @@ import java.util.List;
username,
password
);
-<span class="fc" id="L216"> distVersionRcVersionDirectory =</span>
+<span class="fc" id="L217"> distVersionRcVersionDirectory =</span>
new File(distCheckoutDirectory, commonsReleaseVersion + "-" + commonsRcVersion);
-<span class="pc bpc" id="L218" title="1 of 2 branches missed."> if (!distCheckoutDirectory.exists()) {</span>
-<span class="fc" id="L219"> SharedFunctions.initDirectory(getLog(), distCheckoutDirectory);</span>
+<span class="pc bpc" id="L219" title="1 of 2 branches missed."> if (!distCheckoutDirectory.exists()) {</span>
+<span class="fc" id="L220"> SharedFunctions.initDirectory(getLog(), distCheckoutDirectory);</span>
}
-<span class="fc" id="L221"> ScmFileSet scmFileSet = new ScmFileSet(distCheckoutDirectory);</span>
-<span class="fc" id="L222"> getLog().info("Checking out dist from: " + distSvnStagingUrl);</span>
-<span class="fc" id="L223"> final CheckOutScmResult checkOutResult = provider.checkOut(repository, scmFileSet);</span>
-<span class="pc bpc" id="L224" title="1 of 2 branches missed."> if (!checkOutResult.isSuccess()) {</span>
-<span class="nc" id="L225"> throw new MojoExecutionException("Failed to checkout files from SCM: "</span>
-<span class="nc" id="L226"> + checkOutResult.getProviderMessage() + " [" + checkOutResult.getCommandOutput() + "]");</span>
+<span class="fc" id="L222"> final ScmFileSet scmFileSet = new ScmFileSet(distCheckoutDirectory);</span>
+<span class="fc" id="L223"> getLog().info("Checking out dist from: " + distSvnStagingUrl);</span>
+<span class="fc" id="L224"> final CheckOutScmResult checkOutResult = provider.checkOut(repository, scmFileSet);</span>
+<span class="pc bpc" id="L225" title="1 of 2 branches missed."> if (!checkOutResult.isSuccess()) {</span>
+<span class="nc" id="L226"> throw new MojoExecutionException("Failed to checkout files from SCM: "</span>
+<span class="nc" id="L227"> + checkOutResult.getProviderMessage() + " [" + checkOutResult.getCommandOutput() + "]");</span>
}
-<span class="fc" id="L228"> File copiedReleaseNotes = copyReleaseNotesToWorkingDirectory();</span>
-<span class="fc" id="L229"> copyDistributionsIntoScmDirectoryStructureAndAddToSvn(copiedReleaseNotes,</span>
+<span class="fc" id="L229"> final File copiedReleaseNotes = copyReleaseNotesToWorkingDirectory();</span>
+<span class="fc" id="L230"> copyDistributionsIntoScmDirectoryStructureAndAddToSvn(copiedReleaseNotes,</span>
provider, repository);
-<span class="fc" id="L231"> List<File> filesToAdd = new ArrayList<>();</span>
-<span class="fc" id="L232"> listNotHiddenFilesAndDirectories(distCheckoutDirectory, filesToAdd);</span>
-<span class="pc bpc" id="L233" title="1 of 2 branches missed."> if (!dryRun) {</span>
-<span class="nc" id="L234"> ScmFileSet fileSet = new ScmFileSet(distCheckoutDirectory, filesToAdd);</span>
-<span class="nc" id="L235"> AddScmResult addResult = provider.add(</span>
+<span class="fc" id="L232"> final List<File> filesToAdd = new ArrayList<>();</span>
+<span class="fc" id="L233"> listNotHiddenFilesAndDirectories(distCheckoutDirectory, filesToAdd);</span>
+<span class="pc bpc" id="L234" title="1 of 2 branches missed."> if (!dryRun) {</span>
+<span class="nc" id="L235"> final ScmFileSet fileSet = new ScmFileSet(distCheckoutDirectory, filesToAdd);</span>
+<span class="nc" id="L236"> final AddScmResult addResult = provider.add(</span>
repository,
fileSet
);
-<span class="nc bnc" id="L239" title="All 2 branches missed."> if (!addResult.isSuccess()) {</span>
-<span class="nc" id="L240"> throw new MojoExecutionException("Failed to add files to SCM: " + addResult.getProviderMessage()</span>
-<span class="nc" id="L241"> + " [" + addResult.getCommandOutput() + "]");</span>
+<span class="nc bnc" id="L240" title="All 2 branches missed."> if (!addResult.isSuccess()) {</span>
+<span class="nc" id="L241"> throw new MojoExecutionException("Failed to add files to SCM: " + addResult.getProviderMessage()</span>
+<span class="nc" id="L242"> + " [" + addResult.getCommandOutput() + "]");</span>
}
-<span class="nc" id="L243"> getLog().info("Staging release: " + project.getArtifactId() + ", version: " + project.getVersion());</span>
-<span class="nc" id="L244"> CheckInScmResult checkInResult = provider.checkIn(</span>
+<span class="nc" id="L244"> getLog().info("Staging release: " + project.getArtifactId() + ", version: " + project.getVersion());</span>
+<span class="nc" id="L245"> final CheckInScmResult checkInResult = provider.checkIn(</span>
repository,
fileSet,
-<span class="nc" id="L247"> "Staging release: " + project.getArtifactId() + ", version: " + project.getVersion()</span>
+<span class="nc" id="L248"> "Staging release: " + project.getArtifactId() + ", version: " + project.getVersion()</span>
);
-<span class="nc bnc" id="L249" title="All 2 branches missed."> if (!checkInResult.isSuccess()) {</span>
-<span class="nc" id="L250"> getLog().error("Committing dist files failed: " + checkInResult.getCommandOutput());</span>
-<span class="nc" id="L251"> throw new MojoExecutionException(</span>
-<span class="nc" id="L252"> "Committing dist files failed: " + checkInResult.getCommandOutput()</span>
+<span class="nc bnc" id="L250" title="All 2 branches missed."> if (!checkInResult.isSuccess()) {</span>
+<span class="nc" id="L251"> getLog().error("Committing dist files failed: " + checkInResult.getCommandOutput());</span>
+<span class="nc" id="L252"> throw new MojoExecutionException(</span>
+<span class="nc" id="L253"> "Committing dist files failed: " + checkInResult.getCommandOutput()</span>
);
}
-<span class="nc" id="L255"> getLog().info("Committed revision " + checkInResult.getScmRevision());</span>
-<span class="nc" id="L256"> } else {</span>
-<span class="fc" id="L257"> getLog().info("[Dry run] Would have committed to: " + distSvnStagingUrl);</span>
-<span class="fc" id="L258"> getLog().info(</span>
-<span class="fc" id="L259"> "[Dry run] Staging release: " + project.getArtifactId() + ", version: " + project.getVersion());</span>
+<span class="nc" id="L256"> getLog().info("Committed revision " + checkInResult.getScmRevision());</span>
+<span class="nc" id="L257"> } else {</span>
+<span class="fc" id="L258"> getLog().info("[Dry run] Would have committed to: " + distSvnStagingUrl);</span>
+<span class="fc" id="L259"> getLog().info(</span>
+<span class="fc" id="L260"> "[Dry run] Staging release: " + project.getArtifactId() + ", version: " + project.getVersion());</span>
}
-<span class="nc" id="L261"> } catch (ScmException e) {</span>
-<span class="nc" id="L262"> getLog().error("Could not commit files to dist: " + distSvnStagingUrl, e);</span>
-<span class="nc" id="L263"> throw new MojoExecutionException("Could not commit files to dist: " + distSvnStagingUrl, e);</span>
-<span class="fc" id="L264"> }</span>
-<span class="fc" id="L265"> }</span>
+<span class="nc" id="L262"> } catch (final ScmException e) {</span>
+<span class="nc" id="L263"> getLog().error("Could not commit files to dist: " + distSvnStagingUrl, e);</span>
+<span class="nc" id="L264"> throw new MojoExecutionException("Could not commit files to dist: " + distSvnStagingUrl, e);</span>
+<span class="fc" id="L265"> }</span>
+<span class="fc" id="L266"> }</span>
/**
* Lists all directories and files to a flat list.
* @param directory {@link File} containing directory to list
* @param files a {@link List} of {@link File} to which to append the files.
*/
- private void listNotHiddenFilesAndDirectories(File directory, List<File> files) {
+ private void listNotHiddenFilesAndDirectories(final File directory, final List<File> files) {
// Get all the files and directories from a directory.
-<span class="fc" id="L274"> File[] fList = directory.listFiles();</span>
-<span class="fc bfc" id="L275" title="All 2 branches covered."> for (File file : fList) {</span>
-<span class="pc bpc" id="L276" title="1 of 4 branches missed."> if (file.isFile() && !file.isHidden()) {</span>
-<span class="fc" id="L277"> files.add(file);</span>
-<span class="pc bpc" id="L278" title="1 of 4 branches missed."> } else if (file.isDirectory() && !file.isHidden()) {</span>
-<span class="fc" id="L279"> files.add(file);</span>
-<span class="fc" id="L280"> listNotHiddenFilesAndDirectories(file, files);</span>
+<span class="fc" id="L275"> final File[] fList = directory.listFiles();</span>
+<span class="fc bfc" id="L276" title="All 2 branches covered."> for (final File file : fList) {</span>
+<span class="pc bpc" id="L277" title="1 of 4 branches missed."> if (file.isFile() && !file.isHidden()) {</span>
+<span class="fc" id="L278"> files.add(file);</span>
+<span class="pc bpc" id="L279" title="1 of 4 branches missed."> } else if (file.isDirectory() && !file.isHidden()) {</span>
+<span class="fc" id="L280"> files.add(file);</span>
+<span class="fc" id="L281"> listNotHiddenFilesAndDirectories(file, files);</span>
}
}
-<span class="fc" id="L283"> }</span>
+<span class="fc" id="L284"> }</span>
/**
* A utility method that takes the <code>RELEASE-NOTES.txt</code> file from the base directory of the
@@ -294,11 +295,11 @@ import java.util.List;
* can properly handle the exception.
*/
private File copyReleaseNotesToWorkingDirectory() throws MojoExecutionException {
-<span class="fc" id="L297"> SharedFunctions.initDirectory(getLog(), distVersionRcVersionDirectory);</span>
-<span class="fc" id="L298"> getLog().info("Copying RELEASE-NOTES.txt to working directory.");</span>
-<span class="fc" id="L299"> File copiedReleaseNotes = new File(distVersionRcVersionDirectory, releaseNotesFile.getName());</span>
-<span class="fc" id="L300"> SharedFunctions.copyFile(getLog(), releaseNotesFile, copiedReleaseNotes);</span>
-<span class="fc" id="L301"> return copiedReleaseNotes;</span>
+<span class="fc" id="L298"> SharedFunctions.initDirectory(getLog(), distVersionRcVersionDirectory);</span>
+<span class="fc" id="L299"> getLog().info("Copying RELEASE-NOTES.txt to working directory.");</span>
+<span class="fc" id="L300"> final File copiedReleaseNotes = new File(distVersionRcVersionDirectory, releaseNotesFile.getName());</span>
+<span class="fc" id="L301"> SharedFunctions.copyFile(getLog(), releaseNotesFile, copiedReleaseNotes);</span>
+<span class="fc" id="L302"> return copiedReleaseNotes;</span>
}
/**
@@ -332,38 +333,38 @@ import java.util.List;
* {@link ScmFileSet}.
* @throws MojoExecutionException if an {@link IOException} occurs so that Maven can handle it properly.
*/
- private List<File> copyDistributionsIntoScmDirectoryStructureAndAddToSvn(File copiedReleaseNotes,
- ScmProvider provider,
- ScmRepository repository)
+ private List<File> copyDistributionsIntoScmDirectoryStructureAndAddToSvn(final File copiedReleaseNotes,
+ final ScmProvider provider,
+ final ScmRepository repository)
throws MojoExecutionException {
-<span class="fc" id="L339"> List<File> workingDirectoryFiles = Arrays.asList(workingDirectory.listFiles());</span>
-<span class="fc" id="L340"> List<File> filesForMavenScmFileSet = new ArrayList<>();</span>
-<span class="fc" id="L341"> File scmBinariesRoot = new File(distVersionRcVersionDirectory, "binaries");</span>
-<span class="fc" id="L342"> File scmSourceRoot = new File(distVersionRcVersionDirectory, "source");</span>
-<span class="fc" id="L343"> SharedFunctions.initDirectory(getLog(), scmBinariesRoot);</span>
-<span class="fc" id="L344"> SharedFunctions.initDirectory(getLog(), scmSourceRoot);</span>
+<span class="fc" id="L340"> final List<File> workingDirectoryFiles = Arrays.asList(workingDirectory.listFiles());</span>
+<span class="fc" id="L341"> final List<File> filesForMavenScmFileSet = new ArrayList<>();</span>
+<span class="fc" id="L342"> final File scmBinariesRoot = new File(distVersionRcVersionDirectory, "binaries");</span>
+<span class="fc" id="L343"> final File scmSourceRoot = new File(distVersionRcVersionDirectory, "source");</span>
+<span class="fc" id="L344"> SharedFunctions.initDirectory(getLog(), scmBinariesRoot);</span>
+<span class="fc" id="L345"> SharedFunctions.initDirectory(getLog(), scmSourceRoot);</span>
File copy;
-<span class="fc bfc" id="L346" title="All 2 branches covered."> for (File file : workingDirectoryFiles) {</span>
-<span class="fc bfc" id="L347" title="All 2 branches covered."> if (file.getName().contains("src")) {</span>
-<span class="fc" id="L348"> copy = new File(scmSourceRoot, file.getName());</span>
-<span class="fc" id="L349"> SharedFunctions.copyFile(getLog(), file, copy);</span>
-<span class="fc" id="L350"> filesForMavenScmFileSet.add(file);</span>
-<span class="fc bfc" id="L351" title="All 2 branches covered."> } else if (file.getName().contains("bin")) {</span>
-<span class="fc" id="L352"> copy = new File(scmBinariesRoot, file.getName());</span>
-<span class="fc" id="L353"> SharedFunctions.copyFile(getLog(), file, copy);</span>
-<span class="fc" id="L354"> filesForMavenScmFileSet.add(file);</span>
-<span class="pc bpc" id="L355" title="1 of 2 branches missed."> } else if (StringUtils.containsAny(file.getName(), "scm", "sha256.properties", "sha512.properties")) {</span>
-<span class="fc" id="L356"> getLog().debug("Not copying scm directory over to the scm directory because it is the scm directory.");</span>
+<span class="fc bfc" id="L347" title="All 2 branches covered."> for (final File file : workingDirectoryFiles) {</span>
+<span class="fc bfc" id="L348" title="All 2 branches covered."> if (file.getName().contains("src")) {</span>
+<span class="fc" id="L349"> copy = new File(scmSourceRoot, file.getName());</span>
+<span class="fc" id="L350"> SharedFunctions.copyFile(getLog(), file, copy);</span>
+<span class="fc" id="L351"> filesForMavenScmFileSet.add(file);</span>
+<span class="fc bfc" id="L352" title="All 2 branches covered."> } else if (file.getName().contains("bin")) {</span>
+<span class="fc" id="L353"> copy = new File(scmBinariesRoot, file.getName());</span>
+<span class="fc" id="L354"> SharedFunctions.copyFile(getLog(), file, copy);</span>
+<span class="fc" id="L355"> filesForMavenScmFileSet.add(file);</span>
+<span class="pc bpc" id="L356" title="1 of 2 branches missed."> } else if (StringUtils.containsAny(file.getName(), "scm", "sha256.properties", "sha512.properties")) {</span>
+<span class="fc" id="L357"> getLog().debug("Not copying scm directory over to the scm directory because it is the scm directory.");</span>
//do nothing because we are copying into scm
} else {
-<span class="nc" id="L359"> copy = new File(distCheckoutDirectory.getAbsolutePath(), file.getName());</span>
-<span class="nc" id="L360"> SharedFunctions.copyFile(getLog(), file, copy);</span>
-<span class="nc" id="L361"> filesForMavenScmFileSet.add(file);</span>
+<span class="nc" id="L360"> copy = new File(distCheckoutDirectory.getAbsolutePath(), file.getName());</span>
+<span class="nc" id="L361"> SharedFunctions.copyFile(getLog(), file, copy);</span>
+<span class="nc" id="L362"> filesForMavenScmFileSet.add(file);</span>
}
-<span class="fc" id="L363"> }</span>
-<span class="fc" id="L364"> filesForMavenScmFileSet.addAll(buildReadmeAndHeaderHtmlFiles());</span>
-<span class="fc" id="L365"> filesForMavenScmFileSet.addAll(copySiteToScmDirectory());</span>
-<span class="fc" id="L366"> return filesForMavenScmFileSet;</span>
+<span class="fc" id="L364"> }</span>
+<span class="fc" id="L365"> filesForMavenScmFileSet.addAll(buildReadmeAndHeaderHtmlFiles());</span>
+<span class="fc" id="L366"> filesForMavenScmFileSet.addAll(copySiteToScmDirectory());</span>
+<span class="fc" id="L367"> return filesForMavenScmFileSet;</span>
}
/**
@@ -374,19 +375,19 @@ import java.util.List;
* @throws MojoExecutionException if the site copying fails for some reason.
*/
private List<File> copySiteToScmDirectory() throws MojoExecutionException {
-<span class="pc bpc" id="L377" title="1 of 2 branches missed."> if (!siteDirectory.exists()) {</span>
-<span class="nc" id="L378"> getLog().error("\"mvn site\" was not run before this goal, or a siteDirectory did not exist.");</span>
-<span class="nc" id="L379"> throw new MojoExecutionException(</span>
+<span class="pc bpc" id="L378" title="1 of 2 branches missed."> if (!siteDirectory.exists()) {</span>
+<span class="nc" id="L379"> getLog().error("\"mvn site\" was not run before this goal, or a siteDirectory did not exist.");</span>
+<span class="nc" id="L380"> throw new MojoExecutionException(</span>
"\"mvn site\" was not run before this goal, or a siteDirectory did not exist."
);
}
-<span class="fc" id="L383"> File siteInScm = new File(distVersionRcVersionDirectory, "site");</span>
+<span class="fc" id="L384"> final File siteInScm = new File(distVersionRcVersionDirectory, "site");</span>
try {
-<span class="fc" id="L385"> FileUtils.copyDirectory(siteDirectory, siteInScm);</span>
-<span class="nc" id="L386"> } catch (IOException e) {</span>
-<span class="nc" id="L387"> throw new MojoExecutionException("Site copying failed", e);</span>
-<span class="fc" id="L388"> }</span>
-<span class="fc" id="L389"> return new ArrayList<>(FileUtils.listFiles(siteInScm, null, true));</span>
+<span class="fc" id="L386"> FileUtils.copyDirectory(siteDirectory, siteInScm);</span>
+<span class="nc" id="L387"> } catch (final IOException e) {</span>
+<span class="nc" id="L388"> throw new MojoExecutionException("Site copying failed", e);</span>
+<span class="fc" id="L389"> }</span>
+<span class="fc" id="L390"> return new ArrayList<>(FileUtils.listFiles(siteInScm, null, true));</span>
}
/**
@@ -408,40 +409,40 @@ import java.util.List;
* files fails.
*/
private List<File> buildReadmeAndHeaderHtmlFiles() throws MojoExecutionException {
-<span class="fc" id="L411"> List<File> headerAndReadmeFiles = new ArrayList<>();</span>
-<span class="fc" id="L412"> File headerFile = new File(distVersionRcVersionDirectory, HEADER_FILE_NAME);</span>
+<span class="fc" id="L412"> final List<File> headerAndReadmeFiles = new ArrayList<>();</span>
+<span class="fc" id="L413"> final File headerFile = new File(distVersionRcVersionDirectory, HEADER_FILE_NAME);</span>
//
// HEADER file
//
-<span class="fc" id="L416"> try (Writer headerWriter = new OutputStreamWriter(new FileOutputStream(headerFile), "UTF-8")) {</span>
-<span class="fc" id="L417"> HeaderHtmlVelocityDelegate.builder().build().render(headerWriter);</span>
-<span class="nc" id="L418"> } catch (IOException e) {</span>
-<span class="nc" id="L419"> final String message = "Could not build HEADER html file " + headerFile;</span>
-<span class="nc" id="L420"> getLog().error(message, e);</span>
-<span class="nc" id="L421"> throw new MojoExecutionException(message, e);</span>
-<span class="fc" id="L422"> }</span>
-<span class="fc" id="L423"> headerAndReadmeFiles.add(headerFile);</span>
+<span class="fc" id="L417"> try (Writer headerWriter = new OutputStreamWriter(new FileOutputStream(headerFile), "UTF-8")) {</span>
+<span class="fc" id="L418"> HeaderHtmlVelocityDelegate.builder().build().render(headerWriter);</span>
+<span class="nc" id="L419"> } catch (final IOException e) {</span>
+<span class="nc" id="L420"> final String message = "Could not build HEADER html file " + headerFile;</span>
+<span class="nc" id="L421"> getLog().error(message, e);</span>
+<span class="nc" id="L422"> throw new MojoExecutionException(message, e);</span>
+<span class="fc" id="L423"> }</span>
+<span class="fc" id="L424"> headerAndReadmeFiles.add(headerFile);</span>
//
// README file
//
-<span class="fc" id="L427"> File readmeFile = new File(distVersionRcVersionDirectory, README_FILE_NAME);</span>
-<span class="fc" id="L428"> try (Writer readmeWriter = new OutputStreamWriter(new FileOutputStream(readmeFile), "UTF-8")) {</span>
+<span class="fc" id="L428"> final File readmeFile = new File(distVersionRcVersionDirectory, README_FILE_NAME);</span>
+<span class="fc" id="L429"> try (Writer readmeWriter = new OutputStreamWriter(new FileOutputStream(readmeFile), "UTF-8")) {</span>
// @formatter:off
-<span class="fc" id="L430"> ReadmeHtmlVelocityDelegate readmeHtmlVelocityDelegate = ReadmeHtmlVelocityDelegate.builder()</span>
-<span class="fc" id="L431"> .withArtifactId(project.getArtifactId())</span>
-<span class="fc" id="L432"> .withVersion(project.getVersion())</span>
-<span class="fc" id="L433"> .withSiteUrl(project.getUrl())</span>
-<span class="fc" id="L434"> .build();</span>
+<span class="fc" id="L431"> final ReadmeHtmlVelocityDelegate readmeHtmlVelocityDelegate = ReadmeHtmlVelocityDelegate.builder()</span>
+<span class="fc" id="L432"> .withArtifactId(project.getArtifactId())</span>
+<span class="fc" id="L433"> .withVersion(project.getVersion())</span>
+<span class="fc" id="L434"> .withSiteUrl(project.getUrl())</span>
+<span class="fc" id="L435"> .build();</span>
// @formatter:on
-<span class="fc" id="L436"> readmeHtmlVelocityDelegate.render(readmeWriter);</span>
-<span class="nc" id="L437"> } catch (IOException e) {</span>
-<span class="nc" id="L438"> final String message = "Could not build README html file " + readmeFile;</span>
-<span class="nc" id="L439"> getLog().error(message, e);</span>
-<span class="nc" id="L440"> throw new MojoExecutionException(message, e);</span>
-<span class="fc" id="L441"> }</span>
-<span class="fc" id="L442"> headerAndReadmeFiles.add(readmeFile);</span>
-<span class="fc" id="L443"> headerAndReadmeFiles.addAll(copyHeaderAndReadmeToSubdirectories(headerFile, readmeFile));</span>
-<span class="fc" id="L444"> return headerAndReadmeFiles;</span>
+<span class="fc" id="L437"> readmeHtmlVelocityDelegate.render(readmeWriter);</span>
+<span class="nc" id="L438"> } catch (final IOException e) {</span>
+<span class="nc" id="L439"> final String message = "Could not build README html file " + readmeFile;</span>
+<span class="nc" id="L440"> getLog().error(message, e);</span>
+<span class="nc" id="L441"> throw new MojoExecutionException(message, e);</span>
+<span class="fc" id="L442"> }</span>
+<span class="fc" id="L443"> headerAndReadmeFiles.add(readmeFile);</span>
+<span class="fc" id="L444"> headerAndReadmeFiles.addAll(copyHeaderAndReadmeToSubdirectories(headerFile, readmeFile));</span>
+<span class="fc" id="L445"> return headerAndReadmeFiles;</span>
}
/**
@@ -454,24 +455,24 @@ import java.util.List;
* @throws MojoExecutionException if the {@link SharedFunctions#copyFile(Log, File, File)}
* fails.
*/
- private List<File> copyHeaderAndReadmeToSubdirectories(File headerFile, File readmeFile)
+ private List<File> copyHeaderAndReadmeToSubdirectories(final File headerFile, final File readmeFile)
throws MojoExecutionException {
-<span class="fc" id="L459"> List<File> symbolicLinkFiles = new ArrayList<>();</span>
-<span class="fc" id="L460"> File sourceRoot = new File(distVersionRcVersionDirectory, "source");</span>
-<span class="fc" id="L461"> File binariesRoot = new File(distVersionRcVersionDirectory, "binaries");</span>
-<span class="fc" id="L462"> File sourceHeaderFile = new File(sourceRoot, HEADER_FILE_NAME);</span>
-<span class="fc" id="L463"> File sourceReadmeFile = new File(sourceRoot, README_FILE_NAME);</span>
-<span class="fc" id="L464"> File binariesHeaderFile = new File(binariesRoot, HEADER_FILE_NAME);</span>
-<span class="fc" id="L465"> File binariesReadmeFile = new File(binariesRoot, README_FILE_NAME);</span>
-<span class="fc" id="L466"> SharedFunctions.copyFile(getLog(), headerFile, sourceHeaderFile);</span>
-<span class="fc" id="L467"> symbolicLinkFiles.add(sourceHeaderFile);</span>
-<span class="fc" id="L468"> SharedFunctions.copyFile(getLog(), readmeFile, sourceReadmeFile);</span>
-<span class="fc" id="L469"> symbolicLinkFiles.add(sourceReadmeFile);</span>
-<span class="fc" id="L470"> SharedFunctions.copyFile(getLog(), headerFile, binariesHeaderFile);</span>
-<span class="fc" id="L471"> symbolicLinkFiles.add(binariesHeaderFile);</span>
-<span class="fc" id="L472"> SharedFunctions.copyFile(getLog(), readmeFile, binariesReadmeFile);</span>
-<span class="fc" id="L473"> symbolicLinkFiles.add(binariesReadmeFile);</span>
-<span class="fc" id="L474"> return symbolicLinkFiles;</span>
+<span class="fc" id="L460"> final List<File> symbolicLinkFiles = new ArrayList<>();</span>
+<span class="fc" id="L461"> final File sourceRoot = new File(distVersionRcVersionDirectory, "source");</span>
+<span class="fc" id="L462"> final File binariesRoot = new File(distVersionRcVersionDirectory, "binaries");</span>
+<span class="fc" id="L463"> final File sourceHeaderFile = new File(sourceRoot, HEADER_FILE_NAME);</span>
+<span class="fc" id="L464"> final File sourceReadmeFile = new File(sourceRoot, README_FILE_NAME);</span>
+<span class="fc" id="L465"> final File binariesHeaderFile = new File(binariesRoot, HEADER_FILE_NAME);</span>
+<span class="fc" id="L466"> final File binariesReadmeFile = new File(binariesRoot, README_FILE_NAME);</span>
+<span class="fc" id="L467"> SharedFunctions.copyFile(getLog(), headerFile, sourceHeaderFile);</span>
+<span class="fc" id="L468"> symbolicLinkFiles.add(sourceHeaderFile);</span>
+<span class="fc" id="L469"> SharedFunctions.copyFile(getLog(), readmeFile, sourceReadmeFile);</span>
+<span class="fc" id="L470"> symbolicLinkFiles.add(sourceReadmeFile);</span>
+<span class="fc" id="L471"> SharedFunctions.copyFile(getLog(), headerFile, binariesHeaderFile);</span>
+<span class="fc" id="L472"> symbolicLinkFiles.add(binariesHeaderFile);</span>
+<span class="fc" id="L473"> SharedFunctions.copyFile(getLog(), readmeFile, binariesReadmeFile);</span>
+<span class="fc" id="L474"> symbolicLinkFiles.add(binariesReadmeFile);</span>
+<span class="fc" id="L475"> return symbolicLinkFiles;</span>
}
/**
@@ -481,8 +482,8 @@ import java.util.List;
* @param baseDir is the {@link File} to be used as the project's root directory when this mojo
* is invoked.
*/
- protected void setBaseDir(File baseDir) {
-<span class="fc" id="L485"> this.baseDir = baseDir;</span>
-<span class="fc" id="L486"> }</span>
+ protected void setBaseDir(final File baseDir) {
+<span class="fc" id="L486"> this.baseDir = baseDir;</span>
+<span class="fc" id="L487"> }</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
+</pre><div class="footer"><span class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.8.3.201901230119</span></div></body></html>
\ No newline at end of file