You are viewing a plain text version of this content. The canonical link for it is here.
Posted to site-commits@maven.apache.org by sl...@apache.org on 2023/02/09 00:34:07 UTC

svn commit: r1907531 [7/25] - in /maven/website/content: ./ apache-resource-bundles/ archives/maven-2.x/ background/ developers/ developers/conventions/ developers/release/ developers/website/ docs/ docs/2.0.1/ docs/2.0.10/ docs/2.0.11/ docs/2.0.2/ doc...

Modified: maven/website/content/guides/development/guide-testing-development-plugins.html
==============================================================================
--- maven/website/content/guides/development/guide-testing-development-plugins.html (original)
+++ maven/website/content/guides/development/guide-testing-development-plugins.html Thu Feb  9 00:34:05 2023
@@ -2,7 +2,7 @@
 
 
 <!--
- | Generated by Apache Maven Doxia Site Renderer 2.0.0-M4 from content/apt/guides/development/guide-testing-development-plugins.apt at 2023-02-08
+ | Generated by Apache Maven Doxia Site Renderer 2.0.0-M4 from content/markdown/guides/development/guide-testing-development-plugins.md at 2023-02-09
  | Rendered using Apache Maven Fluido Skin 1.11.1
 -->
 <html xmlns="http://www.w3.org/1999/xhtml" lang="">
@@ -48,8 +48,8 @@
           <ul class="breadcrumb">
       <li class=""><a href="https://www.apache.org/" class="externalLink" title="Apache">Apache</a><span class="divider">/</span></li>
       <li class=""><a href="../../index.html" title="Maven">Maven</a><span class="divider">/</span></li>
-    <li class="active ">Guide to Testing Development Versions of Plugins <a href="https://github.com/apache/maven-site/tree/master/content/apt/guides/development/guide-testing-development-plugins.apt"><img src="../../images/accessories-text-editor.png" title="Edit" /></a></li>
-        <li id="publishDate" class="pull-right"><span class="divider">|</span> Last Published: 2023-02-08</li>
+    <li class="active ">Guide to Testing Development Versions of Plugins <a href="https://github.com/apache/maven-site/tree/master/content/markdown/guides/development/guide-testing-development-plugins.md"><img src="../../images/accessories-text-editor.png" title="Edit" /></a></li>
+        <li id="publishDate" class="pull-right"><span class="divider">|</span> Last Published: 2023-02-09</li>
         <li class="pull-right"><span class="divider">|</span>
 <a href="../../scm.html" title="Get Sources">Get Sources</a></li>
         <li class="pull-right"><a href="../../download.cgi" title="Download">Download</a></li>
@@ -139,18 +139,37 @@
           </div>
         </header>
         <main id="bodyColumn"  class="span10" >
-<section>
-<h1>Guide to Testing Development Versions of Plugins</h1><section>
-<h2>Why would I want to do this?</h2>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<section><section>
+<h2>Guide to Testing Development Versions of Plugins</h2><section>
+<h3>Why would I want to do this?</h3>
 <p>If a bug you are encountering has been reported as fixed but not yet released, you can confirm that it has been fixed for you. Or perhaps you just like to live on the bleeding edge.</p>
 <p>You are highly encouraged to join the development list for the project and provide your feedback, or help promote release of the plugin in question.</p>
