Added: websites/production/commons/content/proper/commons-release-plugin/xref-test/org/apache/commons/release/plugin/mojos/CommonsDistributionDetachmentMojoTest.html ============================================================================== --- websites/production/commons/content/proper/commons-release-plugin/xref-test/org/apache/commons/release/plugin/mojos/CommonsDistributionDetachmentMojoTest.html (added) +++ websites/production/commons/content/proper/commons-release-plugin/xref-test/org/apache/commons/release/plugin/mojos/CommonsDistributionDetachmentMojoTest.html Thu Jan 11 01:05:54 2018 @@ -0,0 +1,88 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> +<head><meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> +<title>CommonsDistributionDetachmentMojoTest xref</title> +<link type="text/css" rel="stylesheet" href="../../../../../../stylesheet.css" /> +</head> +<body> +<div id="overview"><a href="../../../../../../../testapidocs/org/apache/commons/release/plugin/mojos/CommonsDistributionDetachmentMojoTest.html">View Javadoc</a></div><pre> +<a class="jxr_linenumber" name="L1" href="#L1">1</a> <em class="jxr_comment">/*</em> +<a class="jxr_linenumber" name="L2" href="#L2">2</a> <em class="jxr_comment"> * Licensed to the Apache Software Foundation (ASF) under one or more</em> +<a class="jxr_linenumber" name="L3" href="#L3">3</a> <em class="jxr_comment"> * contributor license agreements. See the NOTICE file distributed with</em> +<a class="jxr_linenumber" name="L4" href="#L4">4</a> <em class="jxr_comment"> * this work for additional information regarding copyright ownership.</em> +<a class="jxr_linenumber" name="L5" href="#L5">5</a> <em class="jxr_comment"> * The ASF licenses this file to You under the Apache License, Version 2.0</em> +<a class="jxr_linenumber" name="L6" href="#L6">6</a> <em class="jxr_comment"> * (the "License"); you may not use this file except in compliance with</em> +<a class="jxr_linenumber" name="L7" href="#L7">7</a> <em class="jxr_comment"> * the License. You may obtain a copy of the License at</em> +<a class="jxr_linenumber" name="L8" href="#L8">8</a> <em class="jxr_comment"> *</em> +<a class="jxr_linenumber" name="L9" href="#L9">9</a> <em class="jxr_comment"> * <a href="http://www.apache.org/licenses/LICENSE-2." target="alexandria_uri">http://www.apache.org/licenses/LICENSE-2.</a>0</em> +<a class="jxr_linenumber" name="L10" href="#L10">10</a> <em class="jxr_comment"> *</em> +<a class="jxr_linenumber" name="L11" href="#L11">11</a> <em class="jxr_comment"> * Unless required by applicable law or agreed to in writing, software</em> +<a class="jxr_linenumber" name="L12" href="#L12">12</a> <em class="jxr_comment"> * distributed under the License is distributed on an "AS IS" BASIS,</em> +<a class="jxr_linenumber" name="L13" href="#L13">13</a> <em class="jxr_comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</em> +<a class="jxr_linenumber" name="L14" href="#L14">14</a> <em class="jxr_comment"> * See the License for the specific language governing permissions and</em> +<a class="jxr_linenumber" name="L15" href="#L15">15</a> <em class="jxr_comment"> * limitations under the License.</em> +<a class="jxr_linenumber" name="L16" href="#L16">16</a> <em class="jxr_comment"> */</em> +<a class="jxr_linenumber" name="L17" href="#L17">17</a> <strong class="jxr_keyword">package</strong> org.apache.commons.release.plugin.mojos; +<a class="jxr_linenumber" name="L18" href="#L18">18</a> +<a class="jxr_linenumber" name="L19" href="#L19">19</a> <strong class="jxr_keyword">import</strong> org.apache.maven.plugin.testing.MojoRule; +<a class="jxr_linenumber" name="L20" href="#L20">20</a> <strong class="jxr_keyword">import</strong> org.junit.Rule; +<a class="jxr_linenumber" name="L21" href="#L21">21</a> <strong class="jxr_keyword">import</strong> org.junit.Test; +<a class="jxr_linenumber" name="L22" href="#L22">22</a> +<a class="jxr_linenumber" name="L23" href="#L23">23</a> <strong class="jxr_keyword">import</strong> java.io.File; +<a class="jxr_linenumber" name="L24" href="#L24">24</a> +<a class="jxr_linenumber" name="L25" href="#L25">25</a> <strong class="jxr_keyword">import</strong> <strong class="jxr_keyword">static</strong> junit.framework.TestCase.assertTrue; +<a class="jxr_linenumber" name="L26" href="#L26">26</a> <strong class="jxr_keyword">import</strong> <strong class="jxr_keyword">static</strong> org.junit.Assert.assertFalse; +<a class="jxr_linenumber" name="L27" href="#L27">27</a> <strong class="jxr_keyword">import</strong> <strong class="jxr_keyword">static</strong> org.junit.Assert.assertNotNull; +<a class="jxr_linenumber" name="L28" href="#L28">28</a> +<a class="jxr_linenumber" name="L29" href="#L29">29</a> <em class="jxr_javadoccomment">/**</em> +<a class="jxr_linenumber" name="L30" href="#L30">30</a> <em class="jxr_javadoccomment"> * Unit tests for {@link CommonsDistributionDetachmentMojo}.</em> +<a class="jxr_linenumber" name="L31" href="#L31">31</a> <em class="jxr_javadoccomment"> *</em> +<a class="jxr_linenumber" name="L32" href="#L32">32</a> <em class="jxr_javadoccomment"> * @author chtompki</em> +<a class="jxr_linenumber" name="L33" href="#L33">33</a> <em class="jxr_javadoccomment"> */</em> +<a class="jxr_linenumber" name="L34" href="#L34">34</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">class</strong> <a href="../../../../../../org/apache/commons/release/plugin/mojos/CommonsDistributionDetachmentMojoTest.html">CommonsDistributionDetachmentMojoTest</a> { +<a class="jxr_linenumber" name="L35" href="#L35">35</a> +<a class="jxr_linenumber" name="L36" href="#L36">36</a> @Rule +<a class="jxr_linenumber" name="L37" href="#L37">37</a> <strong class="jxr_keyword">public</strong> MojoRule rule = <strong class="jxr_keyword">new</strong> MojoRule() { +<a class="jxr_linenumber" name="L38" href="#L38">38</a> @Override +<a class="jxr_linenumber" name="L39" href="#L39">39</a> <strong class="jxr_keyword">protected</strong> <strong class="jxr_keyword">void</strong> before() <strong class="jxr_keyword">throws</strong> Throwable { +<a class="jxr_linenumber" name="L40" href="#L40">40</a> } +<a class="jxr_linenumber" name="L41" href="#L41">41</a> +<a class="jxr_linenumber" name="L42" href="#L42">42</a> @Override +<a class="jxr_linenumber" name="L43" href="#L43">43</a> <strong class="jxr_keyword">protected</strong> <strong class="jxr_keyword">void</strong> after() { +<a class="jxr_linenumber" name="L44" href="#L44">44</a> } +<a class="jxr_linenumber" name="L45" href="#L45">45</a> }; +<a class="jxr_linenumber" name="L46" href="#L46">46</a> +<a class="jxr_linenumber" name="L47" href="#L47">47</a> <strong class="jxr_keyword">private</strong> CommonsDistributionDetachmentMojo mojo; +<a class="jxr_linenumber" name="L48" href="#L48">48</a> +<a class="jxr_linenumber" name="L49" href="#L49">49</a> @Test +<a class="jxr_linenumber" name="L50" href="#L50">50</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testSuccess() <strong class="jxr_keyword">throws</strong> Exception { +<a class="jxr_linenumber" name="L51" href="#L51">51</a> File testPom = <strong class="jxr_keyword">new</strong> File(<span class="jxr_string">"src/test/resources/mojos/detach-distributions/detach-distributions.xml"</span>); +<a class="jxr_linenumber" name="L52" href="#L52">52</a> assertNotNull(testPom); +<a class="jxr_linenumber" name="L53" href="#L53">53</a> assertTrue(testPom.exists()); +<a class="jxr_linenumber" name="L54" href="#L54">54</a> mojo = (CommonsDistributionDetachmentMojo) rule.lookupMojo(<span class="jxr_string">"detach-distributions"</span>, testPom); +<a class="jxr_linenumber" name="L55" href="#L55">55</a> mojo.execute(); +<a class="jxr_linenumber" name="L56" href="#L56">56</a> File detachedTarGz = <strong class="jxr_keyword">new</strong> File(<span class="jxr_string">"target/commons-release-plugin/mockAttachedTar.tar.gz"</span>); +<a class="jxr_linenumber" name="L57" href="#L57">57</a> File detachedTarGzAsc = <strong class="jxr_keyword">new</strong> File(<span class="jxr_string">"target/commons-release-plugin/mockAttachedTar.tar.gz.asc"</span>); +<a class="jxr_linenumber" name="L58" href="#L58">58</a> File detachedTarMd5 = <strong class="jxr_keyword">new</strong> File(<span class="jxr_string">"target/commons-release-plugin/mockAttachedTar.tar.gz.md5"</span>); +<a class="jxr_linenumber" name="L59" href="#L59">59</a> File detachedTarGzSha1 = <strong class="jxr_keyword">new</strong> File(<span class="jxr_string">"target/commons-release-plugin/mockAttachedTar.tar.gz.sha1"</span>); +<a class="jxr_linenumber" name="L60" href="#L60">60</a> File detachedZip = <strong class="jxr_keyword">new</strong> File(<span class="jxr_string">"target/commons-release-plugin/mockAttachedZip.zip"</span>); +<a class="jxr_linenumber" name="L61" href="#L61">61</a> File detachedZipAsc = <strong class="jxr_keyword">new</strong> File(<span class="jxr_string">"target/commons-release-plugin/mockAttachedZip.zip.asc"</span>); +<a class="jxr_linenumber" name="L62" href="#L62">62</a> File detachedZipMd5 = <strong class="jxr_keyword">new</strong> File(<span class="jxr_string">"target/commons-release-plugin/mockAttachedZip.zip.md5"</span>); +<a class="jxr_linenumber" name="L63" href="#L63">63</a> File detachedZipSha1 = <strong class="jxr_keyword">new</strong> File(<span class="jxr_string">"target/commons-release-plugin/mockAttachedZip.zip.sha1"</span>); +<a class="jxr_linenumber" name="L64" href="#L64">64</a> File notDetatchedMockAttachedFile = <strong class="jxr_keyword">new</strong> File(<span class="jxr_string">"target/commons-release-plugin/mockAttachedFile.html"</span>); +<a class="jxr_linenumber" name="L65" href="#L65">65</a> assertTrue(detachedTarGz.exists()); +<a class="jxr_linenumber" name="L66" href="#L66">66</a> assertTrue(detachedTarGzAsc.exists()); +<a class="jxr_linenumber" name="L67" href="#L67">67</a> assertTrue(detachedTarMd5.exists()); +<a class="jxr_linenumber" name="L68" href="#L68">68</a> assertTrue(detachedTarGzSha1.exists()); +<a class="jxr_linenumber" name="L69" href="#L69">69</a> assertTrue(detachedZip.exists()); +<a class="jxr_linenumber" name="L70" href="#L70">70</a> assertTrue(detachedZipAsc.exists()); +<a class="jxr_linenumber" name="L71" href="#L71">71</a> assertTrue(detachedZipMd5.exists()); +<a class="jxr_linenumber" name="L72" href="#L72">72</a> assertTrue(detachedZipSha1.exists()); +<a class="jxr_linenumber" name="L73" href="#L73">73</a> assertFalse(notDetatchedMockAttachedFile.exists()); +<a class="jxr_linenumber" name="L74" href="#L74">74</a> } +<a class="jxr_linenumber" name="L75" href="#L75">75</a> } +</pre> +<hr/> +<div id="footer">Copyright © 2018 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</div> +</body> +</html> \ No newline at end of file
Added: websites/production/commons/content/proper/commons-release-plugin/xref-test/org/apache/commons/release/plugin/mojos/CommonsDistributionStagingMojoTest.html ============================================================================== --- websites/production/commons/content/proper/commons-release-plugin/xref-test/org/apache/commons/release/plugin/mojos/CommonsDistributionStagingMojoTest.html (added) +++ websites/production/commons/content/proper/commons-release-plugin/xref-test/org/apache/commons/release/plugin/mojos/CommonsDistributionStagingMojoTest.html Thu Jan 11 01:05:54 2018 @@ -0,0 +1,81 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> +<head><meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> +<title>CommonsDistributionStagingMojoTest xref</title> +<link type="text/css" rel="stylesheet" href="../../../../../../stylesheet.css" /> +</head> +<body> +<div id="overview"><a href="../../../../../../../testapidocs/org/apache/commons/release/plugin/mojos/CommonsDistributionStagingMojoTest.html">View Javadoc</a></div><pre> +<a class="jxr_linenumber" name="L1" href="#L1">1</a> <em class="jxr_comment">/*</em> +<a class="jxr_linenumber" name="L2" href="#L2">2</a> <em class="jxr_comment"> * Licensed to the Apache Software Foundation (ASF) under one or more</em> +<a class="jxr_linenumber" name="L3" href="#L3">3</a> <em class="jxr_comment"> * contributor license agreements. See the NOTICE file distributed with</em> +<a class="jxr_linenumber" name="L4" href="#L4">4</a> <em class="jxr_comment"> * this work for additional information regarding copyright ownership.</em> +<a class="jxr_linenumber" name="L5" href="#L5">5</a> <em class="jxr_comment"> * The ASF licenses this file to You under the Apache License, Version 2.0</em> +<a class="jxr_linenumber" name="L6" href="#L6">6</a> <em class="jxr_comment"> * (the "License"); you may not use this file except in compliance with</em> +<a class="jxr_linenumber" name="L7" href="#L7">7</a> <em class="jxr_comment"> * the License. You may obtain a copy of the License at</em> +<a class="jxr_linenumber" name="L8" href="#L8">8</a> <em class="jxr_comment"> *</em> +<a class="jxr_linenumber" name="L9" href="#L9">9</a> <em class="jxr_comment"> * <a href="http://www.apache.org/licenses/LICENSE-2." target="alexandria_uri">http://www.apache.org/licenses/LICENSE-2.</a>0</em> +<a class="jxr_linenumber" name="L10" href="#L10">10</a> <em class="jxr_comment"> *</em> +<a class="jxr_linenumber" name="L11" href="#L11">11</a> <em class="jxr_comment"> * Unless required by applicable law or agreed to in writing, software</em> +<a class="jxr_linenumber" name="L12" href="#L12">12</a> <em class="jxr_comment"> * distributed under the License is distributed on an "AS IS" BASIS,</em> +<a class="jxr_linenumber" name="L13" href="#L13">13</a> <em class="jxr_comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</em> +<a class="jxr_linenumber" name="L14" href="#L14">14</a> <em class="jxr_comment"> * See the License for the specific language governing permissions and</em> +<a class="jxr_linenumber" name="L15" href="#L15">15</a> <em class="jxr_comment"> * limitations under the License.</em> +<a class="jxr_linenumber" name="L16" href="#L16">16</a> <em class="jxr_comment"> */</em> +<a class="jxr_linenumber" name="L17" href="#L17">17</a> <strong class="jxr_keyword">package</strong> org.apache.commons.release.plugin.mojos; +<a class="jxr_linenumber" name="L18" href="#L18">18</a> +<a class="jxr_linenumber" name="L19" href="#L19">19</a> <strong class="jxr_keyword">import</strong> org.apache.maven.plugin.testing.MojoRule; +<a class="jxr_linenumber" name="L20" href="#L20">20</a> <strong class="jxr_keyword">import</strong> org.junit.Rule; +<a class="jxr_linenumber" name="L21" href="#L21">21</a> <strong class="jxr_keyword">import</strong> org.junit.Test; +<a class="jxr_linenumber" name="L22" href="#L22">22</a> +<a class="jxr_linenumber" name="L23" href="#L23">23</a> <strong class="jxr_keyword">import</strong> java.io.File; +<a class="jxr_linenumber" name="L24" href="#L24">24</a> +<a class="jxr_linenumber" name="L25" href="#L25">25</a> <strong class="jxr_keyword">import</strong> <strong class="jxr_keyword">static</strong> junit.framework.TestCase.assertTrue; +<a class="jxr_linenumber" name="L26" href="#L26">26</a> <strong class="jxr_keyword">import</strong> <strong class="jxr_keyword">static</strong> org.junit.Assert.assertNotNull; +<a class="jxr_linenumber" name="L27" href="#L27">27</a> +<a class="jxr_linenumber" name="L28" href="#L28">28</a> <em class="jxr_javadoccomment">/**</em> +<a class="jxr_linenumber" name="L29" href="#L29">29</a> <em class="jxr_javadoccomment"> * Unit tests for {@link CommonsDistributionStagingMojo}.</em> +<a class="jxr_linenumber" name="L30" href="#L30">30</a> <em class="jxr_javadoccomment"> *</em> +<a class="jxr_linenumber" name="L31" href="#L31">31</a> <em class="jxr_javadoccomment"> * @author chtompki</em> +<a class="jxr_linenumber" name="L32" href="#L32">32</a> <em class="jxr_javadoccomment"> * @since 1.0.</em> +<a class="jxr_linenumber" name="L33" href="#L33">33</a> <em class="jxr_javadoccomment"> */</em> +<a class="jxr_linenumber" name="L34" href="#L34">34</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">class</strong> <a href="../../../../../../org/apache/commons/release/plugin/mojos/CommonsDistributionStagingMojoTest.html">CommonsDistributionStagingMojoTest</a> { +<a class="jxr_linenumber" name="L35" href="#L35">35</a> +<a class="jxr_linenumber" name="L36" href="#L36">36</a> @Rule +<a class="jxr_linenumber" name="L37" href="#L37">37</a> <strong class="jxr_keyword">public</strong> MojoRule rule = <strong class="jxr_keyword">new</strong> MojoRule() { +<a class="jxr_linenumber" name="L38" href="#L38">38</a> @Override +<a class="jxr_linenumber" name="L39" href="#L39">39</a> <strong class="jxr_keyword">protected</strong> <strong class="jxr_keyword">void</strong> before() <strong class="jxr_keyword">throws</strong> Throwable { +<a class="jxr_linenumber" name="L40" href="#L40">40</a> } +<a class="jxr_linenumber" name="L41" href="#L41">41</a> +<a class="jxr_linenumber" name="L42" href="#L42">42</a> @Override +<a class="jxr_linenumber" name="L43" href="#L43">43</a> <strong class="jxr_keyword">protected</strong> <strong class="jxr_keyword">void</strong> after() { +<a class="jxr_linenumber" name="L44" href="#L44">44</a> } +<a class="jxr_linenumber" name="L45" href="#L45">45</a> }; +<a class="jxr_linenumber" name="L46" href="#L46">46</a> +<a class="jxr_linenumber" name="L47" href="#L47">47</a> <strong class="jxr_keyword">private</strong> CommonsDistributionDetachmentMojo detatchmentMojo; +<a class="jxr_linenumber" name="L48" href="#L48">48</a> +<a class="jxr_linenumber" name="L49" href="#L49">49</a> <strong class="jxr_keyword">private</strong> CommonsDistributionStagingMojo mojoForTest; +<a class="jxr_linenumber" name="L50" href="#L50">50</a> +<a class="jxr_linenumber" name="L51" href="#L51">51</a> @Test +<a class="jxr_linenumber" name="L52" href="#L52">52</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testSuccess() <strong class="jxr_keyword">throws</strong> Exception { +<a class="jxr_linenumber" name="L53" href="#L53">53</a> File testPom = <strong class="jxr_keyword">new</strong> File(<span class="jxr_string">"src/test/resources/mojos/stage-distributions/stage-distributions.xml"</span>); +<a class="jxr_linenumber" name="L54" href="#L54">54</a> assertNotNull(testPom); +<a class="jxr_linenumber" name="L55" href="#L55">55</a> assertTrue(testPom.exists()); +<a class="jxr_linenumber" name="L56" href="#L56">56</a> File detachmentPom = <strong class="jxr_keyword">new</strong> File(<span class="jxr_string">"src/test/resources/mojos/detach-distributions/detach-distributions.xml"</span>); +<a class="jxr_linenumber" name="L57" href="#L57">57</a> assertNotNull(detachmentPom); +<a class="jxr_linenumber" name="L58" href="#L58">58</a> assertTrue(detachmentPom.exists()); +<a class="jxr_linenumber" name="L59" href="#L59">59</a> mojoForTest = (CommonsDistributionStagingMojo) rule.lookupMojo(<span class="jxr_string">"stage-distributions"</span>, testPom); +<a class="jxr_linenumber" name="L60" href="#L60">60</a> detatchmentMojo = (CommonsDistributionDetachmentMojo) rule.lookupMojo(<span class="jxr_string">"detach-distributions"</span>, detachmentPom); +<a class="jxr_linenumber" name="L61" href="#L61">61</a> detatchmentMojo.execute(); +<a class="jxr_linenumber" name="L62" href="#L62">62</a> File releaseNotesBasedir = <strong class="jxr_keyword">new</strong> File(<span class="jxr_string">"src/test/resources/mojos/stage-distributions/"</span>); +<a class="jxr_linenumber" name="L63" href="#L63">63</a> mojoForTest.setBasedir(releaseNotesBasedir); +<a class="jxr_linenumber" name="L64" href="#L64">64</a> mojoForTest.execute(); +<a class="jxr_linenumber" name="L65" href="#L65">65</a> File targetScmDirectory = <strong class="jxr_keyword">new</strong> File(<span class="jxr_string">"target/commons-release-plugin/scm"</span>); +<a class="jxr_linenumber" name="L66" href="#L66">66</a> assertTrue(targetScmDirectory.exists()); +<a class="jxr_linenumber" name="L67" href="#L67">67</a> } +<a class="jxr_linenumber" name="L68" href="#L68">68</a> } +</pre> +<hr/> +<div id="footer">Copyright © 2018 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</div> +</body> +</html> \ No newline at end of file Added: websites/production/commons/content/proper/commons-release-plugin/xref-test/org/apache/commons/release/plugin/mojos/CommonsSiteCompressionMojoTest.html ============================================================================== --- websites/production/commons/content/proper/commons-release-plugin/xref-test/org/apache/commons/release/plugin/mojos/CommonsSiteCompressionMojoTest.html (added) +++ websites/production/commons/content/proper/commons-release-plugin/xref-test/org/apache/commons/release/plugin/mojos/CommonsSiteCompressionMojoTest.html Thu Jan 11 01:05:54 2018 @@ -0,0 +1,89 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> +<head><meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> +<title>CommonsSiteCompressionMojoTest xref</title> +<link type="text/css" rel="stylesheet" href="../../../../../../stylesheet.css" /> +</head> +<body> +<div id="overview"><a href="../../../../../../../testapidocs/org/apache/commons/release/plugin/mojos/CommonsSiteCompressionMojoTest.html">View Javadoc</a></div><pre> +<a class="jxr_linenumber" name="L1" href="#L1">1</a> <em class="jxr_comment">/*</em> +<a class="jxr_linenumber" name="L2" href="#L2">2</a> <em class="jxr_comment"> * Licensed to the Apache Software Foundation (ASF) under one or more</em> +<a class="jxr_linenumber" name="L3" href="#L3">3</a> <em class="jxr_comment"> * contributor license agreements. See the NOTICE file distributed with</em> +<a class="jxr_linenumber" name="L4" href="#L4">4</a> <em class="jxr_comment"> * this work for additional information regarding copyright ownership.</em> +<a class="jxr_linenumber" name="L5" href="#L5">5</a> <em class="jxr_comment"> * The ASF licenses this file to You under the Apache License, Version 2.0</em> +<a class="jxr_linenumber" name="L6" href="#L6">6</a> <em class="jxr_comment"> * (the "License"); you may not use this file except in compliance with</em> +<a class="jxr_linenumber" name="L7" href="#L7">7</a> <em class="jxr_comment"> * the License. You may obtain a copy of the License at</em> +<a class="jxr_linenumber" name="L8" href="#L8">8</a> <em class="jxr_comment"> *</em> +<a class="jxr_linenumber" name="L9" href="#L9">9</a> <em class="jxr_comment"> * <a href="http://www.apache.org/licenses/LICENSE-2." target="alexandria_uri">http://www.apache.org/licenses/LICENSE-2.</a>0</em> +<a class="jxr_linenumber" name="L10" href="#L10">10</a> <em class="jxr_comment"> *</em> +<a class="jxr_linenumber" name="L11" href="#L11">11</a> <em class="jxr_comment"> * Unless required by applicable law or agreed to in writing, software</em> +<a class="jxr_linenumber" name="L12" href="#L12">12</a> <em class="jxr_comment"> * distributed under the License is distributed on an "AS IS" BASIS,</em> +<a class="jxr_linenumber" name="L13" href="#L13">13</a> <em class="jxr_comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</em> +<a class="jxr_linenumber" name="L14" href="#L14">14</a> <em class="jxr_comment"> * See the License for the specific language governing permissions and</em> +<a class="jxr_linenumber" name="L15" href="#L15">15</a> <em class="jxr_comment"> * limitations under the License.</em> +<a class="jxr_linenumber" name="L16" href="#L16">16</a> <em class="jxr_comment"> */</em> +<a class="jxr_linenumber" name="L17" href="#L17">17</a> <strong class="jxr_keyword">package</strong> org.apache.commons.release.plugin.mojos; +<a class="jxr_linenumber" name="L18" href="#L18">18</a> +<a class="jxr_linenumber" name="L19" href="#L19">19</a> <strong class="jxr_keyword">import</strong> org.apache.maven.plugin.MojoFailureException; +<a class="jxr_linenumber" name="L20" href="#L20">20</a> <strong class="jxr_keyword">import</strong> org.apache.maven.plugin.testing.MojoRule; +<a class="jxr_linenumber" name="L21" href="#L21">21</a> <strong class="jxr_keyword">import</strong> org.junit.Rule; +<a class="jxr_linenumber" name="L22" href="#L22">22</a> <strong class="jxr_keyword">import</strong> org.junit.Test; +<a class="jxr_linenumber" name="L23" href="#L23">23</a> +<a class="jxr_linenumber" name="L24" href="#L24">24</a> <strong class="jxr_keyword">import</strong> java.io.File; +<a class="jxr_linenumber" name="L25" href="#L25">25</a> +<a class="jxr_linenumber" name="L26" href="#L26">26</a> <strong class="jxr_keyword">import</strong> <strong class="jxr_keyword">static</strong> junit.framework.TestCase.assertTrue; +<a class="jxr_linenumber" name="L27" href="#L27">27</a> <strong class="jxr_keyword">import</strong> <strong class="jxr_keyword">static</strong> org.junit.Assert.assertEquals; +<a class="jxr_linenumber" name="L28" href="#L28">28</a> <strong class="jxr_keyword">import</strong> <strong class="jxr_keyword">static</strong> org.junit.Assert.assertNotNull; +<a class="jxr_linenumber" name="L29" href="#L29">29</a> +<a class="jxr_linenumber" name="L30" href="#L30">30</a> <em class="jxr_javadoccomment">/**</em> +<a class="jxr_linenumber" name="L31" href="#L31">31</a> <em class="jxr_javadoccomment"> * Unit tests for {@link CommonsSiteCompressionMojo}.</em> +<a class="jxr_linenumber" name="L32" href="#L32">32</a> <em class="jxr_javadoccomment"> *</em> +<a class="jxr_linenumber" name="L33" href="#L33">33</a> <em class="jxr_javadoccomment"> * @author chtompki</em> +<a class="jxr_linenumber" name="L34" href="#L34">34</a> <em class="jxr_javadoccomment"> * @since 1.0</em> +<a class="jxr_linenumber" name="L35" href="#L35">35</a> <em class="jxr_javadoccomment"> */</em> +<a class="jxr_linenumber" name="L36" href="#L36">36</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">class</strong> <a href="../../../../../../org/apache/commons/release/plugin/mojos/CommonsSiteCompressionMojoTest.html">CommonsSiteCompressionMojoTest</a> { +<a class="jxr_linenumber" name="L37" href="#L37">37</a> +<a class="jxr_linenumber" name="L38" href="#L38">38</a> @Rule +<a class="jxr_linenumber" name="L39" href="#L39">39</a> <strong class="jxr_keyword">public</strong> MojoRule rule = <strong class="jxr_keyword">new</strong> MojoRule() { +<a class="jxr_linenumber" name="L40" href="#L40">40</a> @Override +<a class="jxr_linenumber" name="L41" href="#L41">41</a> <strong class="jxr_keyword">protected</strong> <strong class="jxr_keyword">void</strong> before() <strong class="jxr_keyword">throws</strong> Throwable { +<a class="jxr_linenumber" name="L42" href="#L42">42</a> } +<a class="jxr_linenumber" name="L43" href="#L43">43</a> +<a class="jxr_linenumber" name="L44" href="#L44">44</a> @Override +<a class="jxr_linenumber" name="L45" href="#L45">45</a> <strong class="jxr_keyword">protected</strong> <strong class="jxr_keyword">void</strong> after() { +<a class="jxr_linenumber" name="L46" href="#L46">46</a> } +<a class="jxr_linenumber" name="L47" href="#L47">47</a> }; +<a class="jxr_linenumber" name="L48" href="#L48">48</a> +<a class="jxr_linenumber" name="L49" href="#L49">49</a> <strong class="jxr_keyword">protected</strong> CommonsSiteCompressionMojo mojo; +<a class="jxr_linenumber" name="L50" href="#L50">50</a> +<a class="jxr_linenumber" name="L51" href="#L51">51</a> @Test +<a class="jxr_linenumber" name="L52" href="#L52">52</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testCompressSiteSuccess() <strong class="jxr_keyword">throws</strong> Exception { +<a class="jxr_linenumber" name="L53" href="#L53">53</a> File testPom = <strong class="jxr_keyword">new</strong> File(<span class="jxr_string">"src/test/resources/mojos/compress-site/compress-site.xml"</span>); +<a class="jxr_linenumber" name="L54" href="#L54">54</a> assertNotNull(testPom); +<a class="jxr_linenumber" name="L55" href="#L55">55</a> assertTrue(testPom.exists()); +<a class="jxr_linenumber" name="L56" href="#L56">56</a> mojo = (CommonsSiteCompressionMojo) rule.lookupMojo(<span class="jxr_string">"compress-site"</span>, testPom); +<a class="jxr_linenumber" name="L57" href="#L57">57</a> mojo.execute(); +<a class="jxr_linenumber" name="L58" href="#L58">58</a> File siteZip = <strong class="jxr_keyword">new</strong> File(<span class="jxr_string">"target/commons-release-plugin/site.zip"</span>); +<a class="jxr_linenumber" name="L59" href="#L59">59</a> assertTrue(siteZip.exists()); +<a class="jxr_linenumber" name="L60" href="#L60">60</a> } +<a class="jxr_linenumber" name="L61" href="#L61">61</a> +<a class="jxr_linenumber" name="L62" href="#L62">62</a> @Test +<a class="jxr_linenumber" name="L63" href="#L63">63</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testCompressSiteDirNonExistentFailure() <strong class="jxr_keyword">throws</strong> Exception { +<a class="jxr_linenumber" name="L64" href="#L64">64</a> File testPom = <strong class="jxr_keyword">new</strong> File(<span class="jxr_string">"src/test/resources/mojos/compress-site/compress-site-failure.xml"</span>); +<a class="jxr_linenumber" name="L65" href="#L65">65</a> assertNotNull(testPom); +<a class="jxr_linenumber" name="L66" href="#L66">66</a> assertTrue(testPom.exists()); +<a class="jxr_linenumber" name="L67" href="#L67">67</a> mojo = (CommonsSiteCompressionMojo) rule.lookupMojo(<span class="jxr_string">"compress-site"</span>, testPom); +<a class="jxr_linenumber" name="L68" href="#L68">68</a> <strong class="jxr_keyword">try</strong> { +<a class="jxr_linenumber" name="L69" href="#L69">69</a> mojo.execute(); +<a class="jxr_linenumber" name="L70" href="#L70">70</a> } <strong class="jxr_keyword">catch</strong> (MojoFailureException e) { +<a class="jxr_linenumber" name="L71" href="#L71">71</a> assertEquals( +<a class="jxr_linenumber" name="L72" href="#L72">72</a> <span class="jxr_string">"\"mvn site\" was not run before this goal, or a siteDirectory did not exist."</span>, e.getMessage() +<a class="jxr_linenumber" name="L73" href="#L73">73</a> ); +<a class="jxr_linenumber" name="L74" href="#L74">74</a> } +<a class="jxr_linenumber" name="L75" href="#L75">75</a> } +<a class="jxr_linenumber" name="L76" href="#L76">76</a> } +</pre> +<hr/> +<div id="footer">Copyright © 2018 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</div> +</body> +</html> \ No newline at end of file Added: websites/production/commons/content/proper/commons-release-plugin/xref-test/org/apache/commons/release/plugin/mojos/package-frame.html ============================================================================== --- websites/production/commons/content/proper/commons-release-plugin/xref-test/org/apache/commons/release/plugin/mojos/package-frame.html (added) +++ websites/production/commons/content/proper/commons-release-plugin/xref-test/org/apache/commons/release/plugin/mojos/package-frame.html Thu Jan 11 01:05:54 2018 @@ -0,0 +1,30 @@ + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xml:lang="en" lang="en"> + <head> + <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> + <title>Apache Commons Release Plugin 0.1-SNAPSHOT Reference Package org.apache.commons.release.plugin.mojos</title> + <link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="style" /> + </head> + <body> + + <h3> + <a href="package-summary.html" target="classFrame">org.apache.commons.release.plugin.mojos</a> + </h3> + + <h3>Classes</h3> + + <ul> + <li> + <a href="CommonsDistributionDetachmentMojoTest.html" target="classFrame">CommonsDistributionDetachmentMojoTest</a> + </li> + <li> + <a href="CommonsDistributionStagingMojoTest.html" target="classFrame">CommonsDistributionStagingMojoTest</a> + </li> + <li> + <a href="CommonsSiteCompressionMojoTest.html" target="classFrame">CommonsSiteCompressionMojoTest</a> + </li> + </ul> + + </body> +</html> \ No newline at end of file Added: websites/production/commons/content/proper/commons-release-plugin/xref-test/org/apache/commons/release/plugin/mojos/package-summary.html ============================================================================== --- websites/production/commons/content/proper/commons-release-plugin/xref-test/org/apache/commons/release/plugin/mojos/package-summary.html (added) +++ websites/production/commons/content/proper/commons-release-plugin/xref-test/org/apache/commons/release/plugin/mojos/package-summary.html Thu Jan 11 01:05:54 2018 @@ -0,0 +1,79 @@ + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xml:lang="en" lang="en"> + <head> + <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> + <title>Apache Commons Release Plugin 0.1-SNAPSHOT Reference Package org.apache.commons.release.plugin.mojos</title> + <link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="style" /> + </head> + <body> + <div class="overview"> + <ul> + <li> + <a href="../../../../../../overview-summary.html">Overview</a> + </li> + <li class="selected">Package</li> + </ul> + </div> + <div class="framenoframe"> + <ul> + <li> + <a href="../../../../../../index.html" target="_top">FRAMES</a> + </li> + <li> + <a href="package-summary.html" target="_top">NO FRAMES</a> + </li> + </ul> + </div> + + <h2>Package org.apache.commons.release.plugin.mojos</h2> + + <table class="summary"> + <thead> + <tr> + <th>Class Summary</th> + </tr> + </thead> + <tbody> + <tr> + <td> + <a href="CommonsDistributionDetachmentMojoTest.html" target="classFrame">CommonsDistributionDetachmentMojoTest</a> + </td> + </tr> + <tr> + <td> + <a href="CommonsDistributionStagingMojoTest.html" target="classFrame">CommonsDistributionStagingMojoTest</a> + </td> + </tr> + <tr> + <td> + <a href="CommonsSiteCompressionMojoTest.html" target="classFrame">CommonsSiteCompressionMojoTest</a> + </td> + </tr> + </tbody> + </table> + + <div class="overview"> + <ul> + <li> + <a href="../../../../../../overview-summary.html">Overview</a> + </li> + <li class="selected">Package</li> + </ul> + </div> + <div class="framenoframe"> + <ul> + <li> + <a href="../../../../../../index.html" target="_top">FRAMES</a> + </li> + <li> + <a href="package-summary.html" target="_top">NO FRAMES</a> + </li> + </ul> + </div> + <hr /> + <div id="footer"> + Copyright © 2018 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved. + </div> + </body> +</html> \ No newline at end of file Added: websites/production/commons/content/proper/commons-release-plugin/xref-test/org/apache/commons/release/plugin/package-frame.html ============================================================================== --- websites/production/commons/content/proper/commons-release-plugin/xref-test/org/apache/commons/release/plugin/package-frame.html (added) +++ websites/production/commons/content/proper/commons-release-plugin/xref-test/org/apache/commons/release/plugin/package-frame.html Thu Jan 11 01:05:54 2018 @@ -0,0 +1,21 @@ + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xml:lang="en" lang="en"> + <head> + <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> + <title>Apache Commons Release Plugin 0.1-SNAPSHOT Reference Package org.apache.commons.release.plugin</title> + <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="style" /> + </head> + <body> + + <h3> + <a href="package-summary.html" target="classFrame">org.apache.commons.release.plugin</a> + </h3> + + <h3>Classes</h3> + + <ul> + </ul> + + </body> +</html> \ No newline at end of file Added: websites/production/commons/content/proper/commons-release-plugin/xref-test/org/apache/commons/release/plugin/package-summary.html ============================================================================== --- websites/production/commons/content/proper/commons-release-plugin/xref-test/org/apache/commons/release/plugin/package-summary.html (added) +++ websites/production/commons/content/proper/commons-release-plugin/xref-test/org/apache/commons/release/plugin/package-summary.html Thu Jan 11 01:05:54 2018 @@ -0,0 +1,64 @@ + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xml:lang="en" lang="en"> + <head> + <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> + <title>Apache Commons Release Plugin 0.1-SNAPSHOT Reference Package org.apache.commons.release.plugin</title> + <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="style" /> + </head> + <body> + <div class="overview"> + <ul> + <li> + <a href="../../../../../overview-summary.html">Overview</a> + </li> + <li class="selected">Package</li> + </ul> + </div> + <div class="framenoframe"> + <ul> + <li> + <a href="../../../../../index.html" target="_top">FRAMES</a> + </li> + <li> + <a href="package-summary.html" target="_top">NO FRAMES</a> + </li> + </ul> + </div> + + <h2>Package org.apache.commons.release.plugin</h2> + + <table class="summary"> + <thead> + <tr> + <th>Class Summary</th> + </tr> + </thead> + <tbody> + </tbody> + </table> + + <div class="overview"> + <ul> + <li> + <a href="../../../../../overview-summary.html">Overview</a> + </li> + <li class="selected">Package</li> + </ul> + </div> + <div class="framenoframe"> + <ul> + <li> + <a href="../../../../../index.html" target="_top">FRAMES</a> + </li> + <li> + <a href="package-summary.html" target="_top">NO FRAMES</a> + </li> + </ul> + </div> + <hr /> + <div id="footer"> + Copyright © 2018 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved. + </div> + </body> +</html> \ No newline at end of file Added: websites/production/commons/content/proper/commons-release-plugin/xref-test/org/apache/commons/release/plugin/stubs/DistributionDetachmentProjectStub.html ============================================================================== --- websites/production/commons/content/proper/commons-release-plugin/xref-test/org/apache/commons/release/plugin/stubs/DistributionDetachmentProjectStub.html (added) +++ websites/production/commons/content/proper/commons-release-plugin/xref-test/org/apache/commons/release/plugin/stubs/DistributionDetachmentProjectStub.html Thu Jan 11 01:05:54 2018 @@ -0,0 +1,109 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> +<head><meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> +<title>DistributionDetachmentProjectStub xref</title> +<link type="text/css" rel="stylesheet" href="../../../../../../stylesheet.css" /> +</head> +<body> +<div id="overview"><a href="../../../../../../../testapidocs/org/apache/commons/release/plugin/stubs/DistributionDetachmentProjectStub.html">View Javadoc</a></div><pre> +<a class="jxr_linenumber" name="L1" href="#L1">1</a> <em class="jxr_comment">/*</em> +<a class="jxr_linenumber" name="L2" href="#L2">2</a> <em class="jxr_comment"> * Licensed to the Apache Software Foundation (ASF) under one or more</em> +<a class="jxr_linenumber" name="L3" href="#L3">3</a> <em class="jxr_comment"> * contributor license agreements. See the NOTICE file distributed with</em> +<a class="jxr_linenumber" name="L4" href="#L4">4</a> <em class="jxr_comment"> * this work for additional information regarding copyright ownership.</em> +<a class="jxr_linenumber" name="L5" href="#L5">5</a> <em class="jxr_comment"> * The ASF licenses this file to You under the Apache License, Version 2.0</em> +<a class="jxr_linenumber" name="L6" href="#L6">6</a> <em class="jxr_comment"> * (the "License"); you may not use this file except in compliance with</em> +<a class="jxr_linenumber" name="L7" href="#L7">7</a> <em class="jxr_comment"> * the License. You may obtain a copy of the License at</em> +<a class="jxr_linenumber" name="L8" href="#L8">8</a> <em class="jxr_comment"> *</em> +<a class="jxr_linenumber" name="L9" href="#L9">9</a> <em class="jxr_comment"> * <a href="http://www.apache.org/licenses/LICENSE-2." target="alexandria_uri">http://www.apache.org/licenses/LICENSE-2.</a>0</em> +<a class="jxr_linenumber" name="L10" href="#L10">10</a> <em class="jxr_comment"> *</em> +<a class="jxr_linenumber" name="L11" href="#L11">11</a> <em class="jxr_comment"> * Unless required by applicable law or agreed to in writing, software</em> +<a class="jxr_linenumber" name="L12" href="#L12">12</a> <em class="jxr_comment"> * distributed under the License is distributed on an "AS IS" BASIS,</em> +<a class="jxr_linenumber" name="L13" href="#L13">13</a> <em class="jxr_comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</em> +<a class="jxr_linenumber" name="L14" href="#L14">14</a> <em class="jxr_comment"> * See the License for the specific language governing permissions and</em> +<a class="jxr_linenumber" name="L15" href="#L15">15</a> <em class="jxr_comment"> * limitations under the License.</em> +<a class="jxr_linenumber" name="L16" href="#L16">16</a> <em class="jxr_comment"> */</em> +<a class="jxr_linenumber" name="L17" href="#L17">17</a> <strong class="jxr_keyword">package</strong> org.apache.commons.release.plugin.stubs; +<a class="jxr_linenumber" name="L18" href="#L18">18</a> +<a class="jxr_linenumber" name="L19" href="#L19">19</a> <strong class="jxr_keyword">import</strong> org.apache.commons.release.plugin.mojos.CommonsDistributionDetachmentMojoTest; +<a class="jxr_linenumber" name="L20" href="#L20">20</a> <strong class="jxr_keyword">import</strong> org.apache.maven.artifact.Artifact; +<a class="jxr_linenumber" name="L21" href="#L21">21</a> <strong class="jxr_keyword">import</strong> org.apache.maven.plugin.testing.stubs.ArtifactStub; +<a class="jxr_linenumber" name="L22" href="#L22">22</a> <strong class="jxr_keyword">import</strong> org.apache.maven.plugin.testing.stubs.MavenProjectStub; +<a class="jxr_linenumber" name="L23" href="#L23">23</a> <strong class="jxr_keyword">import</strong> org.apache.maven.project.MavenProject; +<a class="jxr_linenumber" name="L24" href="#L24">24</a> +<a class="jxr_linenumber" name="L25" href="#L25">25</a> <strong class="jxr_keyword">import</strong> java.io.File; +<a class="jxr_linenumber" name="L26" href="#L26">26</a> <strong class="jxr_keyword">import</strong> java.util.ArrayList; +<a class="jxr_linenumber" name="L27" href="#L27">27</a> <strong class="jxr_keyword">import</strong> java.util.List; +<a class="jxr_linenumber" name="L28" href="#L28">28</a> +<a class="jxr_linenumber" name="L29" href="#L29">29</a> <em class="jxr_javadoccomment">/**</em> +<a class="jxr_linenumber" name="L30" href="#L30">30</a> <em class="jxr_javadoccomment"> * Stub for {@link MavenProject} for the {@link CommonsDistributionDetachmentMojoTest}. See the testing pom,</em> +<a class="jxr_linenumber" name="L31" href="#L31">31</a> <em class="jxr_javadoccomment"> * <code>src/test/resources/detach-distributions/detach-distributions.xml</code> for the declared usage of</em> +<a class="jxr_linenumber" name="L32" href="#L32">32</a> <em class="jxr_javadoccomment"> * this class.</em> +<a class="jxr_linenumber" name="L33" href="#L33">33</a> <em class="jxr_javadoccomment"> *</em> +<a class="jxr_linenumber" name="L34" href="#L34">34</a> <em class="jxr_javadoccomment"> * @author chtompki</em> +<a class="jxr_linenumber" name="L35" href="#L35">35</a> <em class="jxr_javadoccomment"> * @since 1.0</em> +<a class="jxr_linenumber" name="L36" href="#L36">36</a> <em class="jxr_javadoccomment"> */</em> +<a class="jxr_linenumber" name="L37" href="#L37">37</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">class</strong> <a href="../../../../../../org/apache/commons/release/plugin/stubs/DistributionDetachmentProjectStub.html">DistributionDetachmentProjectStub</a> <strong class="jxr_keyword">extends</strong> MavenProjectStub { +<a class="jxr_linenumber" name="L38" href="#L38">38</a> +<a class="jxr_linenumber" name="L39" href="#L39">39</a> <strong class="jxr_keyword">private</strong> List<Artifact> attachedArtifacts; +<a class="jxr_linenumber" name="L40" href="#L40">40</a> +<a class="jxr_linenumber" name="L41" href="#L41">41</a> @Override +<a class="jxr_linenumber" name="L42" href="#L42">42</a> <strong class="jxr_keyword">public</strong> List<Artifact> getAttachedArtifacts() { +<a class="jxr_linenumber" name="L43" href="#L43">43</a> attachedArtifacts = <strong class="jxr_keyword">new</strong> ArrayList<>(); +<a class="jxr_linenumber" name="L44" href="#L44">44</a> attachedArtifacts.add( +<a class="jxr_linenumber" name="L45" href="#L45">45</a> <strong class="jxr_keyword">new</strong> <a href="../../../../../../org/apache/commons/release/plugin/stubs/DistributionDetachmentProjectStub.html">DistributionDetatchmentArtifactStub</a>( +<a class="jxr_linenumber" name="L46" href="#L46">46</a> <strong class="jxr_keyword">new</strong> File(<span class="jxr_string">"src/test/resources/mojos/detach-distributions/target/mockAttachedFile.html"</span>), +<a class="jxr_linenumber" name="L47" href="#L47">47</a> <span class="jxr_string">"html"</span> +<a class="jxr_linenumber" name="L48" href="#L48">48</a> ) +<a class="jxr_linenumber" name="L49" href="#L49">49</a> ); +<a class="jxr_linenumber" name="L50" href="#L50">50</a> attachedArtifacts.add( +<a class="jxr_linenumber" name="L51" href="#L51">51</a> <strong class="jxr_keyword">new</strong> <a href="../../../../../../org/apache/commons/release/plugin/stubs/DistributionDetachmentProjectStub.html">DistributionDetatchmentArtifactStub</a>( +<a class="jxr_linenumber" name="L52" href="#L52">52</a> <strong class="jxr_keyword">new</strong> File(<span class="jxr_string">"src/test/resources/mojos/detach-distributions/target/mockAttachedTar.tar.gz"</span>), +<a class="jxr_linenumber" name="L53" href="#L53">53</a> <span class="jxr_string">"tar.gz"</span> +<a class="jxr_linenumber" name="L54" href="#L54">54</a> ) +<a class="jxr_linenumber" name="L55" href="#L55">55</a> ); +<a class="jxr_linenumber" name="L56" href="#L56">56</a> attachedArtifacts.add( +<a class="jxr_linenumber" name="L57" href="#L57">57</a> <strong class="jxr_keyword">new</strong> <a href="../../../../../../org/apache/commons/release/plugin/stubs/DistributionDetachmentProjectStub.html">DistributionDetatchmentArtifactStub</a>( +<a class="jxr_linenumber" name="L58" href="#L58">58</a> <strong class="jxr_keyword">new</strong> File(<span class="jxr_string">"src/test/resources/mojos/detach-distributions/target/mockAttachedTar.tar.gz.asc"</span>), +<a class="jxr_linenumber" name="L59" href="#L59">59</a> <span class="jxr_string">"tar.gz.asc"</span> +<a class="jxr_linenumber" name="L60" href="#L60">60</a> ) +<a class="jxr_linenumber" name="L61" href="#L61">61</a> ); +<a class="jxr_linenumber" name="L62" href="#L62">62</a> attachedArtifacts.add( +<a class="jxr_linenumber" name="L63" href="#L63">63</a> <strong class="jxr_keyword">new</strong> <a href="../../../../../../org/apache/commons/release/plugin/stubs/DistributionDetachmentProjectStub.html">DistributionDetatchmentArtifactStub</a>( +<a class="jxr_linenumber" name="L64" href="#L64">64</a> <strong class="jxr_keyword">new</strong> File(<span class="jxr_string">"src/test/resources/mojos/detach-distributions/target/mockAttachedZip.zip"</span>), +<a class="jxr_linenumber" name="L65" href="#L65">65</a> <span class="jxr_string">"zip"</span> +<a class="jxr_linenumber" name="L66" href="#L66">66</a> ) +<a class="jxr_linenumber" name="L67" href="#L67">67</a> ); +<a class="jxr_linenumber" name="L68" href="#L68">68</a> attachedArtifacts.add( +<a class="jxr_linenumber" name="L69" href="#L69">69</a> <strong class="jxr_keyword">new</strong> <a href="../../../../../../org/apache/commons/release/plugin/stubs/DistributionDetachmentProjectStub.html">DistributionDetatchmentArtifactStub</a>( +<a class="jxr_linenumber" name="L70" href="#L70">70</a> <strong class="jxr_keyword">new</strong> File(<span class="jxr_string">"src/test/resources/mojos/detach-distributions/target/mockAttachedZip.zip.asc"</span>), +<a class="jxr_linenumber" name="L71" href="#L71">71</a> <span class="jxr_string">"zip.asc"</span> +<a class="jxr_linenumber" name="L72" href="#L72">72</a> ) +<a class="jxr_linenumber" name="L73" href="#L73">73</a> ); +<a class="jxr_linenumber" name="L74" href="#L74">74</a> <strong class="jxr_keyword">return</strong> attachedArtifacts; +<a class="jxr_linenumber" name="L75" href="#L75">75</a> } +<a class="jxr_linenumber" name="L76" href="#L76">76</a> +<a class="jxr_linenumber" name="L77" href="#L77">77</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">class</strong> <a href="../../../../../../org/apache/commons/release/plugin/stubs/DistributionDetachmentProjectStub.html">DistributionDetatchmentArtifactStub</a> <strong class="jxr_keyword">extends</strong> ArtifactStub { +<a class="jxr_linenumber" name="L78" href="#L78">78</a> +<a class="jxr_linenumber" name="L79" href="#L79">79</a> <strong class="jxr_keyword">private</strong> File artifact; +<a class="jxr_linenumber" name="L80" href="#L80">80</a> +<a class="jxr_linenumber" name="L81" href="#L81">81</a> <strong class="jxr_keyword">private</strong> String type; +<a class="jxr_linenumber" name="L82" href="#L82">82</a> +<a class="jxr_linenumber" name="L83" href="#L83">83</a> <strong class="jxr_keyword">public</strong> <a href="../../../../../../org/apache/commons/release/plugin/stubs/DistributionDetachmentProjectStub.html">DistributionDetatchmentArtifactStub</a>(File file, String type) { +<a class="jxr_linenumber" name="L84" href="#L84">84</a> <strong class="jxr_keyword">this</strong>.artifact = file; +<a class="jxr_linenumber" name="L85" href="#L85">85</a> <strong class="jxr_keyword">this</strong>.type = type; +<a class="jxr_linenumber" name="L86" href="#L86">86</a> } +<a class="jxr_linenumber" name="L87" href="#L87">87</a> +<a class="jxr_linenumber" name="L88" href="#L88">88</a> <strong class="jxr_keyword">public</strong> File getFile() { +<a class="jxr_linenumber" name="L89" href="#L89">89</a> <strong class="jxr_keyword">return</strong> <strong class="jxr_keyword">this</strong>.artifact; +<a class="jxr_linenumber" name="L90" href="#L90">90</a> } +<a class="jxr_linenumber" name="L91" href="#L91">91</a> +<a class="jxr_linenumber" name="L92" href="#L92">92</a> <strong class="jxr_keyword">public</strong> String getType() { +<a class="jxr_linenumber" name="L93" href="#L93">93</a> <strong class="jxr_keyword">return</strong> <strong class="jxr_keyword">this</strong>.type; +<a class="jxr_linenumber" name="L94" href="#L94">94</a> } +<a class="jxr_linenumber" name="L95" href="#L95">95</a> } +<a class="jxr_linenumber" name="L96" href="#L96">96</a> } +</pre> +<hr/> +<div id="footer">Copyright © 2018 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</div> +</body> +</html> \ No newline at end of file Added: websites/production/commons/content/proper/commons-release-plugin/xref-test/org/apache/commons/release/plugin/stubs/package-frame.html ============================================================================== --- websites/production/commons/content/proper/commons-release-plugin/xref-test/org/apache/commons/release/plugin/stubs/package-frame.html (added) +++ websites/production/commons/content/proper/commons-release-plugin/xref-test/org/apache/commons/release/plugin/stubs/package-frame.html Thu Jan 11 01:05:54 2018 @@ -0,0 +1,27 @@ + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xml:lang="en" lang="en"> + <head> + <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> + <title>Apache Commons Release Plugin 0.1-SNAPSHOT Reference Package org.apache.commons.release.plugin.stubs</title> + <link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="style" /> + </head> + <body> + + <h3> + <a href="package-summary.html" target="classFrame">org.apache.commons.release.plugin.stubs</a> + </h3> + + <h3>Classes</h3> + + <ul> + <li> + <a href="DistributionDetachmentProjectStub.html" target="classFrame">DistributionDetachmentProjectStub</a> + </li> + <li> + <a href="DistributionDetachmentProjectStub.html" target="classFrame">DistributionDetatchmentArtifactStub</a> + </li> + </ul> + + </body> +</html> \ No newline at end of file Added: websites/production/commons/content/proper/commons-release-plugin/xref-test/org/apache/commons/release/plugin/stubs/package-summary.html ============================================================================== --- websites/production/commons/content/proper/commons-release-plugin/xref-test/org/apache/commons/release/plugin/stubs/package-summary.html (added) +++ websites/production/commons/content/proper/commons-release-plugin/xref-test/org/apache/commons/release/plugin/stubs/package-summary.html Thu Jan 11 01:05:54 2018 @@ -0,0 +1,74 @@ + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xml:lang="en" lang="en"> + <head> + <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> + <title>Apache Commons Release Plugin 0.1-SNAPSHOT Reference Package org.apache.commons.release.plugin.stubs</title> + <link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="style" /> + </head> + <body> + <div class="overview"> + <ul> + <li> + <a href="../../../../../../overview-summary.html">Overview</a> + </li> + <li class="selected">Package</li> + </ul> + </div> + <div class="framenoframe"> + <ul> + <li> + <a href="../../../../../../index.html" target="_top">FRAMES</a> + </li> + <li> + <a href="package-summary.html" target="_top">NO FRAMES</a> + </li> + </ul> + </div> + + <h2>Package org.apache.commons.release.plugin.stubs</h2> + + <table class="summary"> + <thead> + <tr> + <th>Class Summary</th> + </tr> + </thead> + <tbody> + <tr> + <td> + <a href="DistributionDetachmentProjectStub.html" target="classFrame">DistributionDetachmentProjectStub</a> + </td> + </tr> + <tr> + <td> + <a href="DistributionDetachmentProjectStub.html" target="classFrame">DistributionDetatchmentArtifactStub</a> + </td> + </tr> + </tbody> + </table> + + <div class="overview"> + <ul> + <li> + <a href="../../../../../../overview-summary.html">Overview</a> + </li> + <li class="selected">Package</li> + </ul> + </div> + <div class="framenoframe"> + <ul> + <li> + <a href="../../../../../../index.html" target="_top">FRAMES</a> + </li> + <li> + <a href="package-summary.html" target="_top">NO FRAMES</a> + </li> + </ul> + </div> + <hr /> + <div id="footer"> + Copyright © 2018 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved. + </div> + </body> +</html> \ No newline at end of file Added: websites/production/commons/content/proper/commons-release-plugin/xref-test/overview-frame.html ============================================================================== --- websites/production/commons/content/proper/commons-release-plugin/xref-test/overview-frame.html (added) +++ websites/production/commons/content/proper/commons-release-plugin/xref-test/overview-frame.html Thu Jan 11 01:05:54 2018 @@ -0,0 +1,30 @@ + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xml:lang="en" lang="en"> + <head> + <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> + <title>Apache Commons Release Plugin 0.1-SNAPSHOT Reference</title> + <link rel="stylesheet" type="text/css" href="stylesheet.css" title="style" /> + </head> + <body> + + <h3> + <a href="allclasses-frame.html" target="packageFrame">All Classes</a> + </h3> + + <h3>Packages</h3> + + <ul> + <li> + <a href="org/apache/commons/release/plugin/package-frame.html" target="packageFrame">org.apache.commons.release.plugin</a> + </li> + <li> + <a href="org/apache/commons/release/plugin/mojos/package-frame.html" target="packageFrame">org.apache.commons.release.plugin.mojos</a> + </li> + <li> + <a href="org/apache/commons/release/plugin/stubs/package-frame.html" target="packageFrame">org.apache.commons.release.plugin.stubs</a> + </li> + </ul> + + </body> +</html> Added: websites/production/commons/content/proper/commons-release-plugin/xref-test/overview-summary.html ============================================================================== --- websites/production/commons/content/proper/commons-release-plugin/xref-test/overview-summary.html (added) +++ websites/production/commons/content/proper/commons-release-plugin/xref-test/overview-summary.html Thu Jan 11 01:05:54 2018 @@ -0,0 +1,76 @@ + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xml:lang="en" lang="en"> + <head> + <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> + <title>Apache Commons Release Plugin 0.1-SNAPSHOT Reference</title> + <link rel="stylesheet" type="text/css" href="stylesheet.css" title="style" /> + </head> + <body> + <div class="overview"> + <ul> + <li class="selected">Overview</li> + <li>Package</li> + </ul> + </div> + <div class="framenoframe"> + <ul> + <li> + <a href="index.html" target="_top">FRAMES</a> + </li> + <li> + <a href="overview-summary.html" target="_top">NO FRAMES</a> + </li> + </ul> + </div> + + <h2>Apache Commons Release Plugin 0.1-SNAPSHOT Reference</h2> + + <table class="summary"> + <thead> + <tr> + <th>Packages</th> + </tr> + </thead> + <tbody> + <tr> + <td> + <a href="org/apache/commons/release/plugin/package-summary.html">org.apache.commons.release.plugin</a> + </td> + </tr> + <tr> + <td> + <a href="org/apache/commons/release/plugin/mojos/package-summary.html">org.apache.commons.release.plugin.mojos</a> + </td> + </tr> + <tr> + <td> + <a href="org/apache/commons/release/plugin/stubs/package-summary.html">org.apache.commons.release.plugin.stubs</a> + </td> + </tr> + </tbody> + </table> + + <div class="overview"> + <ul> + <li class="selected">Overview</li> + <li>Package</li> + </ul> + </div> + <div class="framenoframe"> + <ul> + <li> + <a href="index.html" target="_top">FRAMES</a> + </li> + <li> + <a href="overview-summary.html" target="_top">NO FRAMES</a> + </li> + </ul> + </div> + + <hr /> + <div id="footer"> + Copyright © 2018 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved. + </div> + </body> +</html> \ No newline at end of file Added: websites/production/commons/content/proper/commons-release-plugin/xref-test/stylesheet.css ============================================================================== --- websites/production/commons/content/proper/commons-release-plugin/xref-test/stylesheet.css (added) +++ websites/production/commons/content/proper/commons-release-plugin/xref-test/stylesheet.css Thu Jan 11 01:05:54 2018 @@ -0,0 +1,114 @@ +/* Javadoc style sheet */ +/* Define colors, fonts and other style attributes here to override the defaults */ +body { + background-color: #fff; + font-family: Arial, Helvetica, sans-serif; +} + +a:link { + color: #00f; +} +a:visited { + color: #00a; +} + +a:active, a:hover { + color: #f30 !important; +} + +ul, li { + list-style-type:none; + margin:0; + padding:0; +} + +table td { + padding: 3px; + border: 1px solid #000; +} +table { + width:100%; + border: 1px solid #000; + border-collapse: collapse; +} + +div.overview { + background-color:#ddd; + padding: 4px 4px 4px 0; +} +div.overview li, div.framenoframe li { + display: inline; +} +div.framenoframe { + text-align: center; + font-size: x-small; +} +div.framenoframe li { + margin: 0 3px 0 3px; +} +div.overview li { + margin:3px 3px 0 3px; + padding: 4px; +} +li.selected { + background-color:#888; + color: #fff; + font-weight: bold; +} + +table.summary { + margin-bottom: 20px; +} +table.summary td, table.summary th { + font-weight: bold; + text-align: left; + padding: 3px; +} +table.summary th { + background-color:#036; + color: #fff; +} +table.summary td { + background-color:#eee; + border: 1px solid black; +} + +em { + color: #A00; +} +em.comment { + color: #390; +} +.string { + color: #009; +} + +#overview { + padding:2px; +} + +hr { + height: 1px; + color: #000; +} + +/* JXR style sheet */ +.jxr_comment +{ + color: #390; +} + +.jxr_javadoccomment +{ + color: #A00; +} + +.jxr_string +{ + color: #009; +} + +.jxr_keyword +{ + color: #000; +} \ No newline at end of file Added: websites/production/commons/content/proper/commons-release-plugin/xref/allclasses-frame.html ============================================================================== --- websites/production/commons/content/proper/commons-release-plugin/xref/allclasses-frame.html (added) +++ websites/production/commons/content/proper/commons-release-plugin/xref/allclasses-frame.html Thu Jan 11 01:05:54 2018 @@ -0,0 +1,29 @@ + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xml:lang="en" lang="en"> + <head> + <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> + <title>All Classes</title> + <link rel="stylesheet" type="text/css" href="stylesheet.css" title="style" /> + </head> + <body> + + <h3>All Classes</h3> + + <ul> + <li> + <a href="org/apache/commons/release/plugin/mojos/CommonsDistributionDetachmentMojo.html" target="classFrame">CommonsDistributionDetachmentMojo</a> + </li> + <li> + <a href="org/apache/commons/release/plugin/mojos/CommonsDistributionStagingMojo.html" target="classFrame">CommonsDistributionStagingMojo</a> + </li> + <li> + <a href="org/apache/commons/release/plugin/mojos/CommonsSiteCompressionMojo.html" target="classFrame">CommonsSiteCompressionMojo</a> + </li> + <li> + <a href="org/apache/commons/release/plugin/SharedFunctions.html" target="classFrame">SharedFunctions</a> + </li> + </ul> + + </body> + </html> \ No newline at end of file Added: websites/production/commons/content/proper/commons-release-plugin/xref/index.html ============================================================================== --- websites/production/commons/content/proper/commons-release-plugin/xref/index.html (added) +++ websites/production/commons/content/proper/commons-release-plugin/xref/index.html Thu Jan 11 01:05:54 2018 @@ -0,0 +1,24 @@ + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"> +<html xml:lang="en" lang="en"> +<!-- this is a JXR report set --> + <head> + <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> + <title>Apache Commons Release Plugin 0.1-SNAPSHOT Reference</title> + </head> + <frameset cols="20%,80%"> + <frameset rows="30%,70%"> + <frame src="overview-frame.html" name="packageListFrame" /> + <frame src="allclasses-frame.html" name="packageFrame" /> + </frameset> + <frame src="overview-summary.html" name="classFrame" /> + <noframes> + <body> + <h1>Frame Alert</h1> + <p> + You don't have frames. Go <a href="overview-summary.html">here</a> + </p> + </body> + </noframes> + </frameset> +</html> Added: websites/production/commons/content/proper/commons-release-plugin/xref/org/apache/commons/release/plugin/SharedFunctions.html ============================================================================== --- websites/production/commons/content/proper/commons-release-plugin/xref/org/apache/commons/release/plugin/SharedFunctions.html (added) +++ websites/production/commons/content/proper/commons-release-plugin/xref/org/apache/commons/release/plugin/SharedFunctions.html Thu Jan 11 01:05:54 2018 @@ -0,0 +1,112 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> +<head><meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> +<title>SharedFunctions xref</title> +<link type="text/css" rel="stylesheet" href="../../../../../stylesheet.css" /> +</head> +<body> +<div id="overview"><a href="../../../../../../apidocs/org/apache/commons/release/plugin/SharedFunctions.html">View Javadoc</a></div><pre> +<a class="jxr_linenumber" name="L1" href="#L1">1</a> <em class="jxr_comment">/*</em> +<a class="jxr_linenumber" name="L2" href="#L2">2</a> <em class="jxr_comment"> * Licensed to the Apache Software Foundation (ASF) under one or more</em> +<a class="jxr_linenumber" name="L3" href="#L3">3</a> <em class="jxr_comment"> * contributor license agreements. See the NOTICE file distributed with</em> +<a class="jxr_linenumber" name="L4" href="#L4">4</a> <em class="jxr_comment"> * this work for additional information regarding copyright ownership.</em> +<a class="jxr_linenumber" name="L5" href="#L5">5</a> <em class="jxr_comment"> * The ASF licenses this file to You under the Apache License, Version 2.0</em> +<a class="jxr_linenumber" name="L6" href="#L6">6</a> <em class="jxr_comment"> * (the "License"); you may not use this file except in compliance with</em> +<a class="jxr_linenumber" name="L7" href="#L7">7</a> <em class="jxr_comment"> * the License. You may obtain a copy of the License at</em> +<a class="jxr_linenumber" name="L8" href="#L8">8</a> <em class="jxr_comment"> *</em> +<a class="jxr_linenumber" name="L9" href="#L9">9</a> <em class="jxr_comment"> * <a href="http://www.apache.org/licenses/LICENSE-2." target="alexandria_uri">http://www.apache.org/licenses/LICENSE-2.</a>0</em> +<a class="jxr_linenumber" name="L10" href="#L10">10</a> <em class="jxr_comment"> *</em> +<a class="jxr_linenumber" name="L11" href="#L11">11</a> <em class="jxr_comment"> * Unless required by applicable law or agreed to in writing, software</em> +<a class="jxr_linenumber" name="L12" href="#L12">12</a> <em class="jxr_comment"> * distributed under the License is distributed on an "AS IS" BASIS,</em> +<a class="jxr_linenumber" name="L13" href="#L13">13</a> <em class="jxr_comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</em> +<a class="jxr_linenumber" name="L14" href="#L14">14</a> <em class="jxr_comment"> * See the License for the specific language governing permissions and</em> +<a class="jxr_linenumber" name="L15" href="#L15">15</a> <em class="jxr_comment"> * limitations under the License.</em> +<a class="jxr_linenumber" name="L16" href="#L16">16</a> <em class="jxr_comment"> */</em> +<a class="jxr_linenumber" name="L17" href="#L17">17</a> <strong class="jxr_keyword">package</strong> org.apache.commons.release.plugin; +<a class="jxr_linenumber" name="L18" href="#L18">18</a> +<a class="jxr_linenumber" name="L19" href="#L19">19</a> <strong class="jxr_keyword">import</strong> org.apache.maven.plugin.MojoExecutionException; +<a class="jxr_linenumber" name="L20" href="#L20">20</a> <strong class="jxr_keyword">import</strong> org.apache.maven.plugin.logging.Log; +<a class="jxr_linenumber" name="L21" href="#L21">21</a> <strong class="jxr_keyword">import</strong> org.codehaus.plexus.util.FileUtils; +<a class="jxr_linenumber" name="L22" href="#L22">22</a> +<a class="jxr_linenumber" name="L23" href="#L23">23</a> <strong class="jxr_keyword">import</strong> java.io.File; +<a class="jxr_linenumber" name="L24" href="#L24">24</a> <strong class="jxr_keyword">import</strong> java.io.FileInputStream; +<a class="jxr_linenumber" name="L25" href="#L25">25</a> <strong class="jxr_keyword">import</strong> java.io.FileOutputStream; +<a class="jxr_linenumber" name="L26" href="#L26">26</a> <strong class="jxr_keyword">import</strong> java.io.IOException; +<a class="jxr_linenumber" name="L27" href="#L27">27</a> +<a class="jxr_linenumber" name="L28" href="#L28">28</a> <em class="jxr_javadoccomment">/**</em> +<a class="jxr_linenumber" name="L29" href="#L29">29</a> <em class="jxr_javadoccomment"> * Shared static functions for all of our Mojos.</em> +<a class="jxr_linenumber" name="L30" href="#L30">30</a> <em class="jxr_javadoccomment"> *</em> +<a class="jxr_linenumber" name="L31" href="#L31">31</a> <em class="jxr_javadoccomment"> * @author chtompki</em> +<a class="jxr_linenumber" name="L32" href="#L32">32</a> <em class="jxr_javadoccomment"> * @since 1.0</em> +<a class="jxr_linenumber" name="L33" href="#L33">33</a> <em class="jxr_javadoccomment"> */</em> +<a class="jxr_linenumber" name="L34" href="#L34">34</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">class</strong> <a href="../../../../../org/apache/commons/release/plugin/SharedFunctions.html">SharedFunctions</a> { +<a class="jxr_linenumber" name="L35" href="#L35">35</a> +<a class="jxr_linenumber" name="L36" href="#L36">36</a> <em class="jxr_javadoccomment">/**</em> +<a class="jxr_linenumber" name="L37" href="#L37">37</a> <em class="jxr_javadoccomment"> * I want a buffer that is an array with 1024 elements of bytes. We declare</em> +<a class="jxr_linenumber" name="L38" href="#L38">38</a> <em class="jxr_javadoccomment"> * the constant here for the sake of making the code more readable.</em> +<a class="jxr_linenumber" name="L39" href="#L39">39</a> <em class="jxr_javadoccomment"> */</em> +<a class="jxr_linenumber" name="L40" href="#L40">40</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">int</strong> BUFFER_BYTE_SIZE = 1024; +<a class="jxr_linenumber" name="L41" href="#L41">41</a> +<a class="jxr_linenumber" name="L42" href="#L42">42</a> <em class="jxr_javadoccomment">/**</em> +<a class="jxr_linenumber" name="L43" href="#L43">43</a> <em class="jxr_javadoccomment"> * Making the constructor private because the class only contains static methods.</em> +<a class="jxr_linenumber" name="L44" href="#L44">44</a> <em class="jxr_javadoccomment"> */</em> +<a class="jxr_linenumber" name="L45" href="#L45">45</a> <strong class="jxr_keyword">private</strong> <a href="../../../../../org/apache/commons/release/plugin/SharedFunctions.html">SharedFunctions</a>() { +<a class="jxr_linenumber" name="L46" href="#L46">46</a> <em class="jxr_comment">//Uitility Class</em> +<a class="jxr_linenumber" name="L47" href="#L47">47</a> } +<a class="jxr_linenumber" name="L48" href="#L48">48</a> +<a class="jxr_linenumber" name="L49" href="#L49">49</a> <em class="jxr_javadoccomment">/**</em> +<a class="jxr_linenumber" name="L50" href="#L50">50</a> <em class="jxr_javadoccomment"> * Cleans and then initializes an empty directory that is given by the <code>workingDirectory</code></em> +<a class="jxr_linenumber" name="L51" href="#L51">51</a> <em class="jxr_javadoccomment"> * parameter.</em> +<a class="jxr_linenumber" name="L52" href="#L52">52</a> <em class="jxr_javadoccomment"> *</em> +<a class="jxr_linenumber" name="L53" href="#L53">53</a> <em class="jxr_javadoccomment"> * @param log is the maven log for output logging, particularly in regards to error management.</em> +<a class="jxr_linenumber" name="L54" href="#L54">54</a> <em class="jxr_javadoccomment"> * @param workingDirectory is a {@link File} that represents the directory to first attempt to delete then create.</em> +<a class="jxr_linenumber" name="L55" href="#L55">55</a> <em class="jxr_javadoccomment"> * @throws MojoExecutionException when an {@link IOException} occurrs for the purpose of bubbling the exception</em> +<a class="jxr_linenumber" name="L56" href="#L56">56</a> <em class="jxr_javadoccomment"> * up to maven properly.</em> +<a class="jxr_linenumber" name="L57" href="#L57">57</a> <em class="jxr_javadoccomment"> */</em> +<a class="jxr_linenumber" name="L58" href="#L58">58</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">void</strong> initDirectory(Log log, File workingDirectory) <strong class="jxr_keyword">throws</strong> MojoExecutionException { +<a class="jxr_linenumber" name="L59" href="#L59">59</a> <strong class="jxr_keyword">if</strong> (workingDirectory.exists()) { +<a class="jxr_linenumber" name="L60" href="#L60">60</a> <strong class="jxr_keyword">try</strong> { +<a class="jxr_linenumber" name="L61" href="#L61">61</a> FileUtils.deleteDirectory(workingDirectory); +<a class="jxr_linenumber" name="L62" href="#L62">62</a> } <strong class="jxr_keyword">catch</strong> (IOException e) { +<a class="jxr_linenumber" name="L63" href="#L63">63</a> log.error(e.getMessage()); +<a class="jxr_linenumber" name="L64" href="#L64">64</a> <strong class="jxr_keyword">throw</strong> <strong class="jxr_keyword">new</strong> MojoExecutionException(<span class="jxr_string">"Unable to remove directory: "</span> + e.getMessage(), e); +<a class="jxr_linenumber" name="L65" href="#L65">65</a> } +<a class="jxr_linenumber" name="L66" href="#L66">66</a> } +<a class="jxr_linenumber" name="L67" href="#L67">67</a> <strong class="jxr_keyword">if</strong> (!workingDirectory.exists()) { +<a class="jxr_linenumber" name="L68" href="#L68">68</a> workingDirectory.mkdirs(); +<a class="jxr_linenumber" name="L69" href="#L69">69</a> } +<a class="jxr_linenumber" name="L70" href="#L70">70</a> } +<a class="jxr_linenumber" name="L71" href="#L71">71</a> +<a class="jxr_linenumber" name="L72" href="#L72">72</a> <em class="jxr_javadoccomment">/**</em> +<a class="jxr_linenumber" name="L73" href="#L73">73</a> <em class="jxr_javadoccomment"> * Copies a {@link File} from the <code>fromfile</code> to the <code>tofile</code> and logs the failure</em> +<a class="jxr_linenumber" name="L74" href="#L74">74</a> <em class="jxr_javadoccomment"> * using the maven {@link Log}.</em> +<a class="jxr_linenumber" name="L75" href="#L75">75</a> <em class="jxr_javadoccomment"> *</em> +<a class="jxr_linenumber" name="L76" href="#L76">76</a> <em class="jxr_javadoccomment"> * @param log the {@link Log}, the maven logger.</em> +<a class="jxr_linenumber" name="L77" href="#L77">77</a> <em class="jxr_javadoccomment"> * @param fromFile the {@link File} from which to copy.</em> +<a class="jxr_linenumber" name="L78" href="#L78">78</a> <em class="jxr_javadoccomment"> * @param toFile the {@link File} to which to copy into.</em> +<a class="jxr_linenumber" name="L79" href="#L79">79</a> <em class="jxr_javadoccomment"> * @throws MojoExecutionException if an {@link IOException} occurs.</em> +<a class="jxr_linenumber" name="L80" href="#L80">80</a> <em class="jxr_javadoccomment"> */</em> +<a class="jxr_linenumber" name="L81" href="#L81">81</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">void</strong> copyFile(Log log, File fromFile, File toFile) <strong class="jxr_keyword">throws</strong> MojoExecutionException { +<a class="jxr_linenumber" name="L82" href="#L82">82</a> FileInputStream in; +<a class="jxr_linenumber" name="L83" href="#L83">83</a> FileOutputStream out; +<a class="jxr_linenumber" name="L84" href="#L84">84</a> <strong class="jxr_keyword">try</strong> { +<a class="jxr_linenumber" name="L85" href="#L85">85</a> in = <strong class="jxr_keyword">new</strong> FileInputStream(fromFile); +<a class="jxr_linenumber" name="L86" href="#L86">86</a> out = <strong class="jxr_keyword">new</strong> FileOutputStream(toFile); +<a class="jxr_linenumber" name="L87" href="#L87">87</a> byte[] buf = <strong class="jxr_keyword">new</strong> byte[BUFFER_BYTE_SIZE]; +<a class="jxr_linenumber" name="L88" href="#L88">88</a> <strong class="jxr_keyword">int</strong> len; +<a class="jxr_linenumber" name="L89" href="#L89">89</a> <strong class="jxr_keyword">while</strong> ((len = in.read(buf)) > 0) { +<a class="jxr_linenumber" name="L90" href="#L90">90</a> out.write(buf, 0, len); +<a class="jxr_linenumber" name="L91" href="#L91">91</a> } +<a class="jxr_linenumber" name="L92" href="#L92">92</a> in.close(); +<a class="jxr_linenumber" name="L93" href="#L93">93</a> out.close(); +<a class="jxr_linenumber" name="L94" href="#L94">94</a> } <strong class="jxr_keyword">catch</strong> (IOException e) { +<a class="jxr_linenumber" name="L95" href="#L95">95</a> log.error(e.getMessage()); +<a class="jxr_linenumber" name="L96" href="#L96">96</a> <strong class="jxr_keyword">throw</strong> <strong class="jxr_keyword">new</strong> MojoExecutionException(<span class="jxr_string">"Unable to copy file: "</span> + e.getMessage(), e); +<a class="jxr_linenumber" name="L97" href="#L97">97</a> } +<a class="jxr_linenumber" name="L98" href="#L98">98</a> } +<a class="jxr_linenumber" name="L99" href="#L99">99</a> } +</pre> +<hr/> +<div id="footer">Copyright © 2018 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</div> +</body> +</html> \ No newline at end of file
