Modified: websites/production/commons/content/proper/commons-release-plugin/jacoco/org.apache.commons.release.plugin.mojos/CommonsSiteCompressionMojo.html ============================================================================== --- websites/production/commons/content/proper/commons-release-plugin/jacoco/org.apache.commons.release.plugin.mojos/CommonsSiteCompressionMojo.html (original) +++ websites/production/commons/content/proper/commons-release-plugin/jacoco/org.apache.commons.release.plugin.mojos/CommonsSiteCompressionMojo.html Tue Jun 19 03:50:24 2018 @@ -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>CommonsSiteCompressionMojo</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">CommonsSiteCompressionMojo</span></div><h1>CommonsSiteCompressionMojo< /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">42 of 210</td><td class="ctr2">80%</td><td class="bar">4 of 18</td><td cl ass="ctr2">77%</td><td class="ctr1">4</td><td class="ctr2">14</td><td class="ctr1">9</td><td class="ctr2">48</td><td class="ctr1">0</td><td class="ctr2">5</td></tr></tfoot><tbody><tr><td id="a2"><a href="CommonsSiteCompressionMojo.java.html#L97" class="el_method">execute()</a></td><td class="bar" id="b0"><img src="../jacoco-resources/redbar.gif" width="51" height="10" title="38" alt="38"/><img src="../jacoco-resources/greenbar.gif" width="68" height="10" title="51" alt="51"/></td><td class="ctr2" id="c4">57%</td><td class="bar" id="d0"><img src="../jacoco-resources/redbar.gif" width="30" height="10" title="2" alt="2"/><img src="../jacoco-resources/greenbar.gif" width="90" height="10" title="6" alt="6"/></td><td class="ctr2" id="e1">75%</td><td class="ctr1" id="f0">2</td><td class="ctr2" id="g0">5</td><td class="ctr1" id="h0">8</td><td class="ctr2" id="i0">21</td><td class="ctr1" id="j0">0</td><td class="ctr2" id="k0">1</td></tr><tr><td id="a3"><a href="CommonsSiteCompressionMojo.jav a.html#L137" class="el_method">getAllSiteFiles(File, List)</a></td><td class="bar" id="b1"><img src="../jacoco-resources/redbar.gif" width="5" height="10" title="4" alt="4"/><img src="../jacoco-resources/greenbar.gif" width="36" height="10" title="27" alt="27"/></td><td class="ctr2" id="c3">87%</td><td class="bar" id="d1"><img src="../jacoco-resources/redbar.gif" width="15" height="10" title="1" alt="1"/><img src="../jacoco-resources/greenbar.gif" width="45" height="10" title="3" alt="3"/></td><td class="ctr2" id="e2">75%</td><td class="ctr1" id="f1">1</td><td class="ctr2" id="g1">3</td><td class="ctr1" id="h1">1</td><td class="ctr2" id="i3">6</td><td class="ctr1" id="j1">0</td><td class="ctr2" id="k1">1</td></tr><tr><td id="a0"><a href="CommonsSiteCompressionMojo.java.html#L180" class="el_method">addToZip(File, File, ZipOutputStream)</a></td><td class="bar" id="b2"><img src="../jacoco-resources/greenbar.gif" width="60" height="10" title="45" alt="45"/></td><td class="ctr2" id="c0"> 100%</td><td class="bar" id="d3"><img src="../jacoco-resources/greenbar.gif" width="30" height="10" title="2" alt="2"/></td><td class="ctr2" id="e0">100%</td><td class="ctr1" id="f3">0</td><td class="ctr2" id="g3">2</td><td class="ctr1" id="h2">0</td><td class="ctr2" id="i1">11</td><td class="ctr1" id="j2">0</td><td class="ctr2" id="k2">1</td></tr><tr><td id="a4"><a href="CommonsSiteCompressionMojo.java.html#L158" class="el_method">writeZipFile(File, File, List)</a></td><td class="bar" id="b3"><img src="../jacoco-resources/greenbar.gif" width="56" height="10" title="42" alt="42"/></td><td class="ctr2" id="c1">100%</td><td class="bar" id="d2"><img src="../jacoco-resources/redbar.gif" width="15" height="10" title="1" alt="1"/><img src="../jacoco-resources/greenbar.gif" width="45" height="10" title="3" alt="3"/></td><td class="ctr2" id="e3">75%</td><td class="ctr1" id="f2">1</td><td class="ctr2" id="g2">3</td><td class="ctr1" id="h3">0</td><td class="ctr2" id="i2">9</td><td class="ctr1 " id="j3">0</td><td class="ctr2" id="k3">1</td></tr><tr><td id="a1"><a href="CommonsSiteCompressionMojo.java.html#L50" class="el_method">CommonsSiteCompressionMojo()</a></td><td class="bar" id="b4"><img src="../jacoco-resources/greenbar.gif" width="4" height="10" title="3" alt="3"/></td><td class="ctr2" id="c2">100%</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="h4">0</td><td class="ctr2" id="i4">1</td><td class="ctr1" id="j4">0</td><td class="ctr2" id="k4">1</td></tr></tbody></table><div class="footer"><span class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.8.0.201801022044</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>CommonsSiteCompressionMojo</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">CommonsSiteCompressionMojo</span></div><h1>CommonsSiteCompressionMojo< /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">42 of 197</td><td class="ctr2">78%</td><td class="bar">4 of 16</td><td cl ass="ctr2">75%</td><td class="ctr1">4</td><td class="ctr2">13</td><td class="ctr1">9</td><td class="ctr2">42</td><td class="ctr1">0</td><td class="ctr2">5</td></tr></tfoot><tbody><tr><td id="a2"><a href="CommonsSiteCompressionMojo.java.html#L100" class="el_method">execute()</a></td><td class="bar" id="b0"><img src="../jacoco-resources/redbar.gif" width="51" height="10" title="38" alt="38"/><img src="../jacoco-resources/greenbar.gif" width="68" height="10" title="51" alt="51"/></td><td class="ctr2" id="c4">57%</td><td class="bar" id="d0"><img src="../jacoco-resources/redbar.gif" width="30" height="10" title="2" alt="2"/><img src="../jacoco-resources/greenbar.gif" width="90" height="10" title="6" alt="6"/></td><td class="ctr2" id="e0">75%</td><td class="ctr1" id="f0">2</td><td class="ctr2" id="g0">5</td><td class="ctr1" id="h0">8</td><td class="ctr2" id="i0">21</td><td class="ctr1" id="j0">0</td><td class="ctr2" id="k0">1</td></tr><tr><td id="a3"><a href="CommonsSiteCompressionMojo.ja va.html#L140" class="el_method">getAllSiteFiles(File, List)</a></td><td class="bar" id="b1"><img src="../jacoco-resources/redbar.gif" width="5" height="10" title="4" alt="4"/><img src="../jacoco-resources/greenbar.gif" width="36" height="10" title="27" alt="27"/></td><td class="ctr2" id="c3">87%</td><td class="bar" id="d1"><img src="../jacoco-resources/redbar.gif" width="15" height="10" title="1" alt="1"/><img src="../jacoco-resources/greenbar.gif" width="45" height="10" title="3" alt="3"/></td><td class="ctr2" id="e1">75%</td><td class="ctr1" id="f1">1</td><td class="ctr2" id="g1">3</td><td class="ctr1" id="h1">1</td><td class="ctr2" id="i3">6</td><td class="ctr1" id="j1">0</td><td class="ctr2" id="k1">1</td></tr><tr><td id="a4"><a href="CommonsSiteCompressionMojo.java.html#L161" class="el_method">writeZipFile(File, File, List)</a></td><td class="bar" id="b2"><img src="../jacoco-resources/greenbar.gif" width="56" height="10" title="42" alt="42"/></td><td class="ctr2" id="c0">100%</ td><td class="bar" id="d2"><img src="../jacoco-resources/redbar.gif" width="15" height="10" title="1" alt="1"/><img src="../jacoco-resources/greenbar.gif" width="45" height="10" title="3" alt="3"/></td><td class="ctr2" id="e2">75%</td><td class="ctr1" id="f2">1</td><td class="ctr2" id="g2">3</td><td class="ctr1" id="h2">0</td><td class="ctr2" id="i1">7</td><td class="ctr1" id="j2">0</td><td class="ctr2" id="k2">1</td></tr><tr><td id="a0"><a href="CommonsSiteCompressionMojo.java.html#L182" class="el_method">addToZip(File, File, ZipOutputStream)</a></td><td class="bar" id="b3"><img src="../jacoco-resources/greenbar.gif" width="43" height="10" title="32" alt="32"/></td><td class="ctr2" id="c1">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">7</td><td class="ctr1" id="j3">0</td><td class="ctr2" id="k3">1</td></tr><tr><td id="a1"><a href="CommonsSiteCom pressionMojo.java.html#L53" class="el_method">CommonsSiteCompressionMojo()</a></td><td class="bar" id="b4"><img src="../jacoco-resources/greenbar.gif" width="4" height="10" title="3" alt="3"/></td><td class="ctr2" id="c2">100%</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="h4">0</td><td class="ctr2" id="i4">1</td><td class="ctr1" id="j4">0</td><td class="ctr2" id="k4">1</td></tr></tbody></table><div class="footer"><span class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.8.0.201801022044</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/CommonsSiteCompressionMojo.java.html ============================================================================== --- websites/production/commons/content/proper/commons-release-plugin/jacoco/org.apache.commons.release.plugin.mojos/CommonsSiteCompressionMojo.java.html (original) +++ websites/production/commons/content/proper/commons-release-plugin/jacoco/org.apache.commons.release.plugin.mojos/CommonsSiteCompressionMojo.java.html Tue Jun 19 03:50:24 2018 @@ -1,4 +1,4 @@ -<?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>CommonsSiteCompressionMojo.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.m ojos</a> > <span class="el_source">CommonsSiteCompressionMojo.java</span></div><h1>CommonsSiteCompressionMojo.java</h1><pre class="source lang-java linenums">/* +<?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>CommonsSiteCompressionMojo.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.m ojos</a> > <span class="el_source">CommonsSiteCompressionMojo.java</span></div><h1>CommonsSiteCompressionMojo.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. @@ -16,10 +16,19 @@ */ package org.apache.commons.release.plugin.mojos; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import java.util.zip.ZipEntry; +import java.util.zip.ZipOutputStream; + import org.apache.commons.compress.archivers.zip.ParallelScatterZipCreator; import org.apache.commons.compress.archivers.zip.ScatterZipOutputStream; +import org.apache.commons.io.IOUtils; import org.apache.commons.lang3.StringUtils; -import org.apache.commons.release.plugin.SharedFunctions; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoFailureException; @@ -27,27 +36,21 @@ import org.apache.maven.plugins.annotati import org.apache.maven.plugins.annotations.Mojo; import org.apache.maven.plugins.annotations.Parameter; -import java.io.File; -import java.io.FileInputStream; -import java.io.FileOutputStream; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; -import java.util.zip.ZipEntry; -import java.util.zip.ZipOutputStream; - /** * Takes the built <code>./target/site</code> directory and compresses it to * <code>./target/commons-release-plugin/site.zip</code>. * * @author chtompki * @since 1.0 + * @deprecated - as we no longer wish to compress the site, we are going to put this functionality in the + * {@link CommonsDistributionStagingMojo}. */ +@Deprecated @Mojo(name = "compress-site", defaultPhase = LifecyclePhase.POST_SITE, threadSafe = true, aggregator = true) -<span class="fc" id="L50">public class CommonsSiteCompressionMojo extends AbstractMojo {</span> +<span class="fc" id="L53">public class CommonsSiteCompressionMojo extends AbstractMojo {</span> /** * The working directory for the plugin which, assuming the maven uses the default @@ -94,37 +97,37 @@ import java.util.zip.ZipOutputStream; @Override public void execute() throws MojoExecutionException, MojoFailureException { -<span class="pc bpc" id="L97" title="1 of 2 branches missed."> if (!isDistModule) {</span> -<span class="nc" id="L98"> getLog().info("This module is marked as a non distribution "</span> +<span class="pc bpc" id="L100" title="1 of 2 branches missed."> if (!isDistModule) {</span> +<span class="nc" id="L101"> getLog().info("This module is marked as a non distribution "</span> + "or assembly module, and the plugin will not run."); -<span class="nc" id="L100"> return;</span> +<span class="nc" id="L103"> return;</span> } -<span class="pc bpc" id="L102" title="1 of 2 branches missed."> if (StringUtils.isEmpty(distSvnStagingUrl)) {</span> -<span class="nc" id="L103"> getLog().warn("commons.distSvnStagingUrl is not set, the commons-release-plugin will not run.");</span> -<span class="nc" id="L104"> return;</span> - } -<span class="fc bfc" id="L106" title="All 2 branches covered."> if (!siteDirectory.exists()) {</span> -<span class="fc" id="L107"> getLog().error("\"mvn site\" was not run before this goal, or a siteDirectory did not exist.");</span> -<span class="fc" id="L108"> throw new MojoFailureException(</span> +<span class="pc bpc" id="L105" title="1 of 2 branches missed."> if (StringUtils.isEmpty(distSvnStagingUrl)) {</span> +<span class="nc" id="L106"> getLog().warn("commons.distSvnStagingUrl is not set, the commons-release-plugin will not run.");</span> +<span class="nc" id="L107"> return;</span> + } +<span class="fc bfc" id="L109" title="All 2 branches covered."> if (!siteDirectory.exists()) {</span> +<span class="fc" id="L110"> getLog().error("\"mvn site\" was not run before this goal, or a siteDirectory did not exist.");</span> +<span class="fc" id="L111"> throw new MojoFailureException(</span> "\"mvn site\" was not run before this goal, or a siteDirectory did not exist." ); } -<span class="fc bfc" id="L112" title="All 2 branches covered."> if (!workingDirectory.exists()) {</span> -<span class="fc" id="L113"> getLog().info("Current project contains no distributions. Not executing.");</span> -<span class="fc" id="L114"> return;</span> +<span class="fc bfc" id="L115" title="All 2 branches covered."> if (!workingDirectory.exists()) {</span> +<span class="fc" id="L116"> getLog().info("Current project contains no distributions. Not executing.");</span> +<span class="fc" id="L117"> return;</span> } try { -<span class="fc" id="L117"> filesToCompress = new ArrayList<>();</span> -<span class="fc" id="L118"> getAllSiteFiles(siteDirectory, filesToCompress);</span> -<span class="fc" id="L119"> writeZipFile(workingDirectory, siteDirectory, filesToCompress);</span> -<span class="nc" id="L120"> } catch (IOException e) {</span> -<span class="nc" id="L121"> getLog().error("Failed to create ./target/commons-release-plugin/site.zip: " + e.getMessage(), e);</span> -<span class="nc" id="L122"> throw new MojoExecutionException(</span> -<span class="nc" id="L123"> "Failed to create ./target/commons-release-plugin/site.zip: " + e.getMessage(),</span> +<span class="fc" id="L120"> filesToCompress = new ArrayList<>();</span> +<span class="fc" id="L121"> getAllSiteFiles(siteDirectory, filesToCompress);</span> +<span class="fc" id="L122"> writeZipFile(workingDirectory, siteDirectory, filesToCompress);</span> +<span class="nc" id="L123"> } catch (IOException e) {</span> +<span class="nc" id="L124"> getLog().error("Failed to create ./target/commons-release-plugin/site.zip: " + e.getMessage(), e);</span> +<span class="nc" id="L125"> throw new MojoExecutionException(</span> +<span class="nc" id="L126"> "Failed to create ./target/commons-release-plugin/site.zip: " + e.getMessage(),</span> e ); -<span class="fc" id="L126"> }</span> -<span class="fc" id="L127"> }</span> +<span class="fc" id="L129"> }</span> +<span class="fc" id="L130"> }</span> /** * By default this method iterates across the <code>target/site</code> directory and adds all of the files @@ -134,37 +137,36 @@ import java.util.zip.ZipOutputStream; * @param filesToCompress the {@link List} to which to add all the files. */ private void getAllSiteFiles(File siteDirectory, List<File> filesToCompress) { -<span class="fc" id="L137"> File[] files = siteDirectory.listFiles();</span> -<span class="fc bfc" id="L138" title="All 2 branches covered."> for (File file : files) {</span> -<span class="fc" id="L139"> filesToCompress.add(file);</span> -<span class="pc bpc" id="L140" title="1 of 2 branches missed."> if (file.isDirectory()) {</span> -<span class="nc" id="L141"> getAllSiteFiles(file, filesToCompress);</span> +<span class="fc" id="L140"> File[] files = siteDirectory.listFiles();</span> +<span class="fc bfc" id="L141" title="All 2 branches covered."> for (File file : files) {</span> +<span class="fc" id="L142"> filesToCompress.add(file);</span> +<span class="pc bpc" id="L143" title="1 of 2 branches missed."> if (file.isDirectory()) {</span> +<span class="nc" id="L144"> getAllSiteFiles(file, filesToCompress);</span> } } -<span class="fc" id="L144"> }</span> +<span class="fc" id="L147"> }</span> /** * A helper method for writing all of the files in our <code>fileList</code> to a <code>site.zip</code> file * in the <code>workingDirectory</code>. * - * @param workingDirectory is a {@link File} representing the place to put the site.zip file. + * @param outputDirectory is a {@link File} representing the place to put the site.zip file. * @param directoryToZip is a {@link File} representing the directory of the site (normally * <code>target/site</code>). * @param fileList the list of files to be zipped up, generally generated by * {@link CommonsSiteCompressionMojo#getAllSiteFiles(File, List)}. * @throws IOException when the copying of the files goes incorrectly. */ - private void writeZipFile(File workingDirectory, File directoryToZip, List<File> fileList) throws IOException { -<span class="fc" id="L158"> FileOutputStream fos = new FileOutputStream(workingDirectory.getAbsolutePath() + "/site.zip");</span> -<span class="fc" id="L159"> ZipOutputStream zos = new ZipOutputStream(fos);</span> -<span class="fc bfc" id="L160" title="All 2 branches covered."> for (File file : fileList) {</span> -<span class="pc bpc" id="L161" title="1 of 2 branches missed."> if (!file.isDirectory()) { // we only zip files, not directories</span> -<span class="fc" id="L162"> addToZip(directoryToZip, file, zos);</span> - } -<span class="fc" id="L164"> }</span> -<span class="fc" id="L165"> zos.close();</span> -<span class="fc" id="L166"> fos.close();</span> -<span class="fc" id="L167"> }</span> + private void writeZipFile(File outputDirectory, File directoryToZip, List<File> fileList) throws IOException { +<span class="fc" id="L161"> try (FileOutputStream fos = new FileOutputStream(outputDirectory.getAbsolutePath() + "/site.zip");</span> +<span class="fc" id="L162"> ZipOutputStream zos = new ZipOutputStream(fos)) {</span> +<span class="fc bfc" id="L163" title="All 2 branches covered."> for (File file : fileList) {</span> +<span class="pc bpc" id="L164" title="1 of 2 branches missed."> if (!file.isDirectory()) { // we only zip files, not directories</span> +<span class="fc" id="L165"> addToZip(directoryToZip, file, zos);</span> + } +<span class="fc" id="L167"> }</span> + } +<span class="fc" id="L169"> }</span> /** * Given the <code>directoryToZip</code> we add the <code>file</code> to the zip archive represented by @@ -177,20 +179,15 @@ import java.util.zip.ZipOutputStream; * @throws IOException if adding the <code>file</code> doesn't work out properly. */ private void addToZip(File directoryToZip, File file, ZipOutputStream zos) throws IOException { -<span class="fc" id="L180"> FileInputStream fis = new FileInputStream(file);</span> - // we want the zipEntry's path to be a relative path that is relative - // to the directory being zipped, so chop off the rest of the path -<span class="fc" id="L183"> String zipFilePath = file.getCanonicalPath().substring(directoryToZip.getCanonicalPath().length() + 1,</span> -<span class="fc" id="L184"> file.getCanonicalPath().length());</span> -<span class="fc" id="L185"> ZipEntry zipEntry = new ZipEntry(zipFilePath);</span> -<span class="fc" id="L186"> zos.putNextEntry(zipEntry);</span> -<span class="fc" id="L187"> byte[] bytes = new byte[SharedFunctions.BUFFER_BYTE_SIZE];</span> - int length; -<span class="fc bfc" id="L189" title="All 2 branches covered."> while ((length = fis.read(bytes)) >= 0) {</span> -<span class="fc" id="L190"> zos.write(bytes, 0, length);</span> - } -<span class="fc" id="L192"> zos.closeEntry();</span> -<span class="fc" id="L193"> fis.close();</span> -<span class="fc" id="L194"> }</span> +<span class="fc" id="L182"> try (FileInputStream fis = new FileInputStream(file)) {</span> + // we want the zipEntry's path to be a relative path that is relative + // to the directory being zipped, so chop off the rest of the path +<span class="fc" id="L185"> String zipFilePath = file.getCanonicalPath().substring(directoryToZip.getCanonicalPath().length() + 1,</span> +<span class="fc" id="L186"> file.getCanonicalPath().length());</span> +<span class="fc" id="L187"> ZipEntry zipEntry = new ZipEntry(zipFilePath);</span> +<span class="fc" id="L188"> zos.putNextEntry(zipEntry);</span> +<span class="fc" id="L189"> IOUtils.copy(fis, zos);</span> + } +<span class="fc" id="L191"> }</span> } </pre><div class="footer"><span class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.8.0.201801022044</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/index.html ============================================================================== --- websites/production/commons/content/proper/commons-release-plugin/jacoco/org.apache.commons.release.plugin.mojos/index.html (original) +++ websites/production/commons/content/proper/commons-release-plugin/jacoco/org.apache.commons.release.plugin.mojos/index.html Tue Jun 19 03:50:24 2018 @@ -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>org.apache.commons.release.plugin.mojos</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.mojos</span></div><h1>org.apach e.commons.release.plugin.mojos</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">282 of 1,048</td><td class="ctr2">73%</td><td class="bar">17 of 60</td><td class="ctr2">71%</td><td class="ctr1">15</td><td class="ctr2">49</td><td class="ctr1">43</td><td class="ctr2">204</td><td class="ctr1">0</td><td class="ctr2">19</td><td class="ctr1">0</td><td class="ctr2">3</td></tr></tfoot><tbody><tr><td id="a1"><a href="CommonsDistributionStagingMojo.html" class="el_class">CommonsDistributionStagingMojo</a></td><td class="bar" id="b0"><img src="../jacoco-resources/redbar.gif" width="50" height="10" title="214" alt="214"/><img src="../jacoco-resources/greenbar.gif" width="69" height="10" title="290" alt="290"/></td><td class="ctr2" id="c2">57%</td><td class="bar" id="d0"><img src="../jacoco-resources/redbar.gif" width="54" height="10" title="10" alt="10"/><img src="../jacoco-resources/greenbar.gif" width="65" height="10" title="12" alt="12"/></td><td class="ctr2" id="e2">54%< /td><td class="ctr1" id="f0">8</td><td class="ctr2" id="g0">18</td><td class="ctr1" id="h0">28</td><td class="ctr2" id="i0">86</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">1</td></tr><tr><td id="a2"><a href="CommonsSiteCompressionMojo.html" class="el_class">CommonsSiteCompressionMojo</a></td><td class="bar" id="b1"><img src="../jacoco-resources/redbar.gif" width="10" height="10" title="42" alt="42"/><img src="../jacoco-resources/greenbar.gif" width="40" height="10" title="168" alt="168"/></td><td class="ctr2" id="c1">80%</td><td class="bar" id="d1"><img src="../jacoco-resources/redbar.gif" width="21" height="10" title="4" alt="4"/><img src="../jacoco-resources/greenbar.gif" width="76" height="10" title="14" alt="14"/></td><td class="ctr2" id="e1">77%</td><td class="ctr1" id="f1">4</td><td class="ctr2" id="g2">14</td><td class="ctr1" id="h1">9</td><td class="ctr2" id="i2">48</td><td class="ctr1" id="j1">0</t d><td class="ctr2" id="k2">5</td><td class="ctr1" id="l1">0</td><td class="ctr2" id="m1">1</td></tr><tr><td id="a0"><a href="CommonsDistributionDetachmentMojo.html" class="el_class">CommonsDistributionDetachmentMojo</a></td><td class="bar" id="b2"><img src="../jacoco-resources/redbar.gif" width="6" height="10" title="26" alt="26"/><img src="../jacoco-resources/greenbar.gif" width="73" height="10" title="308" alt="308"/></td><td class="ctr2" id="c0">92%</td><td class="bar" id="d2"><img src="../jacoco-resources/redbar.gif" width="16" height="10" title="3" alt="3"/><img src="../jacoco-resources/greenbar.gif" width="92" height="10" title="17" alt="17"/></td><td class="ctr2" id="e0">85%</td><td class="ctr1" id="f2">3</td><td class="ctr2" id="g1">17</td><td class="ctr1" id="h2">6</td><td class="ctr2" id="i1">70</td><td class="ctr1" id="j2">0</td><td class="ctr2" id="k1">7</td><td class="ctr1" id="l2">0</td><td class="ctr2" id="m2">1</td></tr></tbody></table><div class="footer"><span class ="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.8.0.201801022044</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>org.apache.commons.release.plugin.mojos</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.mojos</span></div><h1>org.apach e.commons.release.plugin.mojos</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">386 of 1,568</td><td class="ctr2">75%</td><td class="bar">21 of 72</td><td class="ctr2">70%</td><td class="ctr1">20</td><td class="ctr2">63</td><td class="ctr1">72</td><td class="ctr2">311</td><td class="ctr1">1</td><td class="ctr2">27</td><td class="ctr1">0</td><td class="ctr2">3</td></tr></tfoot><tbody><tr><td id="a1"><a href="CommonsDistributionStagingMojo.html" class="el_class">CommonsDistributionStagingMojo</a></td><td class="bar" id="b0"><img src="../jacoco-resources/redbar.gif" width="33" height="10" title="215" alt="215"/><img src="../jacoco-resources/greenbar.gif" width="86" height="10" title="545" alt="545"/></td><td class="ctr2" id="c2">71%</td><td class="bar" id="d0"><img src="../jacoco-resources/redbar.gif" width="45" height="10" title="13" alt="13"/><img src="../jacoco-resources/greenbar.gif" width="74" height="10" title="21" alt="21"/></td><td class="ctr2" id="e2">61%< /td><td class="ctr1" id="f0">11</td><td class="ctr2" id="g0">26</td><td class="ctr1" id="h0">35</td><td class="ctr2" id="i0">140</td><td class="ctr1" id="j1">0</td><td class="ctr2" id="k1">9</td><td class="ctr1" id="l0">0</td><td class="ctr2" id="m0">1</td></tr><tr><td id="a0"><a href="CommonsDistributionDetachmentMojo.html" class="el_class">CommonsDistributionDetachmentMojo</a></td><td class="bar" id="b1"><img src="../jacoco-resources/redbar.gif" width="20" height="10" title="129" alt="129"/><img src="../jacoco-resources/greenbar.gif" width="76" height="10" title="482" alt="482"/></td><td class="ctr2" id="c0">78%</td><td class="bar" id="d1"><img src="../jacoco-resources/redbar.gif" width="14" height="10" title="4" alt="4"/><img src="../jacoco-resources/greenbar.gif" width="63" height="10" title="18" alt="18"/></td><td class="ctr2" id="e0">81%</td><td class="ctr1" id="f1">5</td><td class="ctr2" id="g1">24</td><td class="ctr1" id="h1">28</td><td class="ctr2" id="i1">129</td><td class ="ctr1" id="j0">1</td><td class="ctr2" id="k0">13</td><td class="ctr1" id="l1">0</td><td class="ctr2" id="m1">1</td></tr><tr><td id="a2"><a href="CommonsSiteCompressionMojo.html" class="el_class">CommonsSiteCompressionMojo</a></td><td class="bar" id="b2"><img src="../jacoco-resources/redbar.gif" width="6" height="10" title="42" alt="42"/><img src="../jacoco-resources/greenbar.gif" width="24" height="10" title="155" alt="155"/></td><td class="ctr2" id="c1">78%</td><td class="bar" id="d2"><img src="../jacoco-resources/redbar.gif" width="14" height="10" title="4" alt="4"/><img src="../jacoco-resources/greenbar.gif" width="42" height="10" title="12" alt="12"/></td><td class="ctr2" id="e1">75%</td><td class="ctr1" id="f2">4</td><td class="ctr2" id="g2">13</td><td class="ctr1" id="h2">9</td><td class="ctr2" id="i2">42</td><td class="ctr1" id="j2">0</td><td class="ctr2" id="k2">5</td><td class="ctr1" id="l2">0</td><td class="ctr2" id="m2">1</td></tr></tbody></table><div class="footer"><spa n class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.8.0.201801022044</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/index.source.html ============================================================================== --- websites/production/commons/content/proper/commons-release-plugin/jacoco/org.apache.commons.release.plugin.mojos/index.source.html (original) +++ websites/production/commons/content/proper/commons-release-plugin/jacoco/org.apache.commons.release.plugin.mojos/index.source.html Tue Jun 19 03:50:24 2018 @@ -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>org.apache.commons.release.plugin.mojos</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.mojos</span></div><h1>org.apache.commons.rel ease.plugin.mojos</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" oncli ck="toggleSort(this)">Classes</td></tr></thead><tfoot><tr><td>Total</td><td class="bar">282 of 1,048</td><td class="ctr2">73%</td><td class="bar">17 of 60</td><td class="ctr2">71%</td><td class="ctr1">15</td><td class="ctr2">49</td><td class="ctr1">43</td><td class="ctr2">204</td><td class="ctr1">0</td><td class="ctr2">19</td><td class="ctr1">0</td><td class="ctr2">3</td></tr></tfoot><tbody><tr><td id="a1"><a href="CommonsDistributionStagingMojo.java.html" class="el_source">CommonsDistributionStagingMojo.java</a></td><td class="bar" id="b0"><img src="../jacoco-resources/redbar.gif" width="50" height="10" title="214" alt="214"/><img src="../jacoco-resources/greenbar.gif" width="69" height="10" title="290" alt="290"/></td><td class="ctr2" id="c2">57%</td><td class="bar" id="d0"><img src="../jacoco-resources/redbar.gif" width="54" height="10" title="10" alt="10"/><img src="../jacoco-resources/greenbar.gif" width="65" height="10" title="12" alt="12"/></td><td class="ctr2" id="e2">54%</t d><td class="ctr1" id="f0">8</td><td class="ctr2" id="g0">18</td><td class="ctr1" id="h0">28</td><td class="ctr2" id="i0">86</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">1</td></tr><tr><td id="a2"><a href="CommonsSiteCompressionMojo.java.html" class="el_source">CommonsSiteCompressionMojo.java</a></td><td class="bar" id="b1"><img src="../jacoco-resources/redbar.gif" width="10" height="10" title="42" alt="42"/><img src="../jacoco-resources/greenbar.gif" width="40" height="10" title="168" alt="168"/></td><td class="ctr2" id="c1">80%</td><td class="bar" id="d1"><img src="../jacoco-resources/redbar.gif" width="21" height="10" title="4" alt="4"/><img src="../jacoco-resources/greenbar.gif" width="76" height="10" title="14" alt="14"/></td><td class="ctr2" id="e1">77%</td><td class="ctr1" id="f1">4</td><td class="ctr2" id="g2">14</td><td class="ctr1" id="h1">9</td><td class="ctr2" id="i2">48</td><td class="ctr1" id= "j1">0</td><td class="ctr2" id="k2">5</td><td class="ctr1" id="l1">0</td><td class="ctr2" id="m1">1</td></tr><tr><td id="a0"><a href="CommonsDistributionDetachmentMojo.java.html" class="el_source">CommonsDistributionDetachmentMojo.java</a></td><td class="bar" id="b2"><img src="../jacoco-resources/redbar.gif" width="6" height="10" title="26" alt="26"/><img src="../jacoco-resources/greenbar.gif" width="73" height="10" title="308" alt="308"/></td><td class="ctr2" id="c0">92%</td><td class="bar" id="d2"><img src="../jacoco-resources/redbar.gif" width="16" height="10" title="3" alt="3"/><img src="../jacoco-resources/greenbar.gif" width="92" height="10" title="17" alt="17"/></td><td class="ctr2" id="e0">85%</td><td class="ctr1" id="f2">3</td><td class="ctr2" id="g1">17</td><td class="ctr1" id="h2">6</td><td class="ctr2" id="i1">70</td><td class="ctr1" id="j2">0</td><td class="ctr2" id="k1">7</td><td class="ctr1" id="l2">0</td><td class="ctr2" id="m2">1</td></tr></tbody></table><div class= "footer"><span class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.8.0.201801022044</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>org.apache.commons.release.plugin.mojos</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.mojos</span></div><h1>org.apache.commons.rel ease.plugin.mojos</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" oncli ck="toggleSort(this)">Classes</td></tr></thead><tfoot><tr><td>Total</td><td class="bar">386 of 1,568</td><td class="ctr2">75%</td><td class="bar">21 of 72</td><td class="ctr2">70%</td><td class="ctr1">20</td><td class="ctr2">63</td><td class="ctr1">72</td><td class="ctr2">311</td><td class="ctr1">1</td><td class="ctr2">27</td><td class="ctr1">0</td><td class="ctr2">3</td></tr></tfoot><tbody><tr><td id="a1"><a href="CommonsDistributionStagingMojo.java.html" class="el_source">CommonsDistributionStagingMojo.java</a></td><td class="bar" id="b0"><img src="../jacoco-resources/redbar.gif" width="33" height="10" title="215" alt="215"/><img src="../jacoco-resources/greenbar.gif" width="86" height="10" title="545" alt="545"/></td><td class="ctr2" id="c2">71%</td><td class="bar" id="d0"><img src="../jacoco-resources/redbar.gif" width="45" height="10" title="13" alt="13"/><img src="../jacoco-resources/greenbar.gif" width="74" height="10" title="21" alt="21"/></td><td class="ctr2" id="e2">61%</t d><td class="ctr1" id="f0">11</td><td class="ctr2" id="g0">26</td><td class="ctr1" id="h0">35</td><td class="ctr2" id="i0">140</td><td class="ctr1" id="j1">0</td><td class="ctr2" id="k1">9</td><td class="ctr1" id="l0">0</td><td class="ctr2" id="m0">1</td></tr><tr><td id="a0"><a href="CommonsDistributionDetachmentMojo.java.html" class="el_source">CommonsDistributionDetachmentMojo.java</a></td><td class="bar" id="b1"><img src="../jacoco-resources/redbar.gif" width="20" height="10" title="129" alt="129"/><img src="../jacoco-resources/greenbar.gif" width="76" height="10" title="482" alt="482"/></td><td class="ctr2" id="c0">78%</td><td class="bar" id="d1"><img src="../jacoco-resources/redbar.gif" width="14" height="10" title="4" alt="4"/><img src="../jacoco-resources/greenbar.gif" width="63" height="10" title="18" alt="18"/></td><td class="ctr2" id="e0">81%</td><td class="ctr1" id="f1">5</td><td class="ctr2" id="g1">24</td><td class="ctr1" id="h1">28</td><td class="ctr2" id="i1">129</td> <td class="ctr1" id="j0">1</td><td class="ctr2" id="k0">13</td><td class="ctr1" id="l1">0</td><td class="ctr2" id="m1">1</td></tr><tr><td id="a2"><a href="CommonsSiteCompressionMojo.java.html" class="el_source">CommonsSiteCompressionMojo.java</a></td><td class="bar" id="b2"><img src="../jacoco-resources/redbar.gif" width="6" height="10" title="42" alt="42"/><img src="../jacoco-resources/greenbar.gif" width="24" height="10" title="155" alt="155"/></td><td class="ctr2" id="c1">78%</td><td class="bar" id="d2"><img src="../jacoco-resources/redbar.gif" width="14" height="10" title="4" alt="4"/><img src="../jacoco-resources/greenbar.gif" width="42" height="10" title="12" alt="12"/></td><td class="ctr2" id="e1">75%</td><td class="ctr1" id="f2">4</td><td class="ctr2" id="g2">13</td><td class="ctr1" id="h2">9</td><td class="ctr2" id="i2">42</td><td class="ctr1" id="j2">0</td><td class="ctr2" id="k2">5</td><td class="ctr1" id="l2">0</td><td class="ctr2" id="m2">1</td></tr></tbody></table><div class="footer"><span class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.8.0.201801022044</span></div></body></html> \ No newline at end of file Added: websites/production/commons/content/proper/commons-release-plugin/jacoco/org.apache.commons.release.plugin.velocity/HeaderHtmlVelocityDelegate$HeaderHtmlVelocityDelegateBuilder.html ============================================================================== --- websites/production/commons/content/proper/commons-release-plugin/jacoco/org.apache.commons.release.plugin.velocity/HeaderHtmlVelocityDelegate$HeaderHtmlVelocityDelegateBuilder.html (added) +++ websites/production/commons/content/proper/commons-release-plugin/jacoco/org.apache.commons.release.plugin.velocity/HeaderHtmlVelocityDelegate$HeaderHtmlVelocityDelegateBuilder.html Tue Jun 19 03:50:24 2018 @@ -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>HeaderHtmlVelocityDelegate.HeaderHtmlVelocityDelegateBuilder</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">HeaderHtmlVelocityDelegate.Header HtmlVelocityDelegateBuilder</span></div><h1>HeaderHtmlVelocityDelegate.HeaderHtmlVelocityDelegateBuilder</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 5</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">1</td><td class="ctr1">0</td><td class="ctr2">1</td><td class="ctr1">0</td><td class="ctr2">1</td></tr></tfoot><tbody><tr><td id="a0"><a href="HeaderHtmlVelocityDelegate.java.html#L85" class="el_method">build()</a></td><td class="bar" id="b0"><img src="../jacoco-resources/greenbar.gif" width="120" height="10" title="5" alt="5"/></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="i0">1</td><td class="ctr1" id="j0">0</td><td class="ctr2" id="k0">1</td></tr></tbody></table><div class="footer"><span class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.8.0.201801022044</span></div></body></html> \ No newline at end of file Added: websites/production/commons/content/proper/commons-release-plugin/jacoco/org.apache.commons.release.plugin.velocity/HeaderHtmlVelocityDelegate.html ============================================================================== --- websites/production/commons/content/proper/commons-release-plugin/jacoco/org.apache.commons.release.plugin.velocity/HeaderHtmlVelocityDelegate.html (added) +++ websites/production/commons/content/proper/commons-release-plugin/jacoco/org.apache.commons.release.plugin.velocity/HeaderHtmlVelocityDelegate.html Tue Jun 19 03:50:24 2018 @@ -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>HeaderHtmlVelocityDelegate</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">HeaderHtmlVelocityDelegate</span></div><h1>HeaderHtmlVelocityDelega 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 34</td><td class="ctr2">100%</td><td class="bar">0 of 0</td><td c lass="ctr2">n/a</td><td class="ctr1">0</td><td class="ctr2">2</td><td class="ctr1">0</td><td class="ctr2">9</td><td class="ctr1">0</td><td class="ctr2">2</td></tr></tfoot><tbody><tr><td id="a1"><a href="HeaderHtmlVelocityDelegate.java.html#L58" class="el_method">render(Writer)</a></td><td class="bar" id="b0"><img src="../jacoco-resources/greenbar.gif" width="120" height="10" title="29" alt="29"/></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="i0">8</td><td class="ctr1" id="j0">0</td><td class="ctr2" id="k0">1</td></tr><tr><td id="a0"><a href="HeaderHtmlVelocityDelegate.java.html#L48" class="el_method">builder()</a></td><td class="bar" id="b1"><img src="../jacoco-resources/greenbar.gif" width="20" 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="i1">1</td><td class="ctr1" id="j1">0</td><td class="ctr2" id="k1">1</td></tr></tbody></table><div class="footer"><span class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.8.0.201801022044</span></div></body></html> \ No newline at end of file Added: websites/production/commons/content/proper/commons-release-plugin/jacoco/org.apache.commons.release.plugin.velocity/HeaderHtmlVelocityDelegate.java.html ============================================================================== --- websites/production/commons/content/proper/commons-release-plugin/jacoco/org.apache.commons.release.plugin.velocity/HeaderHtmlVelocityDelegate.java.html (added) +++ websites/production/commons/content/proper/commons-release-plugin/jacoco/org.apache.commons.release.plugin.velocity/HeaderHtmlVelocityDelegate.java.html Tue Jun 19 03:50:24 2018 @@ -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.0.201801022044</span></div></body></html> \ No newline at end of file Added: websites/production/commons/content/proper/commons-release-plugin/jacoco/org.apache.commons.release.plugin.velocity/ReadmeHtmlVelocityDelegate$ReadmeHtmlVelocityDelegateBuilder.html ============================================================================== --- websites/production/commons/content/proper/commons-release-plugin/jacoco/org.apache.commons.release.plugin.velocity/ReadmeHtmlVelocityDelegate$ReadmeHtmlVelocityDelegateBuilder.html (added) +++ websites/production/commons/content/proper/commons-release-plugin/jacoco/org.apache.commons.release.plugin.velocity/ReadmeHtmlVelocityDelegate$ReadmeHtmlVelocityDelegateBuilder.html Tue Jun 19 03:50:24 2018 @@ -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#L151" 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#L122" 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#L132" 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#L142" 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.0.201801022044</span></div></body></html> \ No newline at end of file Added: websites/production/commons/content/proper/commons-release-plugin/jacoco/org.apache.commons.release.plugin.velocity/ReadmeHtmlVelocityDelegate.html ============================================================================== --- websites/production/commons/content/proper/commons-release-plugin/jacoco/org.apache.commons.release.plugin.velocity/ReadmeHtmlVelocityDelegate.html (added) +++ websites/production/commons/content/proper/commons-release-plugin/jacoco/org.apache.commons.release.plugin.velocity/ReadmeHtmlVelocityDelegate.html Tue Jun 19 03:50:24 2018 @@ -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 101</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">3</td><td class="ctr1">0</td><td class="ctr2">25</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="84" alt="84"/></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="i0">19</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, String)</a></td><td class="bar" id="b1"><img src="../jacoco-resources/greenbar.gif" width="17" height="10" title="12" alt="12"/></td><td class="ctr2" id="c1">100%</td><td class="b ar" 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="7" 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.0.201801022044</span></div></body></html> \ No newline at end of file Added: websites/production/commons/content/proper/commons-release-plugin/jacoco/org.apache.commons.release.plugin.velocity/ReadmeHtmlVelocityDelegate.java.html ============================================================================== --- websites/production/commons/content/proper/commons-release-plugin/jacoco/org.apache.commons.release.plugin.velocity/ReadmeHtmlVelocityDelegate.java.html (added) +++ websites/production/commons/content/proper/commons-release-plugin/jacoco/org.apache.commons.release.plugin.velocity/ReadmeHtmlVelocityDelegate.java.html Tue Jun 19 03:50:24 2018 @@ -0,0 +1,155 @@ +<?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 = splitArtifactId[0];</span> +<span class="fc" id="L82"> String artifactShortName = splitArtifactId[1];</span> +<span class="fc" id="L83"> String artifactIdWithFirstLetterscapitalized =</span> +<span class="fc" id="L84"> StringUtils.capitalize(wordCommons)</span> + + "-" +<span class="fc" id="L86"> + artifactShortName.toUpperCase();</span> +<span class="fc" id="L87"> VelocityContext context = new VelocityContext();</span> +<span class="fc" id="L88"> context.internalPut("artifactIdWithFirstLetterscapitalized", artifactIdWithFirstLetterscapitalized);</span> +<span class="fc" id="L89"> context.internalPut("artifactShortName", artifactShortName.toUpperCase());</span> +<span class="fc" id="L90"> context.internalPut("artifactId", artifactId);</span> +<span class="fc" id="L91"> context.internalPut("version", version);</span> +<span class="fc" id="L92"> context.internalPut("siteUrl", siteUrl);</span> +<span class="fc" id="L93"> template.merge(context, writer);</span> +<span class="fc" id="L94"> 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="L122"> this.artifactId = artifactId;</span> +<span class="fc" id="L123"> 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="L132"> this.version = version;</span> +<span class="fc" id="L133"> 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="L142"> this.siteUrl = siteUrl;</span> +<span class="fc" id="L143"> 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="L151"> 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.0.201801022044</span></div></body></html> \ No newline at end of file Added: websites/production/commons/content/proper/commons-release-plugin/jacoco/org.apache.commons.release.plugin.velocity/index.html ============================================================================== --- websites/production/commons/content/proper/commons-release-plugin/jacoco/org.apache.commons.release.plugin.velocity/index.html (added) +++ websites/production/commons/content/proper/commons-release-plugin/jacoco/org.apache.commons.release.plugin.velocity/index.html Tue Jun 19 03:50:24 2018 @@ -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 166</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">10</td><td class="ctr1">0</td><td class="ctr2">42</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="101" alt="101"/></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="g1">3</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="k1">3</td><td class="ctr1" id="l0">0</td><td class="ctr2" id="m0">1</td></tr><tr><td id="a 0"><a href="HeaderHtmlVelocityDelegate.html" class="el_class">HeaderHtmlVelocityDelegate</a></td><td class="bar" id="b1"><img src="../jacoco-resources/greenbar.gif" width="40" 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="30" 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= "g0">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="5" 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.0.201801022044</span></div></body>< /html> \ No newline at end of file
