Modified: maven/website/components/plugins-archives/maven-source-plugin-LATEST/test-jar-no-fork-mojo.html ============================================================================== --- maven/website/components/plugins-archives/maven-source-plugin-LATEST/test-jar-no-fork-mojo.html (original) +++ maven/website/components/plugins-archives/maven-source-plugin-LATEST/test-jar-no-fork-mojo.html Wed Jun 26 08:32:51 2024 @@ -1,129 +1,74 @@ <!DOCTYPE html> - - <!-- - | Generated by Apache Maven Doxia Site Renderer 1.11.1 from org.apache.maven.plugins:maven-plugin-report-plugin:3.10.2:report at 2024-03-30 - | Rendered using Apache Maven Fluido Skin 1.11.2 + | Generated by Apache Maven Doxia Site Renderer 1.11.1 from org.apache.maven.plugins:maven-plugin-report-plugin:4.0.0-beta-1:report at 2024-06-26 + + | Rendered using Apache Maven Default Skin --> -<html xmlns="http://www.w3.org/1999/xhtml" lang="en"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta charset="UTF-8" /> - <meta name="viewport" content="width=device-width, initial-scale=1" /> + <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="generator" content="Apache Maven Doxia Site Renderer 1.11.1" /> <title>Apache Maven Source Plugin – source:test-jar-no-fork</title> - <link rel="stylesheet" href="./css/apache-maven-fluido-1.11.2.min.css" /> + <link rel="stylesheet" href="./css/maven-base.css" /> + <link rel="stylesheet" href="./css/maven-theme.css" /> <link rel="stylesheet" href="./css/site.css" /> <link rel="stylesheet" href="./css/print.css" media="print" /> - <script src="./js/apache-maven-fluido-1.11.2.min.js"></script> - - <!-- Matomo --> - <script> - var _paq = window._paq = window._paq || []; - _paq.push(['disableCookies']); - _paq.push(['trackPageView']); - _paq.push(['enableLinkTracking']); - - (function() { - var u="https://analytics.apache.org/"; - _paq.push(['setTrackerUrl', u+'/matomo.php']); - _paq.push(['setSiteId', '3']); - var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; - g.async=true; g.src=u+'/matomo.js'; s.parentNode.insertBefore(g,s); - })(); - </script> - <!-- End Matomo Code --> </head> - <body class="topBarDisabled"> - <div class="container-fluid"> - <header> - <div id="banner"> - <div class="pull-left"><a href="https://www.apache.org/" id="bannerLeft"><img src="../../images/apache-maven-project.png" alt="Apache Maven Source Plugin" style="" /></a></div> - <div class="pull-right"><a href="../../" id="bannerRight"><img src="../../images/maven-logo-black-on-white.png" alt="" style="" /></a></div> - <div class="clear"><hr/></div> - </div> - - <div id="breadcrumbs"> - <ul class="breadcrumb"> - <li><a href="https://www.apache.org/" class="externalLink" title="Apache">Apache</a><span class="divider">/</span></li> - <li><a href="../../index.html" title="Maven">Maven</a><span class="divider">/</span></li> - <li><a href="../index.html" title="Plugins">Plugins</a><span class="divider">/</span></li> - <li><a href="index.html" title="Apache Maven Source Plugin">Apache Maven Source Plugin</a><span class="divider">/</span></li> - <li class="active ">source:test-jar-no-fork</li> - <li id="publishDate" class="pull-right"><span class="divider">|</span> Last Published: 2024-03-30</li> - <li id="projectVersion" class="pull-right">Version: 3.3.1</li> - </ul> - </div> - </header> - <div class="row-fluid"> - <header id="leftColumn" class="span2"> - <nav class="well sidebar-nav"> - <ul class="nav nav-list"> - <li class="nav-header">Overview</li> - <li><a href="index.html" title="Introduction"><span class="none"></span>Introduction</a></li> - <li><a href="plugin-info.html" title="Goals"><span class="none"></span>Goals</a></li> - <li><a href="usage.html" title="Usage"><span class="none"></span>Usage</a></li> - <li><a href="faq.html" title="FAQ"><span class="none"></span>FAQ</a></li> - <li><a href="https://www.apache.org/licenses/" class="externalLink" title="License"><span class="none"></span>License</a></li> - <li><a href="download.html" title="Download"><span class="none"></span>Download</a></li> - <li class="nav-header">Examples</li> - <li><a href="examples/configureplugin.html" title="Configuring Source Plugin"><span class="none"></span>Configuring Source Plugin</a></li> - <li class="nav-header">Project Documentation</li> - <li><a href="project-info.html" title="Project Information"><span class="icon-chevron-right"></span>Project Information</a></li> - <li><a href="project-reports.html" title="Project Reports"><span class="icon-chevron-right"></span>Project Reports</a></li> - <li class="nav-header">Maven Projects</li> - <li><a href="../../ref/current" title="Maven"><span class="none"></span>Maven</a></li> - <li><a href="../../archetypes/index.html" title="Archetypes"><span class="none"></span>Archetypes</a></li> - <li><a href="../../extensions/index.html" title="Extensions"><span class="none"></span>Extensions</a></li> - <li><a href="../../pom/index.html" title="Parent POMs"><span class="none"></span>Parent POMs</a></li> - <li><a href="../index.html" title="Plugins"><span class="none"></span>Plugins</a></li> - <li><a href="../../skins/index.html" title="Skins"><span class="none"></span>Skins</a></li> - <li><a href="" title=""><span class="icon-chevron-down"></span></a> - <ul class="nav nav-list"> - <li><a href="../../archetype/index.html" title="Archetype"><span class="none"></span>Archetype</a></li> - <li><a href="../../resolver/index.html" title="Artifact Resolver"><span class="none"></span>Artifact Resolver</a></li> - <li><a href="../../doxia/index.html" title="Doxia"><span class="none"></span>Doxia</a></li> - <li><a href="../../maven-indexer/index.html" title="Indexer"><span class="none"></span>Indexer</a></li> - <li><a href="../../jxr/index.html" title="JXR"><span class="none"></span>JXR</a></li> - <li><a href="../../plugin-testing/index.html" title="Plugin Testing"><span class="none"></span>Plugin Testing</a></li> - <li><a href="../../plugin-tools/index.html" title="Plugin Tools"><span class="none"></span>Plugin Tools</a></li> - <li><a href="../../apache-resource-bundles/index.html" title="Resource Bundles"><span class="none"></span>Resource Bundles</a></li> - <li><a href="../../scm/index.html" title="SCM"><span class="none"></span>SCM</a></li> - <li><a href="../../shared/index.html" title="Shared Components"><span class="none"></span>Shared Components</a></li> - <li><a href="../../surefire/index.html" title="Surefire"><span class="none"></span>Surefire</a></li> - <li><a href="../../wagon/index.html" title="Wagon"><span class="none"></span>Wagon</a></li> - </ul></li> - <li class="nav-header">ASF</li> - <li><a href="https://www.apache.org/foundation/how-it-works.html" class="externalLink" title="How Apache Works"><span class="none"></span>How Apache Works</a></li> - <li><a href="https://www.apache.org/foundation/" class="externalLink" title="Foundation"><span class="none"></span>Foundation</a></li> - <li><a href="https://privacy.apache.org/policies/privacy-policy-public.html" class="externalLink" title="Data Privacy"><span class="none"></span>Data Privacy</a></li> - <li><a href="https://www.apache.org/foundation/sponsorship.html" class="externalLink" title="Sponsoring Apache"><span class="none"></span>Sponsoring Apache</a></li> - <li><a href="https://www.apache.org/foundation/thanks.html" class="externalLink" title="Thanks"><span class="none"></span>Thanks</a></li> - </ul> - </nav> - <div class="well sidebar-nav"> - <div id="poweredBy"> - <div class="clear"></div> - <div class="clear"></div> - <div class="clear"></div> -<a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy"><img class="builtBy" alt="Built by Maven" src="./images/logos/maven-feather.png" /></a> - </div> - </div> - </header> - <main id="bodyColumn" class="span10" > + <body class="composite"> + <div id="banner"> +<div id="bannerLeft">Apache Maven Source Plugin +</div> + <div class="clear"> + <hr/> + </div> + </div> + <div id="breadcrumbs"> + <div class="xleft"> + <span id="publishDate">Last Published: 2024-06-26</span> + | <span id="projectVersion">Version: 4.0.0-beta-1</span> + </div> + <div class="xright"> </div> + <div class="clear"> + <hr/> + </div> + </div> + <div id="leftColumn"> + <div id="navcolumn"> + <h5>Overview</h5> + <ul> + <li class="none"><a href="index.html" title="Introduction">Introduction</a></li> + <li class="none"><a href="plugin-info.html" title="Goals">Goals</a></li> + <li class="none"><a href="usage.html" title="Usage">Usage</a></li> + <li class="none"><a href="faq.html" title="FAQ">FAQ</a></li> + <li class="none"><a href="https://www.apache.org/licenses/" class="externalLink" title="License">License</a></li> + <li class="none"><a href="download.html" title="Download">Download</a></li> + </ul> + <h5>Examples</h5> + <ul> + <li class="none"><a href="examples/configureplugin.html" title="Configuring Source Plugin">Configuring Source Plugin</a></li> + </ul> + <a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy"> + <img class="poweredBy" alt="Built by Maven" src="./images/logos/maven-feather.png" /> + </a> + </div> + </div> + <div id="bodyColumn"> + <div id="contentBox"> <section> <h2><a name="source:test-jar-no-fork"></a>source:test-jar-no-fork</h2><a name="source:test-jar-no-fork"></a> <p><strong>Full name</strong>:</p> -<p>org.apache.maven.plugins:maven-source-plugin:3.3.1:test-jar-no-fork</p> +<p>org.apache.maven.plugins:maven-source-plugin:4.0.0-beta-1:test-jar-no-fork</p> <p><strong>Description</strong>:</p> <p>This goal bundles all the test sources into a jar archive. This goal functions the same as the test-jar goal but does not fork the build, and is suitable for attaching to the build lifecycle.</p> <p><strong>Attributes</strong>:</p> <ul> <li>Requires a Maven project to be executed.</li> -<li>The goal is thread-safe and supports parallel builds.</li> +<li>The goal is not marked as thread-safe and thus does not support parallel builds.</li> <li>Since version: <code>2.1</code>.</li> <li>Binds by default to the <a class="externalLink" href="https://maven.apache.org/ref/current/maven-core/lifecycles.html">lifecycle phase</a>: <code>package</code>.</li></ul><section> <h3><a name="Required_Parameters"></a>Required Parameters</h3><a name="Required_Parameters"></a> -<table border="0" class="table table-striped"> +<table border="0" class="bodyTable"> <tr class="a"> <th>Name</th> <th>Type</th> @@ -131,11 +76,11 @@ <th>Description</th></tr> <tr class="b"> <td align="left"><a href="#defaultManifestFile"><code><defaultManifestFile></code></a></td> -<td><code>File</code></td> +<td><code>Path</code></td> <td><code>2.1</code></td> -<td>Path to the default MANIFEST file to use. It will be used if <code>useDefaultManifestFile</code> is set to <code>true</code>.<br /><strong>Default</strong>: <code>${project.build.outputDirectory}/META-INF/MANIFEST.MF</code></td></tr></table></section><section> +<td>Path to the default MANIFEST file to use. It will be used if <code>useDefaultManifestFile</code> is set to <code>true</code>.</td></tr></table></section><section> <h3><a name="Optional_Parameters"></a>Optional Parameters</h3><a name="Optional_Parameters"></a> -<table border="0" class="table table-striped"> +<table border="0" class="bodyTable"> <tr class="a"> <th>Name</th> <th>Type</th> @@ -151,17 +96,17 @@ <td align="left"><a href="#attach"><code><attach></code></a></td> <td><code>boolean</code></td> <td><code>-</code></td> -<td>Specifies whether or not to attach the artifact to the project<br /><strong>Default</strong>: <code>true</code><br /><strong>User Property</strong>: <code>maven.source.attach</code></td></tr> +<td>Specifies whether to attach the artifact to the project</td></tr> <tr class="b"> <td align="left"><a href="#classifier"><code><classifier></code></a></td> <td><code>String</code></td> <td><code>2.2</code></td> -<td>No description.<br /><strong>Default</strong>: <code>test-sources</code><br /><strong>User Property</strong>: <code>maven.source.test.classifier</code></td></tr> +<td>No description.</td></tr> <tr class="a"> <td align="left"><a href="#excludeResources"><code><excludeResources></code></a></td> <td><code>boolean</code></td> <td><code>2.0.4</code></td> -<td>Specifies whether or not to exclude resources from the sources-jar. This can be convenient if your project includes large resources, such as images, and you don't want to include them in the sources-jar.<br /><strong>Default</strong>: <code>false</code><br /><strong>User Property</strong>: <code>maven.source.excludeResources</code></td></tr> +<td>Specifies whether to exclude resources from the sources-jar. This can be convenient if your project includes large resources, such as images, and you don't want to include them in the sources-jar.</td></tr> <tr class="b"> <td align="left"><a href="#excludes"><code><excludes></code></a></td> <td><code>String[]</code></td> @@ -171,17 +116,17 @@ <td align="left"><a href="#finalName"><code><finalName></code></a></td> <td><code>String</code></td> <td><code>-</code></td> -<td>The filename to be used for the generated archive file. For the source:jar goal, "-sources" is appended to this filename. For the source:test-jar goal, "-test-sources" is appended.<br /><strong>Default</strong>: <code>${project.build.finalName}</code></td></tr> +<td>The filename to be used for the generated archive file. For the source:jar goal, "-sources" is appended to this filename. For the source:test-jar goal, "-test-sources" is appended.</td></tr> <tr class="b"> <td align="left"><a href="#forceCreation"><code><forceCreation></code></a></td> <td><code>boolean</code></td> <td><code>2.1</code></td> -<td>Whether creating the archive should be forced. If set to true, the jar will always be created. If set to false, the jar will only be created when the sources are newer than the jar.<br /><strong>Default</strong>: <code>false</code><br /><strong>User Property</strong>: <code>maven.source.forceCreation</code></td></tr> +<td>Whether creating the archive should be forced. If set to true, the jar will always be created. If set to false, the jar will only be created when the sources are newer than the jar.</td></tr> <tr class="a"> <td align="left"><a href="#includePom"><code><includePom></code></a></td> <td><code>boolean</code></td> <td><code>2.1</code></td> -<td>Specifies whether or not to include the POM file in the sources-jar.<br /><strong>Default</strong>: <code>false</code><br /><strong>User Property</strong>: <code>maven.source.includePom</code></td></tr> +<td>Specifies whether to include the POM file in the sources-jar.</td></tr> <tr class="b"> <td align="left"><a href="#includes"><code><includes></code></a></td> <td><code>String[]</code></td> @@ -189,157 +134,132 @@ <td>List of files to include. Specified as fileset patterns which are relative to the input directory whose contents is being packaged into the JAR.</td></tr> <tr class="a"> <td align="left"><a href="#outputDirectory"><code><outputDirectory></code></a></td> -<td><code>File</code></td> +<td><code>Path</code></td> <td><code>-</code></td> -<td>The directory where the generated archive file will be put.<br /><strong>Default</strong>: <code>${project.build.directory}</code></td></tr> +<td>The directory where the generated archive file will be put.</td></tr> <tr class="b"> <td align="left"><a href="#outputTimestamp"><code><outputTimestamp></code></a></td> <td><code>String</code></td> <td><code>3.2.0</code></td> -<td>Timestamp for reproducible output archive entries, either formatted as ISO 8601 <code>yyyy-MM-dd'T'HH:mm:ssXXX</code> or as an int representing seconds since the epoch (like <a href="https://reproducible-builds.org/docs/source-date-epoch/">SOURCE_DATE_EPOCH</a>).<br /><strong>Default</strong>: <code>${project.build.outputTimestamp}</code></td></tr> +<td>Timestamp for reproducible output archive entries, either formatted as ISO 8601 <code>yyyy-MM-dd'T'HH:mm:ssXXX</code> or as an int representing seconds since the epoch (like <a href="https://reproducible-builds.org/docs/source-date-epoch/">SOURCE_DATE_EPOCH</a>).</td></tr> <tr class="a"> <td align="left"><a href="#skipSource"><code><skipSource></code></a></td> <td><code>boolean</code></td> <td><code>2.2</code></td> -<td>A flag used to disable the source procedure. This is primarily intended for usage from the command line to occasionally adjust the build.<br /><strong>Default</strong>: <code>false</code><br /><strong>User Property</strong>: <code>maven.source.skip</code></td></tr> +<td>A flag used to disable the source procedure. This is primarily intended for usage from the command line to occasionally adjust the build.</td></tr> <tr class="b"> <td align="left"><a href="#useDefaultExcludes"><code><useDefaultExcludes></code></a></td> <td><code>boolean</code></td> <td><code>2.1</code></td> -<td>Exclude commonly excluded files such as SCM configuration. These are defined in the plexus FileUtils.getDefaultExcludes()<br /><strong>Default</strong>: <code>true</code><br /><strong>User Property</strong>: <code>maven.source.useDefaultExcludes</code></td></tr> +<td>Exclude commonly excluded files such as SCM configuration. These are defined in the plexus FileUtils.getDefaultExcludes()</td></tr> <tr class="a"> <td align="left"><a href="#useDefaultManifestFile"><code><useDefaultManifestFile></code></a></td> <td><code>boolean</code></td> <td><code>2.1</code></td> <td>Set this to <code>true</code> to enable the use of the <code>defaultManifestFile</code>. -<br /><br /><strong>Default</strong>: <code>false</code><br /><strong>User Property</strong>: <code>maven.source.useDefaultManifestFile</code></td></tr></table></section><section> -<h3><a name="Parameter_Details"></a>Parameter Details</h3><a name="Parameter_Details"></a><a name="archive"><section> -<h4><a name="a.3Carchive.3E"></a><archive></h4><a name="a.3Carchive.3E"></a></a> +<br /></td></tr></table></section><section> +<h3><a name="Parameter_Details"></a>Parameter Details</h3><a name="Parameter_Details"></a><a name="archive"></a><section> +<h4><a name="a.3Carchive.3E"></a><archive></h4><a name="a.3Carchive.3E"></a> <div>The archive configuration to use. See <a href="http://maven.apache.org/shared/maven-archiver/index.html">Maven Archiver Reference</a>. <br /><b>Note: Since 3.0.0 the resulting archives contain a maven descriptor. If you need to suppress the generation of the maven descriptor you can simply achieve this by using the <a href="http://maven.apache.org/shared/maven-archiver/index.html#archive">archiver configuration</a>.</b>.</div> <ul> <li><strong>Type</strong>: <code>org.apache.maven.archiver.MavenArchiveConfiguration</code></li> <li><strong>Since</strong>: <code>2.1</code></li> -<li><strong>Required</strong>: <code>report.plugin.goal.no</code></li></ul><hr /></section><a name="attach"><section> -<h4><a name="a.3Cattach.3E"></a><attach></h4><a name="a.3Cattach.3E"></a></a> -<div>Specifies whether or not to attach the artifact to the project</div> +<li><strong>Required</strong>: <code>No</code></li></ul><hr /></section><a name="attach"></a><section> +<h4><a name="a.3Cattach.3E"></a><attach></h4><a name="a.3Cattach.3E"></a> +<div>Specifies whether to attach the artifact to the project</div> <ul> <li><strong>Type</strong>: <code>boolean</code></li> -<li><strong>Required</strong>: <code>report.plugin.goal.no</code></li> -<li><strong>User Property</strong>: <code>maven.source.attach</code></li> -<li><strong>Default</strong>: <code>true</code></li></ul><hr /></section><a name="classifier"><section> -<h4><a name="a.3Cclassifier.3E"></a><classifier></h4><a name="a.3Cclassifier.3E"></a></a> +<li><strong>Required</strong>: <code>No</code></li></ul><hr /></section><a name="classifier"></a><section> +<h4><a name="a.3Cclassifier.3E"></a><classifier></h4><a name="a.3Cclassifier.3E"></a> <div>No description.</div> <ul> <li><strong>Type</strong>: <code>java.lang.String</code></li> <li><strong>Since</strong>: <code>2.2</code></li> -<li><strong>Required</strong>: <code>report.plugin.goal.no</code></li> -<li><strong>User Property</strong>: <code>maven.source.test.classifier</code></li> -<li><strong>Default</strong>: <code>test-sources</code></li></ul><hr /></section><a name="defaultManifestFile"><section> -<h4><a name="a.3CdefaultManifestFile.3E"></a><defaultManifestFile></h4><a name="a.3CdefaultManifestFile.3E"></a></a> +<li><strong>Required</strong>: <code>No</code></li></ul><hr /></section><a name="defaultManifestFile"></a><section> +<h4><a name="a.3CdefaultManifestFile.3E"></a><defaultManifestFile></h4><a name="a.3CdefaultManifestFile.3E"></a> <div>Path to the default MANIFEST file to use. It will be used if <code>useDefaultManifestFile</code> is set to <code>true</code>.</div> <ul> -<li><strong>Type</strong>: <code>java.io.File</code></li> +<li><strong>Type</strong>: <code>java.nio.file.Path</code></li> <li><strong>Since</strong>: <code>2.1</code></li> -<li><strong>Required</strong>: <code>report.plugin.goal.yes</code></li> -<li><strong>Default</strong>: <code>${project.build.outputDirectory}/META-INF/MANIFEST.MF</code></li></ul><hr /></section><a name="excludeResources"><section> -<h4><a name="a.3CexcludeResources.3E"></a><excludeResources></h4><a name="a.3CexcludeResources.3E"></a></a> -<div>Specifies whether or not to exclude resources from the sources-jar. This can be convenient if your project includes large resources, such as images, and you don't want to include them in the sources-jar.</div> +<li><strong>Required</strong>: <code>Yes</code></li></ul><hr /></section><a name="excludeResources"></a><section> +<h4><a name="a.3CexcludeResources.3E"></a><excludeResources></h4><a name="a.3CexcludeResources.3E"></a> +<div>Specifies whether to exclude resources from the sources-jar. This can be convenient if your project includes large resources, such as images, and you don't want to include them in the sources-jar.</div> <ul> <li><strong>Type</strong>: <code>boolean</code></li> <li><strong>Since</strong>: <code>2.0.4</code></li> -<li><strong>Required</strong>: <code>report.plugin.goal.no</code></li> -<li><strong>User Property</strong>: <code>maven.source.excludeResources</code></li> -<li><strong>Default</strong>: <code>false</code></li></ul><hr /></section><a name="excludes"><section> -<h4><a name="a.3Cexcludes.3E"></a><excludes></h4><a name="a.3Cexcludes.3E"></a></a> +<li><strong>Required</strong>: <code>No</code></li></ul><hr /></section><a name="excludes"></a><section> +<h4><a name="a.3Cexcludes.3E"></a><excludes></h4><a name="a.3Cexcludes.3E"></a> <div>List of files to exclude. Specified as fileset patterns which are relative to the input directory whose contents is being packaged into the JAR.</div> <ul> <li><strong>Type</strong>: <code>java.lang.String[]</code></li> <li><strong>Since</strong>: <code>2.1</code></li> -<li><strong>Required</strong>: <code>report.plugin.goal.no</code></li></ul><hr /></section><a name="finalName"><section> -<h4><a name="a.3CfinalName.3E"></a><finalName></h4><a name="a.3CfinalName.3E"></a></a> +<li><strong>Required</strong>: <code>No</code></li></ul><hr /></section><a name="finalName"></a><section> +<h4><a name="a.3CfinalName.3E"></a><finalName></h4><a name="a.3CfinalName.3E"></a> <div>The filename to be used for the generated archive file. For the source:jar goal, "-sources" is appended to this filename. For the source:test-jar goal, "-test-sources" is appended.</div> <ul> <li><strong>Type</strong>: <code>java.lang.String</code></li> -<li><strong>Required</strong>: <code>report.plugin.goal.no</code></li> -<li><strong>Default</strong>: <code>${project.build.finalName}</code></li></ul><hr /></section><a name="forceCreation"><section> -<h4><a name="a.3CforceCreation.3E"></a><forceCreation></h4><a name="a.3CforceCreation.3E"></a></a> +<li><strong>Required</strong>: <code>No</code></li></ul><hr /></section><a name="forceCreation"></a><section> +<h4><a name="a.3CforceCreation.3E"></a><forceCreation></h4><a name="a.3CforceCreation.3E"></a> <div>Whether creating the archive should be forced. If set to true, the jar will always be created. If set to false, the jar will only be created when the sources are newer than the jar.</div> <ul> <li><strong>Type</strong>: <code>boolean</code></li> <li><strong>Since</strong>: <code>2.1</code></li> -<li><strong>Required</strong>: <code>report.plugin.goal.no</code></li> -<li><strong>User Property</strong>: <code>maven.source.forceCreation</code></li> -<li><strong>Default</strong>: <code>false</code></li></ul><hr /></section><a name="includePom"><section> -<h4><a name="a.3CincludePom.3E"></a><includePom></h4><a name="a.3CincludePom.3E"></a></a> -<div>Specifies whether or not to include the POM file in the sources-jar.</div> +<li><strong>Required</strong>: <code>No</code></li></ul><hr /></section><a name="includePom"></a><section> +<h4><a name="a.3CincludePom.3E"></a><includePom></h4><a name="a.3CincludePom.3E"></a> +<div>Specifies whether to include the POM file in the sources-jar.</div> <ul> <li><strong>Type</strong>: <code>boolean</code></li> <li><strong>Since</strong>: <code>2.1</code></li> -<li><strong>Required</strong>: <code>report.plugin.goal.no</code></li> -<li><strong>User Property</strong>: <code>maven.source.includePom</code></li> -<li><strong>Default</strong>: <code>false</code></li></ul><hr /></section><a name="includes"><section> -<h4><a name="a.3Cincludes.3E"></a><includes></h4><a name="a.3Cincludes.3E"></a></a> +<li><strong>Required</strong>: <code>No</code></li></ul><hr /></section><a name="includes"></a><section> +<h4><a name="a.3Cincludes.3E"></a><includes></h4><a name="a.3Cincludes.3E"></a> <div>List of files to include. Specified as fileset patterns which are relative to the input directory whose contents is being packaged into the JAR.</div> <ul> <li><strong>Type</strong>: <code>java.lang.String[]</code></li> <li><strong>Since</strong>: <code>2.1</code></li> -<li><strong>Required</strong>: <code>report.plugin.goal.no</code></li></ul><hr /></section><a name="outputDirectory"><section> -<h4><a name="a.3CoutputDirectory.3E"></a><outputDirectory></h4><a name="a.3CoutputDirectory.3E"></a></a> +<li><strong>Required</strong>: <code>No</code></li></ul><hr /></section><a name="outputDirectory"></a><section> +<h4><a name="a.3CoutputDirectory.3E"></a><outputDirectory></h4><a name="a.3CoutputDirectory.3E"></a> <div>The directory where the generated archive file will be put.</div> <ul> -<li><strong>Type</strong>: <code>java.io.File</code></li> -<li><strong>Required</strong>: <code>report.plugin.goal.no</code></li> -<li><strong>Default</strong>: <code>${project.build.directory}</code></li></ul><hr /></section><a name="outputTimestamp"><section> -<h4><a name="a.3CoutputTimestamp.3E"></a><outputTimestamp></h4><a name="a.3CoutputTimestamp.3E"></a></a> +<li><strong>Type</strong>: <code>java.nio.file.Path</code></li> +<li><strong>Required</strong>: <code>No</code></li></ul><hr /></section><a name="outputTimestamp"></a><section> +<h4><a name="a.3CoutputTimestamp.3E"></a><outputTimestamp></h4><a name="a.3CoutputTimestamp.3E"></a> <div>Timestamp for reproducible output archive entries, either formatted as ISO 8601 <code>yyyy-MM-dd'T'HH:mm:ssXXX</code> or as an int representing seconds since the epoch (like <a href="https://reproducible-builds.org/docs/source-date-epoch/">SOURCE_DATE_EPOCH</a>).</div> <ul> <li><strong>Type</strong>: <code>java.lang.String</code></li> <li><strong>Since</strong>: <code>3.2.0</code></li> -<li><strong>Required</strong>: <code>report.plugin.goal.no</code></li> -<li><strong>Default</strong>: <code>${project.build.outputTimestamp}</code></li></ul><hr /></section><a name="skipSource"><section> -<h4><a name="a.3CskipSource.3E"></a><skipSource></h4><a name="a.3CskipSource.3E"></a></a> +<li><strong>Required</strong>: <code>No</code></li></ul><hr /></section><a name="skipSource"></a><section> +<h4><a name="a.3CskipSource.3E"></a><skipSource></h4><a name="a.3CskipSource.3E"></a> <div>A flag used to disable the source procedure. This is primarily intended for usage from the command line to occasionally adjust the build.</div> <ul> <li><strong>Type</strong>: <code>boolean</code></li> <li><strong>Since</strong>: <code>2.2</code></li> -<li><strong>Required</strong>: <code>report.plugin.goal.no</code></li> -<li><strong>User Property</strong>: <code>maven.source.skip</code></li> -<li><strong>Default</strong>: <code>false</code></li></ul><hr /></section><a name="useDefaultExcludes"><section> -<h4><a name="a.3CuseDefaultExcludes.3E"></a><useDefaultExcludes></h4><a name="a.3CuseDefaultExcludes.3E"></a></a> +<li><strong>Required</strong>: <code>No</code></li></ul><hr /></section><a name="useDefaultExcludes"></a><section> +<h4><a name="a.3CuseDefaultExcludes.3E"></a><useDefaultExcludes></h4><a name="a.3CuseDefaultExcludes.3E"></a> <div>Exclude commonly excluded files such as SCM configuration. These are defined in the plexus FileUtils.getDefaultExcludes()</div> <ul> <li><strong>Type</strong>: <code>boolean</code></li> <li><strong>Since</strong>: <code>2.1</code></li> -<li><strong>Required</strong>: <code>report.plugin.goal.no</code></li> -<li><strong>User Property</strong>: <code>maven.source.useDefaultExcludes</code></li> -<li><strong>Default</strong>: <code>true</code></li></ul><hr /></section><a name="useDefaultManifestFile"><section> -<h4><a name="a.3CuseDefaultManifestFile.3E"></a><useDefaultManifestFile></h4><a name="a.3CuseDefaultManifestFile.3E"></a></a> +<li><strong>Required</strong>: <code>No</code></li></ul><hr /></section><a name="useDefaultManifestFile"></a><section> +<h4><a name="a.3CuseDefaultManifestFile.3E"></a><useDefaultManifestFile></h4><a name="a.3CuseDefaultManifestFile.3E"></a> <div>Set this to <code>true</code> to enable the use of the <code>defaultManifestFile</code>. <br /></div> <ul> <li><strong>Type</strong>: <code>boolean</code></li> <li><strong>Since</strong>: <code>2.1</code></li> -<li><strong>Required</strong>: <code>report.plugin.goal.no</code></li> -<li><strong>User Property</strong>: <code>maven.source.useDefaultManifestFile</code></li> -<li><strong>Default</strong>: <code>false</code></li></ul></section></section></section> - </main> +<li><strong>Required</strong>: <code>No</code></li></ul></section></section></section> </div> </div> - <hr/> - <footer> - <div class="container-fluid"> - <div class="row-fluid"> - <p>© 2002–2024 -<a href="https://www.apache.org/">The Apache Software Foundation</a> -</p> - </div> + <div class="clear"> + <hr/> + </div> + <div id="footer"> + <div class="xright"> + Copyright © 2002–2024<a href="https://www.apache.org/">The Apache Software Foundation</a>. +. </div> + <div class="clear"> + <hr/> </div> - </footer> -<script> - if(anchors) { - anchors.add(); - } -</script> + </div> </body> </html> \ No newline at end of file
Modified: maven/website/components/plugins-archives/maven-source-plugin-LATEST/usage.html ============================================================================== --- maven/website/components/plugins-archives/maven-source-plugin-LATEST/usage.html (original) +++ maven/website/components/plugins-archives/maven-source-plugin-LATEST/usage.html Wed Jun 26 08:32:51 2024 @@ -1,135 +1,83 @@ <!DOCTYPE html> - - <!-- - | Generated by Apache Maven Doxia Site Renderer 1.11.1 from src/site/apt/usage.apt.vm at 2024-03-30 - | Rendered using Apache Maven Fluido Skin 1.11.2 + | Generated by Apache Maven Doxia Site Renderer 1.11.1 from src/site/apt/usage.apt.vm at 2024-06-26 + + | Rendered using Apache Maven Default Skin --> -<html xmlns="http://www.w3.org/1999/xhtml" lang="en"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta charset="UTF-8" /> - <meta name="viewport" content="width=device-width, initial-scale=1" /> + <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="generator" content="Apache Maven Doxia Site Renderer 1.11.1" /> <meta name="author" content="Maria Odea Ching" /> <meta name="date" content="11 July 2006" /> <title>Apache Maven Source Plugin – Usage</title> - <link rel="stylesheet" href="./css/apache-maven-fluido-1.11.2.min.css" /> + <link rel="stylesheet" href="./css/maven-base.css" /> + <link rel="stylesheet" href="./css/maven-theme.css" /> <link rel="stylesheet" href="./css/site.css" /> <link rel="stylesheet" href="./css/print.css" media="print" /> - <script src="./js/apache-maven-fluido-1.11.2.min.js"></script> - - <!-- Matomo --> - <script> - var _paq = window._paq = window._paq || []; - _paq.push(['disableCookies']); - _paq.push(['trackPageView']); - _paq.push(['enableLinkTracking']); - - (function() { - var u="https://analytics.apache.org/"; - _paq.push(['setTrackerUrl', u+'/matomo.php']); - _paq.push(['setSiteId', '3']); - var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; - g.async=true; g.src=u+'/matomo.js'; s.parentNode.insertBefore(g,s); - })(); - </script> - <!-- End Matomo Code --> </head> - <body class="topBarDisabled"> - <div class="container-fluid"> - <header> - <div id="banner"> - <div class="pull-left"><a href="https://www.apache.org/" id="bannerLeft"><img src="../../images/apache-maven-project.png" alt="Apache Maven Source Plugin" style="" /></a></div> - <div class="pull-right"><a href="../../" id="bannerRight"><img src="../../images/maven-logo-black-on-white.png" alt="" style="" /></a></div> - <div class="clear"><hr/></div> - </div> - - <div id="breadcrumbs"> - <ul class="breadcrumb"> - <li><a href="https://www.apache.org/" class="externalLink" title="Apache">Apache</a><span class="divider">/</span></li> - <li><a href="../../index.html" title="Maven">Maven</a><span class="divider">/</span></li> - <li><a href="../index.html" title="Plugins">Plugins</a><span class="divider">/</span></li> - <li><a href="index.html" title="Apache Maven Source Plugin">Apache Maven Source Plugin</a><span class="divider">/</span></li> - <li class="active ">Usage <a href="https://github.com/apache/maven-source-plugin/tree/maven-source-plugin-3.3.1/src/site/apt/usage.apt.vm"><img src="./images/accessories-text-editor.png" title="Edit" /></a></li> - <li id="publishDate" class="pull-right"><span class="divider">|</span> Last Published: 2024-03-30</li> - <li id="projectVersion" class="pull-right">Version: 3.3.1</li> - </ul> - </div> - </header> - <div class="row-fluid"> - <header id="leftColumn" class="span2"> - <nav class="well sidebar-nav"> - <ul class="nav nav-list"> - <li class="nav-header">Overview</li> - <li><a href="index.html" title="Introduction"><span class="none"></span>Introduction</a></li> - <li><a href="plugin-info.html" title="Goals"><span class="none"></span>Goals</a></li> - <li class="active"><a><span class="none"></span>Usage</a></li> - <li><a href="faq.html" title="FAQ"><span class="none"></span>FAQ</a></li> - <li><a href="https://www.apache.org/licenses/" class="externalLink" title="License"><span class="none"></span>License</a></li> - <li><a href="download.html" title="Download"><span class="none"></span>Download</a></li> - <li class="nav-header">Examples</li> - <li><a href="examples/configureplugin.html" title="Configuring Source Plugin"><span class="none"></span>Configuring Source Plugin</a></li> - <li class="nav-header">Project Documentation</li> - <li><a href="project-info.html" title="Project Information"><span class="icon-chevron-right"></span>Project Information</a></li> - <li><a href="project-reports.html" title="Project Reports"><span class="icon-chevron-right"></span>Project Reports</a></li> - <li class="nav-header">Maven Projects</li> - <li><a href="../../ref/current" title="Maven"><span class="none"></span>Maven</a></li> - <li><a href="../../archetypes/index.html" title="Archetypes"><span class="none"></span>Archetypes</a></li> - <li><a href="../../extensions/index.html" title="Extensions"><span class="none"></span>Extensions</a></li> - <li><a href="../../pom/index.html" title="Parent POMs"><span class="none"></span>Parent POMs</a></li> - <li><a href="../index.html" title="Plugins"><span class="none"></span>Plugins</a></li> - <li><a href="../../skins/index.html" title="Skins"><span class="none"></span>Skins</a></li> - <li><a href="" title=""><span class="icon-chevron-down"></span></a> - <ul class="nav nav-list"> - <li><a href="../../archetype/index.html" title="Archetype"><span class="none"></span>Archetype</a></li> - <li><a href="../../resolver/index.html" title="Artifact Resolver"><span class="none"></span>Artifact Resolver</a></li> - <li><a href="../../doxia/index.html" title="Doxia"><span class="none"></span>Doxia</a></li> - <li><a href="../../maven-indexer/index.html" title="Indexer"><span class="none"></span>Indexer</a></li> - <li><a href="../../jxr/index.html" title="JXR"><span class="none"></span>JXR</a></li> - <li><a href="../../plugin-testing/index.html" title="Plugin Testing"><span class="none"></span>Plugin Testing</a></li> - <li><a href="../../plugin-tools/index.html" title="Plugin Tools"><span class="none"></span>Plugin Tools</a></li> - <li><a href="../../apache-resource-bundles/index.html" title="Resource Bundles"><span class="none"></span>Resource Bundles</a></li> - <li><a href="../../scm/index.html" title="SCM"><span class="none"></span>SCM</a></li> - <li><a href="../../shared/index.html" title="Shared Components"><span class="none"></span>Shared Components</a></li> - <li><a href="../../surefire/index.html" title="Surefire"><span class="none"></span>Surefire</a></li> - <li><a href="../../wagon/index.html" title="Wagon"><span class="none"></span>Wagon</a></li> - </ul></li> - <li class="nav-header">ASF</li> - <li><a href="https://www.apache.org/foundation/how-it-works.html" class="externalLink" title="How Apache Works"><span class="none"></span>How Apache Works</a></li> - <li><a href="https://www.apache.org/foundation/" class="externalLink" title="Foundation"><span class="none"></span>Foundation</a></li> - <li><a href="https://privacy.apache.org/policies/privacy-policy-public.html" class="externalLink" title="Data Privacy"><span class="none"></span>Data Privacy</a></li> - <li><a href="https://www.apache.org/foundation/sponsorship.html" class="externalLink" title="Sponsoring Apache"><span class="none"></span>Sponsoring Apache</a></li> - <li><a href="https://www.apache.org/foundation/thanks.html" class="externalLink" title="Thanks"><span class="none"></span>Thanks</a></li> - </ul> - </nav> - <div class="well sidebar-nav"> - <div id="poweredBy"> - <div class="clear"></div> - <div class="clear"></div> - <div class="clear"></div> -<a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy"><img class="builtBy" alt="Built by Maven" src="./images/logos/maven-feather.png" /></a> - </div> - </div> - </header> - <main id="bodyColumn" class="span10" > + <body class="composite"> + <div id="banner"> +<div id="bannerLeft">Apache Maven Source Plugin +</div> + <div class="clear"> + <hr/> + </div> + </div> + <div id="breadcrumbs"> + <div class="xleft"> + <span id="publishDate">Last Published: 2024-06-26</span> + | <span id="projectVersion">Version: 4.0.0-beta-1</span> + </div> + <div class="xright"> </div> + <div class="clear"> + <hr/> + </div> + </div> + <div id="leftColumn"> + <div id="navcolumn"> + <h5>Overview</h5> + <ul> + <li class="none"><a href="index.html" title="Introduction">Introduction</a></li> + <li class="none"><a href="plugin-info.html" title="Goals">Goals</a></li> + <li class="none"><strong>Usage</strong></li> + <li class="none"><a href="faq.html" title="FAQ">FAQ</a></li> + <li class="none"><a href="https://www.apache.org/licenses/" class="externalLink" title="License">License</a></li> + <li class="none"><a href="download.html" title="Download">Download</a></li> + </ul> + <h5>Examples</h5> + <ul> + <li class="none"><a href="examples/configureplugin.html" title="Configuring Source Plugin">Configuring Source Plugin</a></li> + </ul> + <a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy"> + <img class="poweredBy" alt="Built by Maven" src="./images/logos/maven-feather.png" /> + </a> + </div> + </div> + <div id="bodyColumn"> + <div id="contentBox"> <section> <h2><a name="Usage"></a>Usage</h2> <p>The source plugin can be used to create a jar file of the project sources from the command line or by binding the goal to the project's build lifecycle. To generate the jar from the command line, use the following command:</p> -<div class="source"><pre class="prettyprint linenums">mvn source:jar</pre></div> +<div class="source"> +<pre>mvn source:jar</pre></div> <p>A jar file of the test sources can also be generated by executing:</p> -<div class="source"><pre class="prettyprint linenums">mvn source:test-jar</pre></div><section> +<div class="source"> +<pre>mvn source:test-jar</pre></div><section> <h3><a name="Installing_the_sources_along_with_your_artifact"></a>Installing the sources along with your artifact</h3> <p>There are two ways to do this. You can either bind this plugin to a phase or you can add it to a profile. The goals <a href="./jar-no-fork-mojo.html">source:jar-no-fork</a> and <a href="./test-jar-no-fork-mojo.html">source:test-jar-no-fork</a> are preferred for binding the goal to the build lifecycle.</p><section> <h4><a name="Installing_the_sources_using_a_phase_binding"></a>Installing the sources using a phase binding</h4> <p>Here is how you would configure the plugin in your <code>pom.xml</code> to run automatically during the <i>verify</i> phase:</p> -<div class="source"><pre class="prettyprint linenums"><project> +<div class="source"> +<pre><project> ... <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-source-plugin</artifactId> - <version>3.3.1</version> + <version>4.0.0-beta-1</version> <executions> <execution> <id>attach-sources</id> @@ -147,7 +95,8 @@ <p>We are using the <i>verify</i> phase here because it is the phase that comes before the <i>install</i> phase, thus making sure that the sources jar has been created <b>before</b> the install takes place.</p></section><section> <h4><a name="Installing_the_sources_using_a_profile"></a>Installing the sources using a profile</h4> <p>If you want to install a jar of your sources along with your artifact during the release process, you can add this to your <code>pom.xml</code> file:</p> -<div class="source"><pre class="prettyprint linenums"><project> +<div class="source"> +<pre><project> ... <profiles> <profile> @@ -157,7 +106,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-source-plugin</artifactId> - <version>3.3.1</version> + <version>4.0.0-beta-1</version> <executions> <execution> <id>attach-sources</id> @@ -173,23 +122,18 @@ </profiles> ... </project></pre></div></section></section></section> - </main> </div> </div> - <hr/> - <footer> - <div class="container-fluid"> - <div class="row-fluid"> - <p>© 2002–2024 -<a href="https://www.apache.org/">The Apache Software Foundation</a> -</p> - </div> - </div> - </footer> -<script> - if(anchors) { - anchors.add(); - } -</script> + <div class="clear"> + <hr/> + </div> + <div id="footer"> + <div class="xright"> + Copyright © 2002–2024<a href="https://www.apache.org/">The Apache Software Foundation</a>. +. </div> + <div class="clear"> + <hr/> + </div> + </div> </body> </html> \ No newline at end of file Modified: maven/website/components/plugins-archives/maven-source-plugin-LATEST/xref-test/allclasses-frame.html ============================================================================== --- maven/website/components/plugins-archives/maven-source-plugin-LATEST/xref-test/allclasses-frame.html (original) +++ maven/website/components/plugins-archives/maven-source-plugin-LATEST/xref-test/allclasses-frame.html Wed Jun 26 08:32:51 2024 @@ -12,15 +12,7 @@ <div class="indexContainer"> <ul> <li><a href="org/apache/maven/plugins/source/AbstractSourcePluginTestCase.html#AbstractSourcePluginTestCase" target="classFrame">AbstractSourcePluginTestCase</a></li> - <li><a href="org/apache/maven/plugins/source/stubs/DefaultArtifactHandlerStub.html#DefaultArtifactHandlerStub" target="classFrame">DefaultArtifactHandlerStub</a></li> - <li><a href="org/apache/maven/plugins/source/stubs/Project001Stub.html#Project001Stub" target="classFrame">Project001Stub</a></li> - <li><a href="org/apache/maven/plugins/source/stubs/Project003Stub.html#Project003Stub" target="classFrame">Project003Stub</a></li> - <li><a href="org/apache/maven/plugins/source/stubs/Project005Stub.html#Project005Stub" target="classFrame">Project005Stub</a></li> - <li><a href="org/apache/maven/plugins/source/stubs/Project007Stub.html#Project007Stub" target="classFrame">Project007Stub</a></li> - <li><a href="org/apache/maven/plugins/source/stubs/Project009Stub.html#Project009Stub" target="classFrame">Project009Stub</a></li> - <li><a href="org/apache/maven/plugins/source/stubs/Project010Stub.html#Project010Stub" target="classFrame">Project010Stub</a></li> <li><a href="org/apache/maven/plugins/source/SourceJarMojoTest.html#SourceJarMojoTest" target="classFrame">SourceJarMojoTest</a></li> - <li><a href="org/apache/maven/plugins/source/stubs/SourcePluginArtifactStub.html#SourcePluginArtifactStub" target="classFrame">SourcePluginArtifactStub</a></li> <li><a href="org/apache/maven/plugins/source/TestSourceJarMojoTest.html#TestSourceJarMojoTest" target="classFrame">TestSourceJarMojoTest</a></li> </ul> </div> Modified: maven/website/components/plugins-archives/maven-source-plugin-LATEST/xref-test/index.html ============================================================================== --- maven/website/components/plugins-archives/maven-source-plugin-LATEST/xref-test/index.html (original) +++ maven/website/components/plugins-archives/maven-source-plugin-LATEST/xref-test/index.html Wed Jun 26 08:32:51 2024 @@ -4,7 +4,7 @@ <!-- this is a JXR report set (jdk8) --> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> - <title>Apache Maven Source Plugin 3.3.1 Reference</title> + <title>Apache Maven Source Plugin 4.0.0-beta-1 Reference</title> <script type="text/javascript"> tmpTargetPage = "" + window.location.search; if (tmpTargetPage != "" && tmpTargetPage != "undefined") Modified: maven/website/components/plugins-archives/maven-source-plugin-LATEST/xref-test/org/apache/maven/plugins/source/AbstractSourcePluginTestCase.html ============================================================================== --- maven/website/components/plugins-archives/maven-source-plugin-LATEST/xref-test/org/apache/maven/plugins/source/AbstractSourcePluginTestCase.html (original) +++ maven/website/components/plugins-archives/maven-source-plugin-LATEST/xref-test/org/apache/maven/plugins/source/AbstractSourcePluginTestCase.html Wed Jun 26 08:32:51 2024 @@ -35,163 +35,72 @@ <a class="jxr_linenumber" name="L27" href="#L27">27</a> <strong class="jxr_keyword">import</strong> java.util.zip.ZipEntry; <a class="jxr_linenumber" name="L28" href="#L28">28</a> <strong class="jxr_keyword">import</strong> java.util.zip.ZipFile; <a class="jxr_linenumber" name="L29" href="#L29">29</a> -<a class="jxr_linenumber" name="L30" href="#L30">30</a> <strong class="jxr_keyword">import</strong> org.apache.maven.plugin.testing.AbstractMojoTestCase; -<a class="jxr_linenumber" name="L31" href="#L31">31</a> -<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 Stephane Nicoll</em> -<a class="jxr_linenumber" name="L34" href="#L34">34</a> <em class="jxr_javadoccomment"> */</em> -<a class="jxr_linenumber" name="L35" href="#L35">35</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">abstract</strong> <strong class="jxr_keyword">class</strong> <a name="AbstractSourcePluginTestCase" href="../../../../../org/apache/maven/plugins/source/AbstractSourcePluginTestCase.html#AbstractSourcePluginTestCase">AbstractSourcePluginTestCase</a> <strong class="jxr_keyword">extends</strong> AbstractMojoTestCase { -<a class="jxr_linenumber" name="L36" href="#L36">36</a> -<a class="jxr_linenumber" name="L37" href="#L37">37</a> <strong class="jxr_keyword">protected</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">final</strong> String FINAL_NAME_PREFIX = <span class="jxr_string">"maven-source-plugin-test-"</span>; +<a class="jxr_linenumber" name="L30" href="#L30">30</a> <strong class="jxr_keyword">import</strong> <strong class="jxr_keyword">static</strong> org.apache.maven.api.plugin.testing.MojoExtension.getBasedir; +<a class="jxr_linenumber" name="L31" href="#L31">31</a> <strong class="jxr_keyword">import</strong> <strong class="jxr_keyword">static</strong> org.junit.jupiter.api.Assertions.assertFalse; +<a class="jxr_linenumber" name="L32" href="#L32">32</a> <strong class="jxr_keyword">import</strong> <strong class="jxr_keyword">static</strong> org.junit.jupiter.api.Assertions.assertTrue; +<a class="jxr_linenumber" name="L33" href="#L33">33</a> +<a class="jxr_linenumber" name="L34" href="#L34">34</a> <em class="jxr_javadoccomment">/**</em> +<a class="jxr_linenumber" name="L35" href="#L35">35</a> <em class="jxr_javadoccomment"> * @author Stephane Nicoll</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">abstract</strong> <strong class="jxr_keyword">class</strong> <a name="AbstractSourcePluginTestCase" href="../../../../../org/apache/maven/plugins/source/AbstractSourcePluginTestCase.html#AbstractSourcePluginTestCase">AbstractSourcePluginTestCase</a> { <a class="jxr_linenumber" name="L38" href="#L38">38</a> -<a class="jxr_linenumber" name="L39" href="#L39">39</a> <strong class="jxr_keyword">protected</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">final</strong> String FINAL_NAME_SUFFIX = <span class="jxr_string">"-99.0"</span>; +<a class="jxr_linenumber" name="L39" href="#L39">39</a> <strong class="jxr_keyword">protected</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">final</strong> String FINAL_NAME_PREFIX = <span class="jxr_string">"maven-source-plugin-test-"</span>; <a class="jxr_linenumber" name="L40" href="#L40">40</a> -<a class="jxr_linenumber" name="L41" href="#L41">41</a> <strong class="jxr_keyword">protected</strong> <strong class="jxr_keyword">abstract</strong> String getGoal(); +<a class="jxr_linenumber" name="L41" href="#L41">41</a> <strong class="jxr_keyword">protected</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">final</strong> String FINAL_NAME_SUFFIX = <span class="jxr_string">"-99.0"</span>; <a class="jxr_linenumber" name="L42" href="#L42">42</a> -<a class="jxr_linenumber" name="L43" href="#L43">43</a> <em class="jxr_javadoccomment">/**</em> -<a class="jxr_linenumber" name="L44" href="#L44">44</a> <em class="jxr_javadoccomment"> * Execute the source plugin for the specified project.</em> -<a class="jxr_linenumber" name="L45" href="#L45">45</a> <em class="jxr_javadoccomment"> *</em> -<a class="jxr_linenumber" name="L46" href="#L46">46</a> <em class="jxr_javadoccomment"> * @param projectName the name of the project</em> -<a class="jxr_linenumber" name="L47" href="#L47">47</a> <em class="jxr_javadoccomment"> * @param classifier The classifier.</em> -<a class="jxr_linenumber" name="L48" href="#L48">48</a> <em class="jxr_javadoccomment"> * @throws Exception if an error occurred</em> -<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> <strong class="jxr_keyword">protected</strong> <strong class="jxr_keyword">void</strong> executeMojo(<strong class="jxr_keyword">final</strong> String projectName, String classifier) <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(getBasedir(), getTestDir(projectName) + <span class="jxr_string">"/pom.xml"</span>); -<a class="jxr_linenumber" name="L52" href="#L52">52</a> AbstractSourceJarMojo mojo = (AbstractSourceJarMojo) lookupMojo(getGoal(), testPom); -<a class="jxr_linenumber" name="L53" href="#L53">53</a> -<a class="jxr_linenumber" name="L54" href="#L54">54</a> <em class="jxr_comment">// Without the following line the tests will fail, cause the project.getFile() will result with null.</em> -<a class="jxr_linenumber" name="L55" href="#L55">55</a> mojo.getProject().setFile(testPom); +<a class="jxr_linenumber" name="L43" href="#L43">43</a> <strong class="jxr_keyword">protected</strong> <strong class="jxr_keyword">void</strong> assertSourceArchive(<strong class="jxr_keyword">final</strong> File testTargetDir, <strong class="jxr_keyword">final</strong> String projectName) { +<a class="jxr_linenumber" name="L44" href="#L44">44</a> <strong class="jxr_keyword">final</strong> File expectedFile = getSourceArchive(testTargetDir, projectName); +<a class="jxr_linenumber" name="L45" href="#L45">45</a> assertTrue(expectedFile.exists(), <span class="jxr_string">"Source archive does not exist["</span> + expectedFile.getAbsolutePath() + <span class="jxr_string">"]"</span>); +<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> <strong class="jxr_keyword">protected</strong> <strong class="jxr_keyword">void</strong> assertTestSourceArchive(<strong class="jxr_keyword">final</strong> File testTargetDir, <strong class="jxr_keyword">final</strong> String projectName) { +<a class="jxr_linenumber" name="L49" href="#L49">49</a> <strong class="jxr_keyword">final</strong> File expectedFile = getTestSourceArchive(testTargetDir, projectName); +<a class="jxr_linenumber" name="L50" href="#L50">50</a> assertTrue(expectedFile.exists(), <span class="jxr_string">"Test source archive does not exist["</span> + expectedFile.getAbsolutePath() + <span class="jxr_string">"]"</span>); +<a class="jxr_linenumber" name="L51" href="#L51">51</a> } +<a class="jxr_linenumber" name="L52" href="#L52">52</a> +<a class="jxr_linenumber" name="L53" href="#L53">53</a> <strong class="jxr_keyword">protected</strong> File getSourceArchive(<strong class="jxr_keyword">final</strong> File testTargetDir, <strong class="jxr_keyword">final</strong> String projectName) { +<a class="jxr_linenumber" name="L54" href="#L54">54</a> <strong class="jxr_keyword">return</strong> <strong class="jxr_keyword">new</strong> File(testTargetDir, buildFinalSourceName(projectName) + <span class="jxr_string">".jar"</span>); +<a class="jxr_linenumber" name="L55" href="#L55">55</a> } <a class="jxr_linenumber" name="L56" href="#L56">56</a> -<a class="jxr_linenumber" name="L57" href="#L57">57</a> setVariableValueToObject(mojo, <span class="jxr_string">"classifier"</span>, classifier); -<a class="jxr_linenumber" name="L58" href="#L58">58</a> -<a class="jxr_linenumber" name="L59" href="#L59">59</a> mojo.execute(); -<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> <em class="jxr_javadoccomment">/**</em> -<a class="jxr_linenumber" name="L63" href="#L63">63</a> <em class="jxr_javadoccomment"> * Executes the specified projects and asserts the given artifacts.</em> -<a class="jxr_linenumber" name="L64" href="#L64">64</a> <em class="jxr_javadoccomment"> *</em> -<a class="jxr_linenumber" name="L65" href="#L65">65</a> <em class="jxr_javadoccomment"> * @param projectName the project to test</em> -<a class="jxr_linenumber" name="L66" href="#L66">66</a> <em class="jxr_javadoccomment"> * @param expectSourceArchive if a source archive is expected</em> -<a class="jxr_linenumber" name="L67" href="#L67">67</a> <em class="jxr_javadoccomment"> * @param expectTestSourceArchive if a test source archive is expected</em> -<a class="jxr_linenumber" name="L68" href="#L68">68</a> <em class="jxr_javadoccomment"> * @param expectedSourceFiles the expected files in the source archive, if any</em> -<a class="jxr_linenumber" name="L69" href="#L69">69</a> <em class="jxr_javadoccomment"> * @param expectedTestSourceFiles the expected files in the test source archive, if any</em> -<a class="jxr_linenumber" name="L70" href="#L70">70</a> <em class="jxr_javadoccomment"> * @param classifier the classifier.</em> -<a class="jxr_linenumber" name="L71" href="#L71">71</a> <em class="jxr_javadoccomment"> * @return the base directory of the project</em> -<a class="jxr_linenumber" name="L72" href="#L72">72</a> <em class="jxr_javadoccomment"> * @throws Exception if any error occurs</em> -<a class="jxr_linenumber" name="L73" href="#L73">73</a> <em class="jxr_javadoccomment"> */</em> -<a class="jxr_linenumber" name="L74" href="#L74">74</a> <strong class="jxr_keyword">protected</strong> File doTestProject( -<a class="jxr_linenumber" name="L75" href="#L75">75</a> <strong class="jxr_keyword">final</strong> String projectName, -<a class="jxr_linenumber" name="L76" href="#L76">76</a> <strong class="jxr_keyword">boolean</strong> expectSourceArchive, -<a class="jxr_linenumber" name="L77" href="#L77">77</a> <strong class="jxr_keyword">boolean</strong> expectTestSourceArchive, -<a class="jxr_linenumber" name="L78" href="#L78">78</a> <strong class="jxr_keyword">final</strong> String[] expectedSourceFiles, -<a class="jxr_linenumber" name="L79" href="#L79">79</a> <strong class="jxr_keyword">final</strong> String[] expectedTestSourceFiles, -<a class="jxr_linenumber" name="L80" href="#L80">80</a> String classifier) -<a class="jxr_linenumber" name="L81" href="#L81">81</a> <strong class="jxr_keyword">throws</strong> Exception { -<a class="jxr_linenumber" name="L82" href="#L82">82</a> executeMojo(projectName, classifier); -<a class="jxr_linenumber" name="L83" href="#L83">83</a> <strong class="jxr_keyword">final</strong> File testTargetDir = getTestTargetDir(projectName); -<a class="jxr_linenumber" name="L84" href="#L84">84</a> -<a class="jxr_linenumber" name="L85" href="#L85">85</a> <strong class="jxr_keyword">if</strong> (expectSourceArchive) { -<a class="jxr_linenumber" name="L86" href="#L86">86</a> assertSourceArchive(testTargetDir, projectName); -<a class="jxr_linenumber" name="L87" href="#L87">87</a> assertJarContent(getSourceArchive(testTargetDir, projectName), expectedSourceFiles); -<a class="jxr_linenumber" name="L88" href="#L88">88</a> } -<a class="jxr_linenumber" name="L89" href="#L89">89</a> -<a class="jxr_linenumber" name="L90" href="#L90">90</a> <strong class="jxr_keyword">if</strong> (expectTestSourceArchive) { -<a class="jxr_linenumber" name="L91" href="#L91">91</a> assertTestSourceArchive(testTargetDir, projectName); -<a class="jxr_linenumber" name="L92" href="#L92">92</a> assertJarContent(getTestSourceArchive(testTargetDir, projectName), expectedTestSourceFiles); -<a class="jxr_linenumber" name="L93" href="#L93">93</a> } -<a class="jxr_linenumber" name="L94" href="#L94">94</a> -<a class="jxr_linenumber" name="L95" href="#L95">95</a> <strong class="jxr_keyword">return</strong> testTargetDir; -<a class="jxr_linenumber" name="L96" href="#L96">96</a> } -<a class="jxr_linenumber" name="L97" href="#L97">97</a> -<a class="jxr_linenumber" name="L98" href="#L98">98</a> <em class="jxr_javadoccomment">/**</em> -<a class="jxr_linenumber" name="L99" href="#L99">99</a> <em class="jxr_javadoccomment"> * Executes the specified projects and asserts the given artifacts for a source archive.</em> -<a class="jxr_linenumber" name="L100" href="#L100">100</a> <em class="jxr_javadoccomment"> *</em> -<a class="jxr_linenumber" name="L101" href="#L101">101</a> <em class="jxr_javadoccomment"> * @param projectName the project to test</em> -<a class="jxr_linenumber" name="L102" href="#L102">102</a> <em class="jxr_javadoccomment"> * @param expectedSourceFiles the expected files in the source archive, if any</em> -<a class="jxr_linenumber" name="L103" href="#L103">103</a> <em class="jxr_javadoccomment"> * @param classifier the classifier.</em> -<a class="jxr_linenumber" name="L104" href="#L104">104</a> <em class="jxr_javadoccomment"> * @return the base directory of the project</em> -<a class="jxr_linenumber" name="L105" href="#L105">105</a> <em class="jxr_javadoccomment"> * @throws Exception if any error occurs</em> -<a class="jxr_linenumber" name="L106" href="#L106">106</a> <em class="jxr_javadoccomment"> */</em> -<a class="jxr_linenumber" name="L107" href="#L107">107</a> <strong class="jxr_keyword">protected</strong> File doTestProjectWithSourceArchive( -<a class="jxr_linenumber" name="L108" href="#L108">108</a> <strong class="jxr_keyword">final</strong> String projectName, <strong class="jxr_keyword">final</strong> String[] expectedSourceFiles, String classifier) <strong class="jxr_keyword">throws</strong> Exception { -<a class="jxr_linenumber" name="L109" href="#L109">109</a> <strong class="jxr_keyword">return</strong> doTestProject(projectName, <strong class="jxr_keyword">true</strong>, false, expectedSourceFiles, <strong class="jxr_keyword">null</strong>, classifier); -<a class="jxr_linenumber" name="L110" href="#L110">110</a> } -<a class="jxr_linenumber" name="L111" href="#L111">111</a> -<a class="jxr_linenumber" name="L112" href="#L112">112</a> <em class="jxr_javadoccomment">/**</em> -<a class="jxr_linenumber" name="L113" href="#L113">113</a> <em class="jxr_javadoccomment"> * Executes the specified projects and asserts the given artifacts for a test source archive.</em> -<a class="jxr_linenumber" name="L114" href="#L114">114</a> <em class="jxr_javadoccomment"> *</em> -<a class="jxr_linenumber" name="L115" href="#L115">115</a> <em class="jxr_javadoccomment"> * @param projectName the project to test</em> -<a class="jxr_linenumber" name="L116" href="#L116">116</a> <em class="jxr_javadoccomment"> * @param expectedTestSourceFiles the expected files in the test source archive, if any</em> -<a class="jxr_linenumber" name="L117" href="#L117">117</a> <em class="jxr_javadoccomment"> * @param classifier the classifier.</em> -<a class="jxr_linenumber" name="L118" href="#L118">118</a> <em class="jxr_javadoccomment"> * @return the base directory of the project</em> -<a class="jxr_linenumber" name="L119" href="#L119">119</a> <em class="jxr_javadoccomment"> * @throws Exception if any error occurs</em> -<a class="jxr_linenumber" name="L120" href="#L120">120</a> <em class="jxr_javadoccomment"> */</em> -<a class="jxr_linenumber" name="L121" href="#L121">121</a> <strong class="jxr_keyword">protected</strong> File doTestProjectWithTestSourceArchive( -<a class="jxr_linenumber" name="L122" href="#L122">122</a> <strong class="jxr_keyword">final</strong> String projectName, <strong class="jxr_keyword">final</strong> String[] expectedTestSourceFiles, String classifier) <strong class="jxr_keyword">throws</strong> Exception { -<a class="jxr_linenumber" name="L123" href="#L123">123</a> <strong class="jxr_keyword">return</strong> doTestProject(projectName, false, <strong class="jxr_keyword">true</strong>, <strong class="jxr_keyword">null</strong>, expectedTestSourceFiles, classifier); -<a class="jxr_linenumber" name="L124" href="#L124">124</a> } -<a class="jxr_linenumber" name="L125" href="#L125">125</a> -<a class="jxr_linenumber" name="L126" href="#L126">126</a> <strong class="jxr_keyword">protected</strong> <strong class="jxr_keyword">void</strong> assertSourceArchive(<strong class="jxr_keyword">final</strong> File testTargetDir, <strong class="jxr_keyword">final</strong> String projectName) { -<a class="jxr_linenumber" name="L127" href="#L127">127</a> <strong class="jxr_keyword">final</strong> File expectedFile = getSourceArchive(testTargetDir, projectName); -<a class="jxr_linenumber" name="L128" href="#L128">128</a> assertTrue(<span class="jxr_string">"Source archive does not exist["</span> + expectedFile.getAbsolutePath() + <span class="jxr_string">"]"</span>, expectedFile.exists()); -<a class="jxr_linenumber" name="L129" href="#L129">129</a> } -<a class="jxr_linenumber" name="L130" href="#L130">130</a> -<a class="jxr_linenumber" name="L131" href="#L131">131</a> <strong class="jxr_keyword">protected</strong> <strong class="jxr_keyword">void</strong> assertTestSourceArchive(<strong class="jxr_keyword">final</strong> File testTargetDir, <strong class="jxr_keyword">final</strong> String projectName) { -<a class="jxr_linenumber" name="L132" href="#L132">132</a> <strong class="jxr_keyword">final</strong> File expectedFile = getTestSourceArchive(testTargetDir, projectName); -<a class="jxr_linenumber" name="L133" href="#L133">133</a> assertTrue(<span class="jxr_string">"Test source archive does not exist["</span> + expectedFile.getAbsolutePath() + <span class="jxr_string">"]"</span>, expectedFile.exists()); -<a class="jxr_linenumber" name="L134" href="#L134">134</a> } -<a class="jxr_linenumber" name="L135" href="#L135">135</a> -<a class="jxr_linenumber" name="L136" href="#L136">136</a> <strong class="jxr_keyword">protected</strong> File getSourceArchive(<strong class="jxr_keyword">final</strong> File testTargetDir, <strong class="jxr_keyword">final</strong> String projectName) { -<a class="jxr_linenumber" name="L137" href="#L137">137</a> <strong class="jxr_keyword">return</strong> <strong class="jxr_keyword">new</strong> File(testTargetDir, buildFinalSourceName(projectName) + <span class="jxr_string">".jar"</span>); -<a class="jxr_linenumber" name="L138" href="#L138">138</a> } -<a class="jxr_linenumber" name="L139" href="#L139">139</a> -<a class="jxr_linenumber" name="L140" href="#L140">140</a> <strong class="jxr_keyword">protected</strong> File getTestSourceArchive(<strong class="jxr_keyword">final</strong> File testTargetDir, <strong class="jxr_keyword">final</strong> String projectName) { -<a class="jxr_linenumber" name="L141" href="#L141">141</a> <strong class="jxr_keyword">return</strong> <strong class="jxr_keyword">new</strong> File(testTargetDir, buildFinalTestSourceName(projectName) + <span class="jxr_string">".jar"</span>); -<a class="jxr_linenumber" name="L142" href="#L142">142</a> } -<a class="jxr_linenumber" name="L143" href="#L143">143</a> -<a class="jxr_linenumber" name="L144" href="#L144">144</a> <strong class="jxr_keyword">protected</strong> String buildFinalSourceName(<strong class="jxr_keyword">final</strong> String projectName) { -<a class="jxr_linenumber" name="L145" href="#L145">145</a> <strong class="jxr_keyword">return</strong> FINAL_NAME_PREFIX + projectName + FINAL_NAME_SUFFIX + <span class="jxr_string">"-sources"</span>; -<a class="jxr_linenumber" name="L146" href="#L146">146</a> } -<a class="jxr_linenumber" name="L147" href="#L147">147</a> -<a class="jxr_linenumber" name="L148" href="#L148">148</a> <strong class="jxr_keyword">protected</strong> String buildFinalTestSourceName(<strong class="jxr_keyword">final</strong> String projectName) { -<a class="jxr_linenumber" name="L149" href="#L149">149</a> <strong class="jxr_keyword">return</strong> FINAL_NAME_PREFIX + projectName + FINAL_NAME_SUFFIX + <span class="jxr_string">"-test-sources"</span>; -<a class="jxr_linenumber" name="L150" href="#L150">150</a> } -<a class="jxr_linenumber" name="L151" href="#L151">151</a> -<a class="jxr_linenumber" name="L152" href="#L152">152</a> <strong class="jxr_keyword">protected</strong> File getTestDir(String projectName) <strong class="jxr_keyword">throws</strong> IOException { -<a class="jxr_linenumber" name="L153" href="#L153">153</a> File f = <strong class="jxr_keyword">new</strong> File(<span class="jxr_string">"target/test-classes/unit/"</span> + projectName); -<a class="jxr_linenumber" name="L154" href="#L154">154</a> <strong class="jxr_keyword">if</strong> (!<strong class="jxr_keyword">new</strong> File(f, <span class="jxr_string">"pom.xml"</span>).exists()) { -<a class="jxr_linenumber" name="L155" href="#L155">155</a> <strong class="jxr_keyword">throw</strong> <strong class="jxr_keyword">new</strong> IllegalStateException(<span class="jxr_string">"No pom file found in "</span> + f.getPath()); -<a class="jxr_linenumber" name="L156" href="#L156">156</a> } -<a class="jxr_linenumber" name="L157" href="#L157">157</a> <strong class="jxr_keyword">return</strong> f; -<a class="jxr_linenumber" name="L158" href="#L158">158</a> } -<a class="jxr_linenumber" name="L159" href="#L159">159</a> -<a class="jxr_linenumber" name="L160" href="#L160">160</a> <strong class="jxr_keyword">protected</strong> <strong class="jxr_keyword">void</strong> assertJarContent(<strong class="jxr_keyword">final</strong> File jarFile, <strong class="jxr_keyword">final</strong> String[] expectedFiles) <strong class="jxr_keyword">throws</strong> IOException { -<a class="jxr_linenumber" name="L161" href="#L161">161</a> ZipFile jar = <strong class="jxr_keyword">new</strong> ZipFile(jarFile); -<a class="jxr_linenumber" name="L162" href="#L162">162</a> Enumeration<? <strong class="jxr_keyword">extends</strong> ZipEntry> entries = jar.entries(); -<a class="jxr_linenumber" name="L163" href="#L163">163</a> -<a class="jxr_linenumber" name="L164" href="#L164">164</a> <strong class="jxr_keyword">if</strong> (expectedFiles.length == 0) { -<a class="jxr_linenumber" name="L165" href="#L165">165</a> assertFalse(<span class="jxr_string">"Jar file should not contain any entry"</span>, entries.hasMoreElements()); -<a class="jxr_linenumber" name="L166" href="#L166">166</a> } <strong class="jxr_keyword">else</strong> { -<a class="jxr_linenumber" name="L167" href="#L167">167</a> assertTrue(entries.hasMoreElements()); -<a class="jxr_linenumber" name="L168" href="#L168">168</a> -<a class="jxr_linenumber" name="L169" href="#L169">169</a> Set<String> expected = <strong class="jxr_keyword">new</strong> TreeSet<>(Arrays.asList(expectedFiles)); -<a class="jxr_linenumber" name="L170" href="#L170">170</a> -<a class="jxr_linenumber" name="L171" href="#L171">171</a> <strong class="jxr_keyword">while</strong> (entries.hasMoreElements()) { -<a class="jxr_linenumber" name="L172" href="#L172">172</a> ZipEntry entry = entries.nextElement(); -<a class="jxr_linenumber" name="L173" href="#L173">173</a> -<a class="jxr_linenumber" name="L174" href="#L174">174</a> assertTrue(<span class="jxr_string">"Not expecting "</span> + entry.getName() + <span class="jxr_string">" in "</span> + jarFile, expected.remove(entry.getName())); -<a class="jxr_linenumber" name="L175" href="#L175">175</a> } -<a class="jxr_linenumber" name="L176" href="#L176">176</a> -<a class="jxr_linenumber" name="L177" href="#L177">177</a> assertTrue(<span class="jxr_string">"Missing entries "</span> + expected.toString() + <span class="jxr_string">" in "</span> + jarFile, expected.isEmpty()); -<a class="jxr_linenumber" name="L178" href="#L178">178</a> } -<a class="jxr_linenumber" name="L179" href="#L179">179</a> -<a class="jxr_linenumber" name="L180" href="#L180">180</a> jar.close(); -<a class="jxr_linenumber" name="L181" href="#L181">181</a> } -<a class="jxr_linenumber" name="L182" href="#L182">182</a> -<a class="jxr_linenumber" name="L183" href="#L183">183</a> <strong class="jxr_keyword">protected</strong> File getTestTargetDir(String projectName) { -<a class="jxr_linenumber" name="L184" href="#L184">184</a> <strong class="jxr_keyword">return</strong> <strong class="jxr_keyword">new</strong> File(getBasedir(), <span class="jxr_string">"target/test/unit/"</span> + projectName + <span class="jxr_string">"/target"</span>); -<a class="jxr_linenumber" name="L185" href="#L185">185</a> } -<a class="jxr_linenumber" name="L186" href="#L186">186</a> } +<a class="jxr_linenumber" name="L57" href="#L57">57</a> <strong class="jxr_keyword">protected</strong> File getTestSourceArchive(<strong class="jxr_keyword">final</strong> File testTargetDir, <strong class="jxr_keyword">final</strong> String projectName) { +<a class="jxr_linenumber" name="L58" href="#L58">58</a> <strong class="jxr_keyword">return</strong> <strong class="jxr_keyword">new</strong> File(testTargetDir, buildFinalTestSourceName(projectName) + <span class="jxr_string">".jar"</span>); +<a class="jxr_linenumber" name="L59" href="#L59">59</a> } +<a class="jxr_linenumber" name="L60" href="#L60">60</a> +<a class="jxr_linenumber" name="L61" href="#L61">61</a> <strong class="jxr_keyword">protected</strong> String buildFinalSourceName(<strong class="jxr_keyword">final</strong> String projectName) { +<a class="jxr_linenumber" name="L62" href="#L62">62</a> <strong class="jxr_keyword">return</strong> FINAL_NAME_PREFIX + projectName + FINAL_NAME_SUFFIX + <span class="jxr_string">"-sources"</span>; +<a class="jxr_linenumber" name="L63" href="#L63">63</a> } +<a class="jxr_linenumber" name="L64" href="#L64">64</a> +<a class="jxr_linenumber" name="L65" href="#L65">65</a> <strong class="jxr_keyword">protected</strong> String buildFinalTestSourceName(<strong class="jxr_keyword">final</strong> String projectName) { +<a class="jxr_linenumber" name="L66" href="#L66">66</a> <strong class="jxr_keyword">return</strong> FINAL_NAME_PREFIX + projectName + FINAL_NAME_SUFFIX + <span class="jxr_string">"-test-sources"</span>; +<a class="jxr_linenumber" name="L67" href="#L67">67</a> } +<a class="jxr_linenumber" name="L68" href="#L68">68</a> +<a class="jxr_linenumber" name="L69" href="#L69">69</a> <strong class="jxr_keyword">protected</strong> <strong class="jxr_keyword">void</strong> assertJarContent(<strong class="jxr_keyword">final</strong> File jarFile, <strong class="jxr_keyword">final</strong> String[] expectedFiles) <strong class="jxr_keyword">throws</strong> IOException { +<a class="jxr_linenumber" name="L70" href="#L70">70</a> ZipFile jar = <strong class="jxr_keyword">new</strong> ZipFile(jarFile); +<a class="jxr_linenumber" name="L71" href="#L71">71</a> Enumeration<? <strong class="jxr_keyword">extends</strong> ZipEntry> entries = jar.entries(); +<a class="jxr_linenumber" name="L72" href="#L72">72</a> +<a class="jxr_linenumber" name="L73" href="#L73">73</a> <strong class="jxr_keyword">if</strong> (expectedFiles.length == 0) { +<a class="jxr_linenumber" name="L74" href="#L74">74</a> assertFalse(entries.hasMoreElements(), <span class="jxr_string">"Jar file should not contain any entry"</span>); +<a class="jxr_linenumber" name="L75" href="#L75">75</a> } <strong class="jxr_keyword">else</strong> { +<a class="jxr_linenumber" name="L76" href="#L76">76</a> assertTrue(entries.hasMoreElements()); +<a class="jxr_linenumber" name="L77" href="#L77">77</a> +<a class="jxr_linenumber" name="L78" href="#L78">78</a> Set<String> expected = <strong class="jxr_keyword">new</strong> TreeSet<>(Arrays.asList(expectedFiles)); +<a class="jxr_linenumber" name="L79" href="#L79">79</a> +<a class="jxr_linenumber" name="L80" href="#L80">80</a> <strong class="jxr_keyword">while</strong> (entries.hasMoreElements()) { +<a class="jxr_linenumber" name="L81" href="#L81">81</a> ZipEntry entry = entries.nextElement(); +<a class="jxr_linenumber" name="L82" href="#L82">82</a> +<a class="jxr_linenumber" name="L83" href="#L83">83</a> assertTrue(expected.remove(entry.getName()), <span class="jxr_string">"Not expecting "</span> + entry.getName() + <span class="jxr_string">" in "</span> + jarFile); +<a class="jxr_linenumber" name="L84" href="#L84">84</a> } +<a class="jxr_linenumber" name="L85" href="#L85">85</a> +<a class="jxr_linenumber" name="L86" href="#L86">86</a> assertTrue(expected.isEmpty(), <span class="jxr_string">"Missing entries "</span> + expected + <span class="jxr_string">" in "</span> + jarFile); +<a class="jxr_linenumber" name="L87" href="#L87">87</a> } +<a class="jxr_linenumber" name="L88" href="#L88">88</a> +<a class="jxr_linenumber" name="L89" href="#L89">89</a> jar.close(); +<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">protected</strong> File getTestTargetDir(String projectName) { +<a class="jxr_linenumber" name="L93" href="#L93">93</a> <strong class="jxr_keyword">return</strong> <strong class="jxr_keyword">new</strong> File(getBasedir(), <span class="jxr_string">"target/test-classes/unit/"</span> + projectName + <span class="jxr_string">"/target"</span>); +<a class="jxr_linenumber" name="L94" href="#L94">94</a> } +<a class="jxr_linenumber" name="L95" href="#L95">95</a> } </pre> <hr/> <div id="footer">Copyright © 2002–2024 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</div>
