Added:
maven/website/components/plugins-archives/maven-jarsigner-plugin-LATEST/jacoco/org.apache.maven.plugins.maven_jarsigner_plugin/HelpMojo.html
==============================================================================
---
maven/website/components/plugins-archives/maven-jarsigner-plugin-LATEST/jacoco/org.apache.maven.plugins.maven_jarsigner_plugin/HelpMojo.html
(added)
+++
maven/website/components/plugins-archives/maven-jarsigner-plugin-LATEST/jacoco/org.apache.maven.plugins.maven_jarsigner_plugin/HelpMojo.html
Tue Sep 3 16:39:49 2024
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><!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>HelpMojo</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 Maven Jarsigner Plugin</a> > <a href="index.html"
class="el_package">org.apache.maven.plugins.maven_jarsigner_plugin</a> >
<span class="el_class">HelpMojo</span></div><h1>HelpMojo</h1><table
class="coverage" cellspacing="0" id="cov
eragetable"><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">864 of 864</td><td class="ctr2">0%</td><td class="bar">112 of
112</td><td class="ctr2">0%</td><td class="ctr1">72</td><td cl
ass="ctr2">72</td><td class="ctr1">156</td><td class="ctr2">156</td><td
class="ctr1">16</td><td class="ctr2">16</td></tr></tfoot><tbody><tr><td
id="a2"><a href="HelpMojo.java.html#L100"
class="el_method">execute()</a></td><td class="bar" id="b0"><img
src="../jacoco-resources/redbar.gif" width="120" height="10" title="178"
alt="178"/></td><td class="ctr2" id="c0">0%</td><td class="bar" id="d0"><img
src="../jacoco-resources/redbar.gif" width="120" height="10" title="20"
alt="20"/></td><td class="ctr2" id="e0">0%</td><td class="ctr1"
id="f0">11</td><td class="ctr2" id="g0">11</td><td class="ctr1"
id="h0">31</td><td class="ctr2" id="i0">31</td><td class="ctr1"
id="j0">1</td><td class="ctr2" id="k0">1</td></tr><tr><td id="a14"><a
href="HelpMojo.java.html#L222" class="el_method">writeGoal(StringBuilder,
String, Element)</a></td><td class="bar" id="b1"><img
src="../jacoco-resources/redbar.gif" width="86" height="10" title="129"
alt="129"/></td><td class="ctr2" id="c1">0%</td><td class="bar
" id="d1"><img src="../jacoco-resources/redbar.gif" width="120" height="10"
title="20" alt="20"/></td><td class="ctr2" id="e1">0%</td><td class="ctr1"
id="f1">11</td><td class="ctr2" id="g1">11</td><td class="ctr1"
id="h1">23</td><td class="ctr2" id="i1">23</td><td class="ctr1"
id="j1">1</td><td class="ctr2" id="k1">1</td></tr><tr><td id="a15"><a
href="HelpMojo.java.html#L262" class="el_method">writeParameter(StringBuilder,
Node, Node)</a></td><td class="bar" id="b2"><img
src="../jacoco-resources/redbar.gif" width="84" height="10" title="125"
alt="125"/></td><td class="ctr2" id="c2">0%</td><td class="bar" id="d2"><img
src="../jacoco-resources/redbar.gif" width="108" height="10" title="18"
alt="18"/></td><td class="ctr2" id="e2">0%</td><td class="ctr1"
id="f2">10</td><td class="ctr2" id="g2">10</td><td class="ctr1"
id="h2">22</td><td class="ctr2" id="i2">22</td><td class="ctr1"
id="j2">1</td><td class="ctr2" id="k2">1</td></tr><tr><td id="a12"><a
href="HelpMojo.java.html#L372" class=
"el_method">toLines(List, String, int, int)</a></td><td class="bar"
id="b3"><img src="../jacoco-resources/redbar.gif" width="70" height="10"
title="104" alt="104"/></td><td class="ctr2" id="c3">0%</td><td class="bar"
id="d3"><img src="../jacoco-resources/redbar.gif" width="72" height="10"
title="12" alt="12"/></td><td class="ctr2" id="e3">0%</td><td class="ctr1"
id="f3">7</td><td class="ctr2" id="g3">7</td><td class="ctr1"
id="h3">19</td><td class="ctr2" id="i3">19</td><td class="ctr1"
id="j3">1</td><td class="ctr2" id="k3">1</td></tr><tr><td id="a1"><a
href="HelpMojo.java.html#L68" class="el_method">build()</a></td><td class="bar"
id="b4"><img src="../jacoco-resources/redbar.gif" width="34" height="10"
title="51" alt="51"/></td><td class="ctr2" id="c4">0%</td><td class="bar"
id="d10"><img src="../jacoco-resources/redbar.gif" width="12" height="10"
title="2" alt="2"/></td><td class="ctr2" id="e4">0%</td><td class="ctr1"
id="f10">2</td><td class="ctr2" id="g10">2</td><td class="ctr1"
id="h4">13</td><td class="ctr2" id="i4">13</td><td class="ctr1"
id="j4">1</td><td class="ctr2" id="k4">1</td></tr><tr><td id="a7"><a
href="HelpMojo.java.html#L177" class="el_method">getSingleChild(Node,
String)</a></td><td class="bar" id="b5"><img
src="../jacoco-resources/redbar.gif" width="29" height="10" title="44"
alt="44"/></td><td class="ctr2" id="c5">0%</td><td class="bar" id="d6"><img
src="../jacoco-resources/redbar.gif" width="24" height="10" title="4"
alt="4"/></td><td class="ctr2" id="e5">0%</td><td class="ctr1"
id="f6">3</td><td class="ctr2" id="g6">3</td><td class="ctr1" id="h7">6</td><td
class="ctr2" id="i7">6</td><td class="ctr1" id="j5">1</td><td class="ctr2"
id="k5">1</td></tr><tr><td id="a13"><a href="HelpMojo.java.html#L348"
class="el_method">toLines(String, int, int, int)</a></td><td class="bar"
id="b6"><img src="../jacoco-resources/redbar.gif" width="28" height="10"
title="42" alt="42"/></td><td class="ctr2" id="c6">0%</td><td class="bar"
id="d11"><img src="../j
acoco-resources/redbar.gif" width="12" height="10" title="2" alt="2"/></td><td
class="ctr2" id="e6">0%</td><td class="ctr1" id="f11">2</td><td class="ctr2"
id="g11">2</td><td class="ctr1" id="h8">6</td><td class="ctr2"
id="i8">6</td><td class="ctr1" id="j6">1</td><td class="ctr2"
id="k6">1</td></tr><tr><td id="a5"><a href="HelpMojo.java.html#L421"
class="el_method">getIndentLevel(String)</a></td><td class="bar" id="b7"><img
src="../jacoco-resources/redbar.gif" width="26" height="10" title="40"
alt="40"/></td><td class="ctr2" id="c7">0%</td><td class="bar" id="d4"><img
src="../jacoco-resources/redbar.gif" width="60" height="10" title="10"
alt="10"/></td><td class="ctr2" id="e7">0%</td><td class="ctr1"
id="f4">6</td><td class="ctr2" id="g4">6</td><td class="ctr1" id="h5">8</td><td
class="ctr2" id="i5">8</td><td class="ctr1" id="j7">1</td><td class="ctr2"
id="k7">1</td></tr><tr><td id="a4"><a href="HelpMojo.java.html#L207"
class="el_method">findSingleChild(Node, String)</a></td><td cla
ss="bar" id="b8"><img src="../jacoco-resources/redbar.gif" width="21"
height="10" title="32" alt="32"/></td><td class="ctr2" id="c8">0%</td><td
class="bar" id="d7"><img src="../jacoco-resources/redbar.gif" width="24"
height="10" title="4" alt="4"/></td><td class="ctr2" id="e8">0%</td><td
class="ctr1" id="f7">3</td><td class="ctr2" id="g7">3</td><td class="ctr1"
id="h9">6</td><td class="ctr2" id="i9">6</td><td class="ctr1" id="j8">1</td><td
class="ctr2" id="k8">1</td></tr><tr><td id="a3"><a
href="HelpMojo.java.html#L191" class="el_method">findNamedChild(Node,
String)</a></td><td class="bar" id="b9"><img
src="../jacoco-resources/redbar.gif" width="20" height="10" title="30"
alt="30"/></td><td class="ctr2" id="c9">0%</td><td class="bar" id="d8"><img
src="../jacoco-resources/redbar.gif" width="24" height="10" title="4"
alt="4"/></td><td class="ctr2" id="e9">0%</td><td class="ctr1"
id="f8">3</td><td class="ctr2" id="g8">3</td><td class="ctr1" id="h6">7</td><td
class="ctr2" id="i6">7</td>
<td class="ctr1" id="j9">1</td><td class="ctr2" id="k9">1</td></tr><tr><td
id="a6"><a href="HelpMojo.java.html#L439"
class="el_method">getPropertyFromExpression(String)</a></td><td class="bar"
id="b10"><img src="../jacoco-resources/redbar.gif" width="17" height="10"
title="26" alt="26"/></td><td class="ctr2" id="c10">0%</td><td class="bar"
id="d5"><img src="../jacoco-resources/redbar.gif" width="48" height="10"
title="8" alt="8"/></td><td class="ctr2" id="e10">0%</td><td class="ctr1"
id="f5">5</td><td class="ctr2" id="g5">5</td><td class="ctr1"
id="h10">4</td><td class="ctr2" id="i10">4</td><td class="ctr1"
id="j10">1</td><td class="ctr2" id="k10">1</td></tr><tr><td id="a0"><a
href="HelpMojo.java.html#L330" class="el_method">append(StringBuilder, String,
int)</a></td><td class="bar" id="b11"><img src="../jacoco-resources/redbar.gif"
width="16" height="10" title="24" alt="24"/></td><td class="ctr2"
id="c11">0%</td><td class="bar" id="d12"><img
src="../jacoco-resources/redbar.gif" wid
th="12" height="10" title="2" alt="2"/></td><td class="ctr2"
id="e11">0%</td><td class="ctr1" id="f12">2</td><td class="ctr2"
id="g12">2</td><td class="ctr1" id="h11">4</td><td class="ctr2"
id="i11">4</td><td class="ctr1" id="j11">1</td><td class="ctr2"
id="k11">1</td></tr><tr><td id="a11"><a href="HelpMojo.java.html#L310"
class="el_method">repeat(String, int)</a></td><td class="bar" id="b12"><img
src="../jacoco-resources/redbar.gif" width="14" height="10" title="22"
alt="22"/></td><td class="ctr2" id="c12">0%</td><td class="bar" id="d13"><img
src="../jacoco-resources/redbar.gif" width="12" height="10" title="2"
alt="2"/></td><td class="ctr2" id="e12">0%</td><td class="ctr1"
id="f13">2</td><td class="ctr2" id="g13">2</td><td class="ctr1"
id="h12">4</td><td class="ctr2" id="i12">4</td><td class="ctr1"
id="j12">1</td><td class="ctr2" id="k12">1</td></tr><tr><td id="a10"><a
href="HelpMojo.java.html#L165" class="el_method">isNotEmpty(String)</a></td><td
class="bar" id="b13"><img src="..
/jacoco-resources/redbar.gif" width="6" height="10" title="9"
alt="9"/></td><td class="ctr2" id="c13">0%</td><td class="bar" id="d9"><img
src="../jacoco-resources/redbar.gif" width="24" height="10" title="4"
alt="4"/></td><td class="ctr2" id="e13">0%</td><td class="ctr1"
id="f9">3</td><td class="ctr2" id="g9">3</td><td class="ctr1"
id="h13">1</td><td class="ctr2" id="i13">1</td><td class="ctr1"
id="j13">1</td><td class="ctr2" id="k13">1</td></tr><tr><td id="a8"><a
href="HelpMojo.java.html#L171" class="el_method">getValue(Node,
String)</a></td><td class="bar" id="b14"><img
src="../jacoco-resources/redbar.gif" width="3" height="10" title="5"
alt="5"/></td><td class="ctr2" id="c14">0%</td><td class="bar" id="d14"/><td
class="ctr2" id="e14">n/a</td><td class="ctr1" id="f14">1</td><td class="ctr2"
id="g14">1</td><td class="ctr1" id="h14">1</td><td class="ctr2"
id="i14">1</td><td class="ctr1" id="j14">1</td><td class="ctr2"
id="k14">1</td></tr><tr><td id="a9"><a href="HelpMojo.java.html#L
28" class="el_method">HelpMojo()</a></td><td class="bar" id="b15"><img
src="../jacoco-resources/redbar.gif" width="2" height="10" title="3"
alt="3"/></td><td class="ctr2" id="c15">0%</td><td class="bar" id="d15"/><td
class="ctr2" id="e15">n/a</td><td class="ctr1" id="f15">1</td><td class="ctr2"
id="g15">1</td><td class="ctr1" id="h15">1</td><td class="ctr2"
id="i15">1</td><td class="ctr1" id="j15">1</td><td class="ctr2"
id="k15">1</td></tr></tbody></table><div class="footer"><span
class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a>
0.8.12.202403310830</span></div></body></html>
\ No newline at end of file
Propchange:
maven/website/components/plugins-archives/maven-jarsigner-plugin-LATEST/jacoco/org.apache.maven.plugins.maven_jarsigner_plugin/HelpMojo.html
------------------------------------------------------------------------------
svn:eol-style = native
Added:
maven/website/components/plugins-archives/maven-jarsigner-plugin-LATEST/jacoco/org.apache.maven.plugins.maven_jarsigner_plugin/HelpMojo.java.html
==============================================================================
---
maven/website/components/plugins-archives/maven-jarsigner-plugin-LATEST/jacoco/org.apache.maven.plugins.maven_jarsigner_plugin/HelpMojo.java.html
(added)
+++
maven/website/components/plugins-archives/maven-jarsigner-plugin-LATEST/jacoco/org.apache.maven.plugins.maven_jarsigner_plugin/HelpMojo.java.html
Tue Sep 3 16:39:49 2024
@@ -0,0 +1,449 @@
+<?xml version="1.0" encoding="UTF-8"?><!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>HelpMojo.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 Maven Jarsigner Plugin</a> > <a
href="index.source.html"
class="el_package">org.apache.maven.plugins.maven_jarsigner_plugin</a> > <
span class="el_source">HelpMojo.java</span></div><h1>HelpMojo.java</h1><pre
class="source lang-java linenums">package
org.apache.maven.plugins.maven_jarsigner_plugin;
+
+import org.apache.maven.plugin.AbstractMojo;
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugins.annotations.Mojo;
+import org.apache.maven.plugins.annotations.Parameter;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.xml.sax.SAXException;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Display help information on maven-jarsigner-plugin.<br>
+ * Call <code>mvn jarsigner:help -Ddetail=true
-Dgoal=&lt;goal-name&gt;</code> to display parameter details.
+ * @author maven-plugin-tools
+ */
+@Mojo( name = "help", requiresProject = false, threadSafe = true )
+<span class="nc" id="L28">public class HelpMojo</span>
+ extends AbstractMojo
+{
+ /**
+ * If <code>true</code>, display all settable properties for
each goal.
+ *
+ */
+ @Parameter( property = "detail", defaultValue =
"false" )
+ private boolean detail;
+
+ /**
+ * The name of the goal for which to show help. If unspecified, all goals
will be displayed.
+ *
+ */
+ @Parameter( property = "goal" )
+ private java.lang.String goal;
+
+ /**
+ * The maximum length of a display line, should be positive.
+ *
+ */
+ @Parameter( property = "lineLength", defaultValue =
"80" )
+ private int lineLength;
+
+ /**
+ * The number of spaces per indentation level, should be positive.
+ *
+ */
+ @Parameter( property = "indentSize", defaultValue =
"2" )
+ private int indentSize;
+
+ // /META-INF/maven/<groupId>/<artifactId>/plugin-help.xml
+ private static final String PLUGIN_HELP_PATH =
+
"/META-INF/maven/org.apache.maven.plugins/maven-jarsigner-plugin/plugin-help.xml";
+
+ private static final int DEFAULT_LINE_LENGTH = 80;
+
+ private Document build()
+ throws MojoExecutionException
+ {
+<span class="nc" id="L68"> getLog().debug( "load plugin-help.xml:
" + PLUGIN_HELP_PATH );</span>
+<span class="nc" id="L69"> try ( InputStream is =
getClass().getResourceAsStream( PLUGIN_HELP_PATH ) )</span>
+ {
+<span class="nc bnc" id="L71" title="All 2 branches missed."> if (
is == null )</span>
+ {
+<span class="nc" id="L73"> throw new MojoExecutionException(
"Could not find plugin descriptor at " + PLUGIN_HELP_PATH );</span>
+ }
+<span class="nc" id="L75"> DocumentBuilderFactory dbFactory =
DocumentBuilderFactory.newInstance();</span>
+<span class="nc" id="L76"> DocumentBuilder dBuilder =
dbFactory.newDocumentBuilder();</span>
+<span class="nc" id="L77"> return dBuilder.parse( is );</span>
+ }
+<span class="nc" id="L79"> catch ( IOException e )</span>
+ {
+<span class="nc" id="L81"> throw new MojoExecutionException(
e.getMessage(), e );</span>
+ }
+<span class="nc" id="L83"> catch ( ParserConfigurationException e
)</span>
+ {
+<span class="nc" id="L85"> throw new MojoExecutionException(
e.getMessage(), e );</span>
+ }
+<span class="nc" id="L87"> catch ( SAXException e )</span>
+ {
+<span class="nc" id="L89"> throw new MojoExecutionException(
e.getMessage(), e );</span>
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void execute()
+ throws MojoExecutionException
+ {
+<span class="nc bnc" id="L100" title="All 2 branches missed."> if (
lineLength <= 0 )</span>
+ {
+<span class="nc" id="L102"> getLog().warn( "The parameter
'lineLength' should be positive, using '80' as default." );</span>
+<span class="nc" id="L103"> lineLength = DEFAULT_LINE_LENGTH;</span>
+ }
+<span class="nc bnc" id="L105" title="All 2 branches missed."> if (
indentSize <= 0 )</span>
+ {
+<span class="nc" id="L107"> getLog().warn( "The parameter
'indentSize' should be positive, using '2' as default." );</span>
+<span class="nc" id="L108"> indentSize = 2;</span>
+ }
+
+<span class="nc" id="L111"> Document doc = build();</span>
+
+<span class="nc" id="L113"> StringBuilder sb = new
StringBuilder();</span>
+<span class="nc" id="L114"> Node plugin = getSingleChild( doc,
"plugin" );</span>
+
+
+<span class="nc" id="L117"> String name = getValue( plugin,
"name" );</span>
+<span class="nc" id="L118"> String version = getValue( plugin,
"version" );</span>
+<span class="nc" id="L119"> String id = getValue( plugin,
"groupId" ) + ":" + getValue( plugin,
"artifactId" ) + ":" + version;</span>
+<span class="nc bnc" id="L120" title="All 4 branches missed."> if (
isNotEmpty( name ) && !name.contains( id ) )</span>
+ {
+<span class="nc" id="L122"> append( sb, name + " " +
version, 0 );</span>
+ }
+ else
+ {
+<span class="nc bnc" id="L126" title="All 2 branches missed."> if (
isNotEmpty( name ) )</span>
+ {
+<span class="nc" id="L128"> append( sb, name, 0 );</span>
+ }
+ else
+ {
+<span class="nc" id="L132"> append( sb, id, 0 );</span>
+ }
+ }
+<span class="nc" id="L135"> append( sb, getValue( plugin,
"description" ), 1 );</span>
+<span class="nc" id="L136"> append( sb, "", 0 );</span>
+
+ //<goalPrefix>plugin</goalPrefix>
+<span class="nc" id="L139"> String goalPrefix = getValue( plugin,
"goalPrefix" );</span>
+
+<span class="nc" id="L141"> Node mojos1 = getSingleChild( plugin,
"mojos" );</span>
+
+<span class="nc" id="L143"> List<Node> mojos = findNamedChild(
mojos1, "mojo" );</span>
+
+<span class="nc bnc" id="L145" title="All 4 branches missed."> if (
goal == null || goal.length() <= 0 )</span>
+ {
+<span class="nc bnc" id="L147" title="All 2 branches missed.">
append( sb, "This plugin has " + mojos.size() + ( mojos.size() > 1
? " goals:" : " goal:" ), 0 );</span>
+<span class="nc" id="L148"> append( sb, "", 0 );</span>
+ }
+
+<span class="nc bnc" id="L151" title="All 2 branches missed."> for (
Node mojo : mojos )</span>
+ {
+<span class="nc" id="L153"> writeGoal( sb, goalPrefix, (Element)
mojo );</span>
+<span class="nc" id="L154"> }</span>
+
+<span class="nc bnc" id="L156" title="All 2 branches missed."> if (
getLog().isInfoEnabled() )</span>
+ {
+<span class="nc" id="L158"> getLog().info( sb.toString() );</span>
+ }
+<span class="nc" id="L160"> }</span>
+
+
+ private static boolean isNotEmpty( String string )
+ {
+<span class="nc bnc" id="L165" title="All 4 branches missed."> return
string != null && string.length() > 0;</span>
+ }
+
+ private static String getValue( Node node, String elementName )
+ throws MojoExecutionException
+ {
+<span class="nc" id="L171"> return getSingleChild( node, elementName
).getTextContent();</span>
+ }
+
+ private static Node getSingleChild( Node node, String elementName )
+ throws MojoExecutionException
+ {
+<span class="nc" id="L177"> List<Node> namedChild =
findNamedChild( node, elementName );</span>
+<span class="nc bnc" id="L178" title="All 2 branches missed."> if (
namedChild.isEmpty() )</span>
+ {
+<span class="nc" id="L180"> throw new MojoExecutionException(
"Could not find " + elementName + " in plugin-help.xml"
);</span>
+ }
+<span class="nc bnc" id="L182" title="All 2 branches missed."> if (
namedChild.size() > 1 )</span>
+ {
+<span class="nc" id="L184"> throw new MojoExecutionException(
"Multiple " + elementName + " in plugin-help.xml" );</span>
+ }
+<span class="nc" id="L186"> return namedChild.get( 0 );</span>
+ }
+
+ private static List<Node> findNamedChild( Node node, String
elementName )
+ {
+<span class="nc" id="L191"> List<Node> result = new
ArrayList<Node>();</span>
+<span class="nc" id="L192"> NodeList childNodes =
node.getChildNodes();</span>
+<span class="nc bnc" id="L193" title="All 2 branches missed."> for (
int i = 0; i < childNodes.getLength(); i++ )</span>
+ {
+<span class="nc" id="L195"> Node item = childNodes.item( i );</span>
+<span class="nc bnc" id="L196" title="All 2 branches missed."> if (
elementName.equals( item.getNodeName() ) )</span>
+ {
+<span class="nc" id="L198"> result.add( item );</span>
+ }
+ }
+<span class="nc" id="L201"> return result;</span>
+ }
+
+ private static Node findSingleChild( Node node, String elementName )
+ throws MojoExecutionException
+ {
+<span class="nc" id="L207"> List<Node> elementsByTagName =
findNamedChild( node, elementName );</span>
+<span class="nc bnc" id="L208" title="All 2 branches missed."> if (
elementsByTagName.isEmpty() )</span>
+ {
+<span class="nc" id="L210"> return null;</span>
+ }
+<span class="nc bnc" id="L212" title="All 2 branches missed."> if (
elementsByTagName.size() > 1 )</span>
+ {
+<span class="nc" id="L214"> throw new MojoExecutionException(
"Multiple " + elementName + "in plugin-help.xml" );</span>
+ }
+<span class="nc" id="L216"> return elementsByTagName.get( 0 );</span>
+ }
+
+ private void writeGoal( StringBuilder sb, String goalPrefix, Element mojo )
+ throws MojoExecutionException
+ {
+<span class="nc" id="L222"> String mojoGoal = getValue( mojo,
"goal" );</span>
+<span class="nc" id="L223"> Node configurationElement =
findSingleChild( mojo, "configuration" );</span>
+<span class="nc" id="L224"> Node description = findSingleChild( mojo,
"description" );</span>
+<span class="nc bnc" id="L225" title="All 6 branches missed."> if (
goal == null || goal.length() <= 0 || mojoGoal.equals( goal ) )</span>
+ {
+<span class="nc" id="L227"> append( sb, goalPrefix + ":"
+ mojoGoal, 0 );</span>
+<span class="nc" id="L228"> Node deprecated = findSingleChild(
mojo, "deprecated" );</span>
+<span class="nc bnc" id="L229" title="All 4 branches missed."> if (
( deprecated != null ) && isNotEmpty( deprecated.getTextContent() )
)</span>
+ {
+<span class="nc" id="L231"> append( sb, "Deprecated.
" + deprecated.getTextContent(), 1 );</span>
+<span class="nc bnc" id="L232" title="All 4 branches missed.">
if ( detail && description != null )</span>
+ {
+<span class="nc" id="L234"> append( sb, "", 0
);</span>
+<span class="nc" id="L235"> append( sb,
description.getTextContent(), 1 );</span>
+ }
+ }
+<span class="nc bnc" id="L238" title="All 2 branches missed."> else
if ( description != null )</span>
+ {
+<span class="nc" id="L240"> append( sb,
description.getTextContent(), 1 );</span>
+ }
+<span class="nc" id="L242"> append( sb, "", 0 );</span>
+
+<span class="nc bnc" id="L244" title="All 2 branches missed."> if (
detail )</span>
+ {
+<span class="nc" id="L246"> Node parametersNode =
getSingleChild( mojo, "parameters" );</span>
+<span class="nc" id="L247"> List<Node> parameters =
findNamedChild( parametersNode, "parameter" );</span>
+<span class="nc" id="L248"> append( sb, "Available
parameters:", 1 );</span>
+<span class="nc" id="L249"> append( sb, "", 0
);</span>
+
+<span class="nc bnc" id="L251" title="All 2 branches missed.">
for ( Node parameter : parameters )</span>
+ {
+<span class="nc" id="L253"> writeParameter( sb, parameter,
configurationElement );</span>
+<span class="nc" id="L254"> }</span>
+ }
+ }
+<span class="nc" id="L257"> }</span>
+
+ private void writeParameter( StringBuilder sb, Node parameter, Node
configurationElement )
+ throws MojoExecutionException
+ {
+<span class="nc" id="L262"> String parameterName = getValue( parameter,
"name" );</span>
+<span class="nc" id="L263"> String parameterDescription = getValue(
parameter, "description" );</span>
+
+<span class="nc" id="L265"> Element fieldConfigurationElement =
null;</span>
+<span class="nc bnc" id="L266" title="All 2 branches missed."> if (
configurationElement != null )</span>
+ {
+<span class="nc" id="L268"> fieldConfigurationElement = (Element)
findSingleChild( configurationElement, parameterName );</span>
+ }
+
+<span class="nc" id="L271"> String parameterDefaultValue =
"";</span>
+<span class="nc bnc" id="L272" title="All 4 branches missed."> if (
fieldConfigurationElement != null &&
fieldConfigurationElement.hasAttribute( "default-value" ) )</span>
+ {
+<span class="nc" id="L274"> parameterDefaultValue = "
(Default: " + fieldConfigurationElement.getAttribute(
"default-value" ) + ")";</span>
+ }
+<span class="nc" id="L276"> append( sb, parameterName +
parameterDefaultValue, 2 );</span>
+<span class="nc" id="L277"> Node deprecated = findSingleChild(
parameter, "deprecated" );</span>
+<span class="nc bnc" id="L278" title="All 4 branches missed."> if ( (
deprecated != null ) && isNotEmpty( deprecated.getTextContent() )
)</span>
+ {
+<span class="nc" id="L280"> append( sb, "Deprecated. " +
deprecated.getTextContent(), 3 );</span>
+<span class="nc" id="L281"> append( sb, "", 0 );</span>
+ }
+<span class="nc bnc" id="L283" title="All 2 branches missed."> if (
isNotEmpty( parameterDescription ) ) {</span>
+<span class="nc" id="L284"> append( sb, parameterDescription, 3
);</span>
+ }
+<span class="nc bnc" id="L286" title="All 2 branches missed."> if (
"true".equals( getValue( parameter, "required" ) ) )</span>
+ {
+<span class="nc" id="L288"> append( sb, "Required: Yes",
3 );</span>
+ }
+<span class="nc bnc" id="L290" title="All 4 branches missed."> if ( (
fieldConfigurationElement != null ) && isNotEmpty(
fieldConfigurationElement.getTextContent() ) )</span>
+ {
+<span class="nc" id="L292"> String property =
getPropertyFromExpression( fieldConfigurationElement.getTextContent() );</span>
+<span class="nc" id="L293"> append( sb, "User property: "
+ property, 3 );</span>
+ }
+
+<span class="nc" id="L296"> append( sb, "", 0 );</span>
+<span class="nc" id="L297"> }</span>
+
+ /**
+ * <p>Repeat a String <code>n</code> times to form a new
string.</p>
+ *
+ * @param str String to repeat
+ * @param repeat number of times to repeat str
+ * @return String with repeated String
+ * @throws NegativeArraySizeException if <code>repeat &lt;
0</code>
+ * @throws NullPointerException if str is
<code>null</code>
+ */
+ private static String repeat( String str, int repeat )
+ {
+<span class="nc" id="L310"> StringBuilder buffer = new StringBuilder(
repeat * str.length() );</span>
+
+<span class="nc bnc" id="L312" title="All 2 branches missed."> for (
int i = 0; i < repeat; i++ )</span>
+ {
+<span class="nc" id="L314"> buffer.append( str );</span>
+ }
+
+<span class="nc" id="L317"> return buffer.toString();</span>
+ }
+
+ /**
+ * Append a description to the buffer by respecting the indentSize and
lineLength parameters.
+ * <b>Note</b>: The last character is always a new line.
+ *
+ * @param sb The buffer to append the description, not
<code>null</code>.
+ * @param description The description, not <code>null</code>.
+ * @param indent The base indentation level of each line, must not be
negative.
+ */
+ private void append( StringBuilder sb, String description, int indent )
+ {
+<span class="nc bnc" id="L330" title="All 2 branches missed."> for (
String line : toLines( description, indent, indentSize, lineLength ) )</span>
+ {
+<span class="nc" id="L332"> sb.append( line ).append( '\n' );</span>
+<span class="nc" id="L333"> }</span>
+<span class="nc" id="L334"> }</span>
+
+ /**
+ * Splits the specified text into lines of convenient display length.
+ *
+ * @param text The text to split into lines, must not be
<code>null</code>.
+ * @param indent The base indentation level of each line, must not be
negative.
+ * @param indentSize The size of each indentation, must not be negative.
+ * @param lineLength The length of the line, must not be negative.
+ * @return The sequence of display lines, never
<code>null</code>.
+ * @throws NegativeArraySizeException if <code>indent &lt;
0</code>
+ */
+ private static List<String> toLines( String text, int indent, int
indentSize, int lineLength )
+ {
+<span class="nc" id="L348"> List<String> lines = new
ArrayList<String>();</span>
+
+<span class="nc" id="L350"> String ind = repeat( "\t", indent
);</span>
+
+<span class="nc" id="L352"> String[] plainLines = text.split(
"(\r\n)|(\r)|(\n)" );</span>
+
+<span class="nc bnc" id="L354" title="All 2 branches missed."> for (
String plainLine : plainLines )</span>
+ {
+<span class="nc" id="L356"> toLines( lines, ind + plainLine,
indentSize, lineLength );</span>
+ }
+
+<span class="nc" id="L359"> return lines;</span>
+ }
+
+ /**
+ * Adds the specified line to the output sequence, performing line
wrapping if necessary.
+ *
+ * @param lines The sequence of display lines, must not be
<code>null</code>.
+ * @param line The line to add, must not be
<code>null</code>.
+ * @param indentSize The size of each indentation, must not be negative.
+ * @param lineLength The length of the line, must not be negative.
+ */
+ private static void toLines( List<String> lines, String line, int
indentSize, int lineLength )
+ {
+<span class="nc" id="L372"> int lineIndent = getIndentLevel( line
);</span>
+<span class="nc" id="L373"> StringBuilder buf = new StringBuilder( 256
);</span>
+
+<span class="nc" id="L375"> String[] tokens = line.split( "
+" );</span>
+
+<span class="nc bnc" id="L377" title="All 2 branches missed."> for (
String token : tokens )</span>
+ {
+<span class="nc bnc" id="L379" title="All 2 branches missed."> if (
buf.length() > 0 )</span>
+ {
+<span class="nc bnc" id="L381" title="All 2 branches missed.">
if ( buf.length() + token.length() >= lineLength )</span>
+ {
+<span class="nc" id="L383"> lines.add( buf.toString()
);</span>
+<span class="nc" id="L384"> buf.setLength( 0 );</span>
+<span class="nc" id="L385"> buf.append( repeat( "
", lineIndent * indentSize ) );</span>
+ }
+ else
+ {
+<span class="nc" id="L389"> buf.append( ' ' );</span>
+ }
+ }
+
+<span class="nc bnc" id="L393" title="All 2 branches missed."> for
( int j = 0; j < token.length(); j++ )</span>
+ {
+<span class="nc" id="L395"> char c = token.charAt( j );</span>
+<span class="nc bnc" id="L396" title="All 2 branches missed.">
if ( c == '\t' )</span>
+ {
+<span class="nc" id="L398"> buf.append( repeat( "
", indentSize - buf.length() % indentSize ) );</span>
+ }
+<span class="nc bnc" id="L400" title="All 2 branches missed.">
else if ( c == '\u00A0' )</span>
+ {
+<span class="nc" id="L402"> buf.append( ' ' );</span>
+ }
+ else
+ {
+<span class="nc" id="L406"> buf.append( c );</span>
+ }
+ }
+ }
+<span class="nc" id="L410"> lines.add( buf.toString() );</span>
+<span class="nc" id="L411"> }</span>
+
+ /**
+ * Gets the indentation level of the specified line.
+ *
+ * @param line The line whose indentation level should be retrieved, must
not be <code>null</code>.
+ * @return The indentation level of the line.
+ */
+ private static int getIndentLevel( String line )
+ {
+<span class="nc" id="L421"> int level = 0;</span>
+<span class="nc bnc" id="L422" title="All 4 branches missed."> for (
int i = 0; i < line.length() && line.charAt( i ) == '\t'; i++
)</span>
+ {
+<span class="nc" id="L424"> level++;</span>
+ }
+<span class="nc bnc" id="L426" title="All 4 branches missed."> for (
int i = level + 1; i <= level + 4 && i < line.length(); i++
)</span>
+ {
+<span class="nc bnc" id="L428" title="All 2 branches missed."> if (
line.charAt( i ) == '\t' )</span>
+ {
+<span class="nc" id="L430"> level++;</span>
+<span class="nc" id="L431"> break;</span>
+ }
+ }
+<span class="nc" id="L434"> return level;</span>
+ }
+
+ private static String getPropertyFromExpression( String expression )
+ {
+<span class="nc bnc" id="L439" title="All 6 branches missed."> if (
expression != null && expression.startsWith( "${" )
&& expression.endsWith( "}" )</span>
+<span class="nc bnc" id="L440" title="All 2 branches missed.">
&& !expression.substring( 2 ).contains( "${" ) )</span>
+ {
+ // expression="${xxx}" -> property="xxx"
+<span class="nc" id="L443"> return expression.substring( 2,
expression.length() - 1 );</span>
+ }
+ // no property can be extracted
+<span class="nc" id="L446"> return null;</span>
+ }
+}
+</pre><div class="footer"><span class="right">Created with <a
href="http://www.jacoco.org/jacoco">JaCoCo</a>
0.8.12.202403310830</span></div></body></html>
\ No newline at end of file
Propchange:
maven/website/components/plugins-archives/maven-jarsigner-plugin-LATEST/jacoco/org.apache.maven.plugins.maven_jarsigner_plugin/HelpMojo.java.html
------------------------------------------------------------------------------
svn:eol-style = native
Added:
maven/website/components/plugins-archives/maven-jarsigner-plugin-LATEST/jacoco/org.apache.maven.plugins.maven_jarsigner_plugin/index.html
==============================================================================
---
maven/website/components/plugins-archives/maven-jarsigner-plugin-LATEST/jacoco/org.apache.maven.plugins.maven_jarsigner_plugin/index.html
(added)
+++
maven/website/components/plugins-archives/maven-jarsigner-plugin-LATEST/jacoco/org.apache.maven.plugins.maven_jarsigner_plugin/index.html
Tue Sep 3 16:39:49 2024
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><!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.maven.plugins.maven_jarsigner_plugin</title><script
type="text/javascript" src="../jacoco-resources/sort.js"></script></head><body
onload="initialSort(['breadcrumb', 'coveragetable'])"><div class="breadcrumb"
id="breadcrumb"><span class="info"><a href="index.source.html"
class="el_source">Source Files</a><a href="../jacoco-sessions.html"
class="el_session">Sessions</a></span><a href="../index.html"
class="el_report">Apache Maven Jarsigner Plugin</a> > <span
class="el_package">org.apache.maven.plugins.maven_jarsigner_plugin</span></div><h
1>org.apache.maven.plugins.maven_jarsigner_plugin</h1><table class="coverage"
cellspacing="0" id="coveragetable"><thead><tr><td class="sortable" id="a"
onclick="toggleSort(this)">Element</td><td class="down sortable bar" id="b"
onclick="toggleSort(this)">Missed Instructions</td><td class="sortable ctr2"
id="c" onclick="toggleSort(this)">Cov.</td><td class="sortable bar" id="d"
onclick="toggleSort(this)">Missed Branches</td><td class="sortable ctr2" id="e"
onclick="toggleSort(this)">Cov.</td><td class="sortable ctr1" id="f"
onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="g"
onclick="toggleSort(this)">Cxty</td><td class="sortable ctr1" id="h"
onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="i"
onclick="toggleSort(this)">Lines</td><td class="sortable ctr1" id="j"
onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="k"
onclick="toggleSort(this)">Methods</td><td class="sortable ctr1" id="l"
onclick="toggleSort(this)">Missed</td><td cl
ass="sortable ctr2" id="m"
onclick="toggleSort(this)">Classes</td></tr></thead><tfoot><tr><td>Total</td><td
class="bar">864 of 864</td><td class="ctr2">0%</td><td class="bar">112 of
112</td><td class="ctr2">0%</td><td class="ctr1">72</td><td
class="ctr2">72</td><td class="ctr1">156</td><td class="ctr2">156</td><td
class="ctr1">16</td><td class="ctr2">16</td><td class="ctr1">1</td><td
class="ctr2">1</td></tr></tfoot><tbody><tr><td id="a0"><a href="HelpMojo.html"
class="el_class">HelpMojo</a></td><td class="bar" id="b0"><img
src="../jacoco-resources/redbar.gif" width="120" height="10" title="864"
alt="864"/></td><td class="ctr2" id="c0">0%</td><td class="bar" id="d0"><img
src="../jacoco-resources/redbar.gif" width="120" height="10" title="112"
alt="112"/></td><td class="ctr2" id="e0">0%</td><td class="ctr1"
id="f0">72</td><td class="ctr2" id="g0">72</td><td class="ctr1"
id="h0">156</td><td class="ctr2" id="i0">156</td><td class="ctr1"
id="j0">16</td><td class="ctr2" id="k0">16</td><td
class="ctr1" id="l0">1</td><td class="ctr2"
id="m0">1</td></tr></tbody></table><div class="footer"><span
class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a>
0.8.12.202403310830</span></div></body></html>
\ No newline at end of file
Propchange:
maven/website/components/plugins-archives/maven-jarsigner-plugin-LATEST/jacoco/org.apache.maven.plugins.maven_jarsigner_plugin/index.html
------------------------------------------------------------------------------
svn:eol-style = native
Added:
maven/website/components/plugins-archives/maven-jarsigner-plugin-LATEST/jacoco/org.apache.maven.plugins.maven_jarsigner_plugin/index.source.html
==============================================================================
---
maven/website/components/plugins-archives/maven-jarsigner-plugin-LATEST/jacoco/org.apache.maven.plugins.maven_jarsigner_plugin/index.source.html
(added)
+++
maven/website/components/plugins-archives/maven-jarsigner-plugin-LATEST/jacoco/org.apache.maven.plugins.maven_jarsigner_plugin/index.source.html
Tue Sep 3 16:39:49 2024
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><!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.maven.plugins.maven_jarsigner_plugin</title><script
type="text/javascript" src="../jacoco-resources/sort.js"></script></head><body
onload="initialSort(['breadcrumb', 'coveragetable'])"><div class="breadcrumb"
id="breadcrumb"><span class="info"><a href="index.html"
class="el_class">Classes</a><a href="../jacoco-sessions.html"
class="el_session">Sessions</a></span><a href="../index.html"
class="el_report">Apache Maven Jarsigner Plugin</a> > <span
class="el_package">org.apache.maven.plugins.maven_jarsigner_plugin</span></div><h1>org.apache.
maven.plugins.maven_jarsigner_plugin</h1><table class="coverage"
cellspacing="0" id="coveragetable"><thead><tr><td class="sortable" id="a"
onclick="toggleSort(this)">Element</td><td class="down sortable bar" id="b"
onclick="toggleSort(this)">Missed Instructions</td><td class="sortable ctr2"
id="c" onclick="toggleSort(this)">Cov.</td><td class="sortable bar" id="d"
onclick="toggleSort(this)">Missed Branches</td><td class="sortable ctr2" id="e"
onclick="toggleSort(this)">Cov.</td><td class="sortable ctr1" id="f"
onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="g"
onclick="toggleSort(this)">Cxty</td><td class="sortable ctr1" id="h"
onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="i"
onclick="toggleSort(this)">Lines</td><td class="sortable ctr1" id="j"
onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="k"
onclick="toggleSort(this)">Methods</td><td class="sortable ctr1" id="l"
onclick="toggleSort(this)">Missed</td><td class="sortable
ctr2" id="m"
onclick="toggleSort(this)">Classes</td></tr></thead><tfoot><tr><td>Total</td><td
class="bar">864 of 864</td><td class="ctr2">0%</td><td class="bar">112 of
112</td><td class="ctr2">0%</td><td class="ctr1">72</td><td
class="ctr2">72</td><td class="ctr1">156</td><td class="ctr2">156</td><td
class="ctr1">16</td><td class="ctr2">16</td><td class="ctr1">1</td><td
class="ctr2">1</td></tr></tfoot><tbody><tr><td id="a0"><a
href="HelpMojo.java.html" class="el_source">HelpMojo.java</a></td><td
class="bar" id="b0"><img src="../jacoco-resources/redbar.gif" width="120"
height="10" title="864" alt="864"/></td><td class="ctr2" id="c0">0%</td><td
class="bar" id="d0"><img src="../jacoco-resources/redbar.gif" width="120"
height="10" title="112" alt="112"/></td><td class="ctr2" id="e0">0%</td><td
class="ctr1" id="f0">72</td><td class="ctr2" id="g0">72</td><td class="ctr1"
id="h0">156</td><td class="ctr2" id="i0">156</td><td class="ctr1"
id="j0">16</td><td class="ctr2" id="k0">16</td><td c
lass="ctr1" id="l0">1</td><td class="ctr2"
id="m0">1</td></tr></tbody></table><div class="footer"><span
class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a>
0.8.12.202403310830</span></div></body></html>
\ No newline at end of file
Propchange:
maven/website/components/plugins-archives/maven-jarsigner-plugin-LATEST/jacoco/org.apache.maven.plugins.maven_jarsigner_plugin/index.source.html
------------------------------------------------------------------------------
svn:eol-style = native