-<p><i>Note:</i> This is <b>not</b> recommended as an everyday or in production practice! Snapshots are for testing purposes only and are not official releases. For more information, see <a class="externalLink" href="http://www.apache.org/dev/release.html#what"> the Releases FAQ</a>.</p></section><section>
-<h2>How do I do this?</h2>
-<p>Development versions of Maven plugins are periodically published to the repository: <a class="externalLink" href="https://repository.apache.org/snapshots/">https://repository.apache.org/snapshots/</a>.</p>
-<p><i>Note:</i> Currently, this is not done automatically by our continuous integration setup. This is coming soon.</p>
-<p>Other sites may publish there own - for example, the MojoHaus project hosts theirs at <a class="externalLink" href="https://oss.sonatype.org/content/repositories/snapshots/">https://oss.sonatype.org/content/repositories/snapshots/</a></p>
+<p><em>Note:</em> This is <strong>not</strong> recommended as an everyday or in production practice! Snapshots are for testing purposes only and are not official releases. For more information, see <a href="http://www.apache.org/dev/release.html#what" class="externalLink">the Releases FAQ</a>.</p></section><section>
+<h3>How do I do this?</h3>
+<p>Development versions of Maven plugins are periodically published to the repository: <a href="https://repository.apache.org/snapshots/" class="externalLink">https://repository.apache.org/snapshots/</a>.</p>
+<p><em>Note:</em> Currently, this is not done automatically by our continuous integration setup. This is coming soon.</p>
+<p>Other sites may publish there own - for example, the MojoHaus project hosts theirs at <a href="https://oss.sonatype.org/content/repositories/snapshots/" class="externalLink">https://oss.sonatype.org/content/repositories/snapshots/</a></p>
 <p>The first step is to include this in your project:</p>
-<div class="source"><pre class="prettyprint linenums">&lt;project&gt;
+
+<div class="source"><pre class="prettyprint linenums"><code>&lt;project&gt;
   ...
   &lt;pluginRepositories&gt;
     &lt;pluginRepository&gt;
@@ -159,13 +178,20 @@
     &lt;/pluginRepository&gt;
   &lt;/pluginRepositories&gt;
   ...
-&lt;/project&gt;</pre></div>
+&lt;/project&gt;
+</code></pre></div>
 <p>After this is included, there are three ways to use the updated versions:</p>
 <ul>
-<li>Set the appropriate version in the plugin, eg <code>2.0.1-SNAPSHOT</code></li>
-<li>If you have not specified a version, use the <code>-U</code> switch to update plugins for the given Maven run</li>
-<li>You can have Maven automatically check for updates on a given interval, for example:
-<div class="source"><pre class="prettyprint linenums">&lt;project&gt;
+
+<li>
+<p>Set the appropriate version in the plugin, eg <code>2.0.1-SNAPSHOT</code></p></li>
+<li>
+<p>If you have not specified a version, use the <code>-U</code> switch to update plugins for the given Maven run</p></li>
+<li>
+<p>You can have Maven automatically check for updates on a given interval, for example:</p></li>
+</ul>
+
+<div class="source"><pre class="prettyprint linenums"><code>&lt;project&gt;
   ...
   &lt;pluginRepositories&gt;
     &lt;pluginRepository&gt;
@@ -174,13 +200,15 @@
     &lt;/pluginRepository&gt;
   &lt;/pluginRepositories&gt;
   ...
-&lt;/project&gt;</pre></div></li></ul>
-<p><i>Note:</i> These last two techniques mean that <i>every</i> plugin will be updated to the latest snapshot version.</p>
-<p>The development version will stop being used if the <code>&lt;pluginRepository&gt;</code> element is removed from your POM and the version is set back to the release version. If you are using the command line or an unspecified version, you will also need to remove the version from the local repository.</p></section><section>
-<h2>Using Settings without Modifying the Project</h2>
+&lt;/project&gt;
+</code></pre></div>
+<p><em>Note:</em> These last two techniques mean that <em>every</em> plugin will be updated to the latest snapshot version.</p>
+<p>The development version will stop being used if the <code>\&lt;pluginRepository\&gt;</code> element is removed from your POM and the version is set back to the release version. If you are using the command line or an unspecified version, you will also need to remove the version from the local repository.</p></section><section>
+<h3>Using Settings without Modifying the Project</h3>
 <p>If you are using the goals from the command line on a number of projects, you should include this in your <code>settings.xml</code> file instead.</p>
-<p>You need to modify your <code>${user.home}/.m2/settings.xml</code> file to include two new profiles and then when you need access to the plugin snapshots use <code>-Papache</code>. The profile only needs to be enabled once so that the plugins can be downloaded into you local repository. Once in your local repository Maven can successfully resolve the dependencies and the profile no longer needs to be activated.</p>
-<div class="source"><pre class="prettyprint linenums">&lt;settings&gt;
+<p>You need to modify your <code>$\{user.home\}/.m2/settings.xml</code> file to include two new profiles and then when you need access to the plugin snapshots use <code>-Papache</code>. The profile only needs to be enabled once so that the plugins can be downloaded into you local repository. Once in your local repository Maven can successfully resolve the dependencies and the profile no longer needs to be activated.</p>
+
+<div class="source"><pre class="prettyprint linenums"><code>&lt;settings&gt;
   ...
   &lt;profiles&gt;
     &lt;profile&gt;
@@ -201,14 +229,16 @@
     &lt;/profile&gt;
   &lt;/profiles&gt;
   ...
-&lt;/settings&gt;</pre></div>
+&lt;/settings&gt;
+</code></pre></div>
 <p>When invoking Maven for Apache profile, do it like this:</p>
-<div>
-<pre>mvn -Papache &lt;phase|goal&gt;</pre></div></section><section>
-<h2>Using a Repository Manager</h2>
-<p>In addition to the above you may want to use a repository manager so that you can retain the builds you have been using. For information on this technique, see the <a href="./guide-testing-releases.html"> Guide to Testing Staged Releases</a>.</p></section><section>
-<h2>How do I make changes to the source and test development versions of the plugins?</h2>
-<p>For information on this, see the <a href="./guide-maven-development.html">Guide to Maven Development</a>.</p></section></section>
+
+<div class="source"><pre class="prettyprint linenums"><code>mvn -Papache &lt;phase|goal&gt;
+</code></pre></div></section><section>
+<h3>Using a Repository Manager</h3>
+<p>In addition to the above you may want to use a repository manager so that you can retain the builds you have been using. For information on this technique, see the <a href="./guide-testing-releases.html">Guide to Testing Staged Releases</a>.</p></section><section>
+<h3>How do I make changes to the source and test development versions of the plugins?</h3>
+<p>For information on this, see the <a href="./guide-maven-development.html">Guide to Maven Development</a>.</p></section></section></section>
         </main>
       </div>
     </div>

Modified: maven/website/content/guides/development/guide-testing-releases.html
==============================================================================
--- maven/website/content/guides/development/guide-testing-releases.html (original)
+++ maven/website/content/guides/development/guide-testing-releases.html Thu Feb  9 00:34:05 2023
@@ -2,7 +2,7 @@
 
 
 <!--
- | Generated by Apache Maven Doxia Site Renderer 2.0.0-M4 from content/apt/guides/development/guide-testing-releases.apt at 2023-02-08
+ | Generated by Apache Maven Doxia Site Renderer 2.0.0-M4 from content/markdown/guides/development/guide-testing-releases.md at 2023-02-09
  | Rendered using Apache Maven Fluido Skin 1.11.1
 -->
 <html xmlns="http://www.w3.org/1999/xhtml" lang="">
@@ -48,8 +48,8 @@
           <ul class="breadcrumb">
       <li class=""><a href="https://www.apache.org/" class="externalLink" title="Apache">Apache</a><span class="divider">/</span></li>
       <li class=""><a href="../../index.html" title="Maven">Maven</a><span class="divider">/</span></li>
-    <li class="active ">Guide to Testing Staged Releases <a href="https://github.com/apache/maven-site/tree/master/content/apt/guides/development/guide-testing-releases.apt"><img src="../../images/accessories-text-editor.png" title="Edit" /></a></li>
-        <li id="publishDate" class="pull-right"><span class="divider">|</span> Last Published: 2023-02-08</li>
+    <li class="active ">Guide to Testing Staged Releases <a href="https://github.com/apache/maven-site/tree/master/content/markdown/guides/development/guide-testing-releases.md"><img src="../../images/accessories-text-editor.png" title="Edit" /></a></li>
+        <li id="publishDate" class="pull-right"><span class="divider">|</span> Last Published: 2023-02-09</li>
         <li class="pull-right"><span class="divider">|</span>
 <a href="../../scm.html" title="Get Sources">Get Sources</a></li>
         <li class="pull-right"><a href="../../download.cgi" title="Download">Download</a></li>
@@ -139,60 +139,108 @@
           </div>
         </header>
         <main id="bodyColumn"  class="span10" >
-<section>
-<h1>Guide to Testing Staged Releases</h1>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<section><section>
+<h2>Guide to Testing Staged Releases</h2>
 <p>As part of the release process, the artifacts are staged in a temporary repository for testing and evaluation before voting. Such repositories are not available by default, so to use them your project must be configured appropriately.</p>
 <p>The steps are as follows:</p>
 <ul>
-<li>add the repository or plugin repository to your POM or settings (see below)</li>
-<li>ensure you are using the version being released of the artifacts in your project, e.g. by setting the <code>&lt;version&gt;</code> in the <code>&lt;plugin&gt;</code> tag.</li>
-<li>test the release</li>
-<li>remove the repository from your POM if it was specified there</li>
-<li>remove the artifacts from your local repository when you have completed testing</li></ul>
+
+<li>
+<p>add the repository or plugin repository to your POM or settings (see below)</p></li>
+<li>
+<p>ensure you are using the version being released of the artifacts in your project, e.g. by setting the <code>\&lt;version\&gt;</code> in the <code>\&lt;plugin\&gt;</code> tag.</p></li>
+<li>
+<p>test the release</p></li>
+<li>
+<p>remove the repository from your POM if it was specified there</p></li>
+<li>
+<p>remove the artifacts from your local repository when you have completed testing</p></li>
+</ul>
 <p>The repository configuration for testing a plugin will typically look something like this (it will be provided in the vote email):</p>
-<div class="source"><pre class="prettyprint linenums">  ...
+
+<div class="source"><pre class="prettyprint linenums"><code>  ...
   &lt;pluginRepositories&gt;
     &lt;pluginRepository&gt;
       &lt;id&gt;staged-releases&lt;/id&gt;
       &lt;url&gt;https://repository.apache.org/content/groups/staging/&lt;/url&gt;
     &lt;/pluginRepository&gt;
   &lt;/pluginRepositories&gt;
-  ...</pre></div>
+  ...
+</code></pre></div>
 <p>The important thing is that the staged release does not pollute your eventual environment as it may change if the vote fails and the release is made again. This is why clearing the local repository is necessary, but if you are using a repository manager this is also important to clear. The following provides instructions for setting Archiva up in such a way that the artifacts are isolated already.</p><section>
-<h2>Setting up Archiva to Test Staged Releases</h2>
+<h3>Setting up Archiva to Test Staged Releases</h3>
 <p>These steps will be similar for any repository manager - please refer to their individual documentation for instructions on how to configure remote proxies.</p>
 <p>For Archiva, the first step is to create a new managed repository for the staged releases. This will ensure they remain isolated from your environment. On the repositories tab, add a new managed repository with the settings:</p>
 <ul>
-<li>Identifier = <code>staged-releases</code></li>
-<li>Name = Staged Releases</li>
-<li>Directory = <code>/path/to/repositories/staged-releases</code></li>
-<li>Uncheck 'Scannable'</li></ul>
+
+<li>
+<p>Identifier = <code>staged-releases</code></p></li>
+<li>
+<p>Name = Staged Releases</p></li>
+<li>
+<p>Directory = <code>/path/to/repositories/staged-releases</code></p></li>
+<li>
+<p>Uncheck &#x2018;Scannable&#x2019;</p></li>
+</ul>
 <p>Next add a remote repository with settings similar to the following:</p>
 <ul>
-<li>Identifier = <code>dfabulich.staged.releases</code></li>
-<li>Name = dfabulich Staged Releases</li>
-<li>URL = <code>http://people.apache.org/~dfabulich/staging-repo/</code></li></ul>
+
+<li>
+<p>Identifier = <code>dfabulich.staged.releases</code></p></li>
+<li>
+<p>Name = dfabulich Staged Releases</p></li>
+<li>
+<p>URL = <code>http://people.apache.org/\~dfabulich/staging-repo/</code></p></li>
+</ul>
 <p>Finally, add a proxy connector to connect the two repositories:</p>
 <ul>
-<li>Managed repository = <code>staged-releases</code></li>
-<li>Remote repository = <code>dfabulich.staged</code></li>
-<li>Release policy = <code>once</code></li>
-<li>Snapshot policy = <code>never</code></li>
-<li>White list = <code>org/apache/maven/**</code></li></ul>
+
+<li>
+<p>Managed repository = <code>staged-releases</code></p></li>
+<li>
+<p>Remote repository = <code>dfabulich.staged</code></p></li>
+<li>
+<p>Release policy = <code>once</code></p></li>
+<li>
+<p>Snapshot policy = <code>never</code></p></li>
+<li>
+<p>White list = <code>org/apache/maven/\*\*</code></p></li>
+</ul>
 <p>You can then utilise this repository from your POM or settings in the same way, but with the alternate URL of <code>http://localhost:8080/archiva/repository/staged-releases/</code>.</p>
 <p>The advantage of this approach is that you can usually remove your entire local repository afterwards and after removing the staged repository from your POM the artifacts will no longer be used. There is no need to remove the repository or artifacts from Archiva itself - unless a staged release is updated for further testing.</p>
 <p>It is also quite easy to test another staged release at a later date by reusing the repository, or adding a proxy connector and remote repository for a different staging repository.</p>
 <p>If you are using the repository mirroring technique to lock down to the repository manager in your environment, you would add an additional mirror to correspond to the additional repository in the POM, such as:</p>
-<div class="source"><pre class="prettyprint linenums">  ...
+
+<div class="source"><pre class="prettyprint linenums"><code>  ...
   &lt;mirror&gt;
     &lt;id&gt;staged-releases-mirror&lt;/id&gt;
     &lt;url&gt;http://localhost:8080/archiva/repository/staged-releases/&lt;/url&gt;
     &lt;mirrorOf&gt;staged-releases&lt;/mirrorOf&gt;
   &lt;/mirror&gt;
-  ...</pre></div></section><section>
-<h2>Using a Settings Profile</h2>
-<p>If you regularly test staged releases and want to have a more convenient way to add the repository to a build without modifying your POM, you may add a profile to your <code>~/.m2/settings.xml</code>:</p>
-<div class="source"><pre class="prettyprint linenums">  ...
+  ...
+</code></pre></div></section><section>
+<h3>Using a Settings Profile</h3>
+<p>If you regularly test staged releases and want to have a more convenient way to add the repository to a build without modifying your POM, you may add a profile to your <code>\~/.m2/settings.xml</code>:</p>
+
+<div class="source"><pre class="prettyprint linenums"><code>  ...
   &lt;profiles&gt;
     &lt;profile&gt;
       &lt;id&gt;staged-releases&lt;/id&gt;
@@ -203,11 +251,13 @@
         &lt;/pluginRepository&gt;
       &lt;/pluginRepositories&gt;
     &lt;/profile&gt;
-  ...</pre></div>
+  ...
+</code></pre></div>
 <p>With this in place, you can activate it by simply changing the plugin version to the one you are testing in the POM as above, then run the build with the following command:</p>
-<div>
-<pre>mvn verify -Pstaged-releases</pre></div>
-<p>Note that the same conditions apply as above about cleaning out the local repository to prevent pollution of your local build environment.</p></section></section>
+
+<div class="source"><pre class="prettyprint linenums"><code>mvn verify -Pstaged-releases
+</code></pre></div>
+<p>Note that the same conditions apply as above about cleaning out the local repository to prevent pollution of your local build environment.</p></section></section></section>
         </main>
       </div>
     </div>