Modified: maven/website/content/maven-features.html
==============================================================================
--- maven/website/content/maven-features.html (original)
+++ maven/website/content/maven-features.html Sat Feb 18 20:40:58 2023
@@ -2,7 +2,7 @@
<!--
- | Generated by Apache Maven Doxia Site Renderer 2.0.0-M4 from
content/markdown/maven-features.md at 2023-02-18
+ | Generated by Apache Maven Doxia Site Renderer 2.0.0-M4 from
content/apt/maven-features.apt at 2023-02-18
| Rendered using Apache Maven Fluido Skin 1.11.1
-->
<html xmlns="http://www.w3.org/1999/xhtml" lang="">
@@ -48,7 +48,7 @@
<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 ">Maven Features <a
href="https://github.com/apache/maven-site/tree/master/content/markdown/maven-features.md"><img
src="./images/accessories-text-editor.png" title="Edit" /></a></li>
+ <li class="active ">Maven Features <a
href="https://github.com/apache/maven-site/tree/master/content/apt/maven-features.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-18</li>
<li class="pull-right"><span class="divider">|</span>
<a href="scm.html" title="Get Sources">Get Sources</a></li>
@@ -123,55 +123,22 @@
</div>
</header>
<main id="bodyColumn" class="span10" >
-<!--
-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>Feature Summary</h2>
+<section>
+<h1>Feature Summary</h1>
<p>The following are the key features of Maven in a nutshell:</p>
<ul>
-
-<li>
-<p>Simple project setup that follows best practices - get a new project or
module started in seconds</p></li>
-<li>
-<p>Consistent usage across all projects - means no ramp up time for new
developers coming onto a project</p></li>
-<li>
-<p>Superior dependency management including automatic updating, dependency
closures (also known as transitive dependencies)</p></li>
-<li>
-<p>Able to easily work with multiple projects at the same time</p></li>
-<li>
-<p>A <a href="/repository/">large and growing repository of libraries and
metadata</a> to use out of the box, and arrangements in place with the largest
Open Source projects for real-time availability of their latest
releases</p></li>
-<li>
-<p>Extensible, with the ability to easily <a href="/plugin-developers/">write
plugins</a> in Java or scripting languages</p></li>
-<li>
-<p>Instant access to new features with little or no extra
configuration</p></li>
-<li>
-<p>Ant tasks for dependency management and deployment outside of Maven</p></li>
-<li>
-<p>Model based builds: Maven is able to build any number of projects into
predefined output types such as a JAR, WAR, or distribution based on metadata
about the project, without the need to do any scripting in most cases.</p></li>
-<li>
-<p>Coherent site of project information: Using the same metadata as for the
build process, Maven is able to generate a web site or PDF including any
documentation you care to add, and adds to that standard reports about the
state of development of the project. Examples of this information can be seen
at the bottom of the left-hand navigation of this site under the
“Project Information” and “Project Reports”
submenus.</p></li>
-<li>
-<p>Release management and distribution publication: Without much additional
configuration, Maven will integrate with your source control system (such as
Subversion or Git) and manage the release of a project based on a certain tag.
It can also publish this to a distribution location for use by other projects.
Maven is able to publish individual outputs such as a JAR, an archive including
other dependencies and documentation, or as a source distribution.</p></li>
-<li>
-<p>Dependency management: Maven encourages the use of a central repository of
JARs and other dependencies. Maven comes with a mechanism that your project's
clients can use to download any JARs required for building your project from a
central JAR repository much like Perl's CPAN. This allows users of Maven to
reuse JARs across projects and encourages communication between projects to
ensure that backward compatibility issues are dealt with.</p></li>
-</ul><!-- this needs to be greatly expanded and is too detailed here ... jvz
-->
-</section></section>
+<li>Simple project setup that follows best practices - get a new project or
module started in seconds</li>
+<li>Consistent usage across all projects - means no ramp up time for new
developers coming onto a project</li>
+<li>Superior dependency management including automatic updating, dependency
closures (also known as transitive dependencies)</li>
+<li>Able to easily work with multiple projects at the same time</li>
+<li>A <a href="/repository/">large and growing repository of libraries and
metadata</a> to use out of the box, and arrangements in place with the largest
Open Source projects for real-time availability of their latest releases</li>
+<li>Extensible, with the ability to easily <a href="/plugin-developers/">write
plugins</a> in Java or scripting languages</li>
+<li>Instant access to new features with little or no extra configuration</li>
+<li>Ant tasks for dependency management and deployment outside of Maven</li>
+<li>Model based builds: Maven is able to build any number of projects into
predefined output types such as a JAR, WAR, or distribution based on metadata
about the project, without the need to do any scripting in most cases.</li>
+<li>Coherent site of project information: Using the same metadata as for the
build process, Maven is able to generate a web site or PDF including any
documentation you care to add, and adds to that standard reports about the
state of development of the project. Examples of this information can be seen
at the bottom of the left-hand navigation of this site under the "Project
Information" and "Project Reports" submenus.</li>
+<li>Release management and distribution publication: Without much additional
configuration, Maven will integrate with your source control system (such as
Subversion or Git) and manage the release of a project based on a certain tag.
It can also publish this to a distribution location for use by other projects.
Maven is able to publish individual outputs such as a JAR, an archive including
other dependencies and documentation, or as a source distribution.</li>
+<li>Dependency management: Maven encourages the use of a central repository of
JARs and other dependencies. Maven comes with a mechanism that your project's
clients can use to download any JARs required for building your project from a
central JAR repository much like Perl's CPAN. This allows users of Maven to
reuse JARs across projects and encourages communication between projects to
ensure that backward compatibility issues are dealt with.</li></ul></section>
</main>
</div>
</div>
Modified: maven/website/content/maven-jsr330.html
==============================================================================
--- maven/website/content/maven-jsr330.html (original)
+++ maven/website/content/maven-jsr330.html Sat Feb 18 20:40:58 2023
@@ -250,7 +250,7 @@ If you want to look at the full implemen
</project>
</code></pre></div>
<p>So, as mentioned, we have the <code>javax.inject</code> dependency and the
<code>sisu-maven-plugin</code> configured to create
-the JSR-330 component index. When you build and place the extension JAR in the
<code>${MAVEN_HOME}/lib/ext</code> directory,
+the JSR-330 component index. When you build and place the extension JAR in the
<code>${MAVEN_HOME}/lib/ext</code> folder,
it will automatically get picked up by Maven. In the case of this example, we
have an implementation of
an <code>EventSpy</code> that times the executions of individual mojos within
a phase in the lifecycle.</p>
Modified: maven/website/content/maven-site-1.0-site.jar
==============================================================================
Binary files - no diff available.
Modified: maven/website/content/plugin-developers/common-bugs.html
==============================================================================
--- maven/website/content/plugin-developers/common-bugs.html (original)
+++ maven/website/content/plugin-developers/common-bugs.html Sat Feb 18
20:40:58 2023
@@ -2,7 +2,7 @@
<!--
- | Generated by Apache Maven Doxia Site Renderer 2.0.0-M4 from
content/markdown/plugin-developers/common-bugs.md at 2023-02-18
+ | Generated by Apache Maven Doxia Site Renderer 2.0.0-M4 from
content/apt/plugin-developers/common-bugs.apt at 2023-02-18
| Rendered using Apache Maven Fluido Skin 1.11.1
-->
<html xmlns="http://www.w3.org/1999/xhtml" lang="">
@@ -48,7 +48,7 @@
<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 ">Common Bugs and Pitfalls <a
href="https://github.com/apache/maven-site/tree/master/content/markdown/plugin-developers/common-bugs.md"><img
src="../images/accessories-text-editor.png" title="Edit" /></a></li>
+ <li class="active ">Common Bugs and Pitfalls <a
href="https://github.com/apache/maven-site/tree/master/content/apt/plugin-developers/common-bugs.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-18</li>
<li class="pull-right"><span class="divider">|</span>
<a href="../scm.html" title="Get Sources">Get Sources</a></li>
@@ -136,81 +136,43 @@
</div>
</header>
<main id="bodyColumn" class="span10" >
-<!--
-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>Common Bugs and Pitfalls</h2>
+<section>
+<h1>Common Bugs and Pitfalls</h1>
<p>Maven is not the smallest project in terms of source code and has as such
already suffered from many bugs. Having a closer look at all the issues
revealed some coding problems that had widespread among the various
subcomponents. This document lists these commonly occurring anti patterns in
order to help the Maven community to prevent rather than fix bugs. Note that
the primary focus is on pointing out problems that are subtle in their nature
rather than giving a comprehensive guide for Java or Maven development.</p>
<ul>
-
-<li>
-<p><a href="#reading-and-writing-text-files">Reading and Writing Text
Files</a></p></li>
-<li>
-<p><a href="#converting-between-urls-and-filesystem-paths">Converting between
URLs and Filesystem Paths</a></p></li>
-<li>
-<p><a href="#handling-strings-case-insensitively">Handling Strings
Case-insensitively</a></p></li>
-<li>
-<p><a href="#creating-resource-bundle-families">Creating Resource Bundle
Families</a></p></li>
-<li>
-<p><a href="#using-system-properties">Using System Properties</a></p></li>
-<li>
-<p><a href="#using-shutdown-hooks">Using Shutdown Hooks</a></p></li>
-<li>
-<p><a href="#resolving-relative-paths">Resolving Relative Paths</a></p></li>
-<li>
-<p><a href="#determining-the-output-directory-for-a-site-report">Determining
the Output Directory for a Site Report</a></p></li>
-<li>
-<p><a href="#retrieving-the-mojo-logger">Retrieving the Mojo
Logger</a></p></li>
-</ul><section>
-<h3>Reading and Writing Text Files</h3>
+<li><a href="#Reading_and_Writing_Text_Files">Reading and Writing Text
Files</a></li>
+<li><a href="#Converting_between_URLs_and_Filesystem_Paths">Converting between
URLs and Filesystem Paths</a></li>
+<li><a href="#Handling_Strings_Case-insensitively">Handling Strings
Case-insensitively</a></li>
+<li><a href="#Creating_Resource_Bundle_Families">Creating Resource Bundle
Families</a></li>
+<li><a href="#Using_System_Properties">Using System Properties</a></li>
+<li><a href="#Using_Shutdown_Hooks">Using Shutdown Hooks</a></li>
+<li><a href="#Resolving_Relative_Paths">Resolving Relative Paths</a></li>
+<li><a href="#Determining_the_Output_Directory_for_a_Site_Report">Determining
the Output Directory for a Site Report</a></li>
+<li><a href="#Retrieving_the_Mojo_Logger">Retrieving the Mojo
Logger</a></li></ul><section>
+<h2><a id="Reading_and_Writing_Text_Files">Reading and Writing Text
Files</a></h2>
<p>Textual content is composed of characters while file systems merely store
byte streams. A file encoding (aka charset) is used to convert between bytes
and characters. The challenge is using the right file encoding.</p>
<p>The JVM has this notion of a default encoding (given by the
<code>file.encoding</code> property) which it derives from a system's locale.
While this might be a convenient feature sometimes, using this default encoding
for a project build is in general a bad idea: The build output will depend on
the machine/developer who runs the build. As such, usage of the default
encoding threatens the dream of a reproducible build.</p>
<p>For example, if developer A has UTF-8 as default encoding while developer B
uses ISO-8859-1, text files are very likely to get messed up during resource
filtering or similar tasks.</p>
<p>Therefore, developers should avoid any direct or indirect usage of the
classes/methods that simply employ the platform's default encoding. For
instance, <code>FileWriter</code> and <code>FileReader</code> should usually be
avoided:</p>
-
-<div class="source"><pre class="prettyprint linenums"><code
class="language-java">/*
+<div class="source"><pre class="prettyprint linenums">/*
* FIXME: This assumes the source file is using the platform's default
encoding.
*/
-Reader reader = new FileReader( javaFile );
-</code></pre></div>
+Reader reader = new FileReader( javaFile );</pre></div>
<p>Instead, the classes <code>OutputStreamWriter</code> and
<code>OutputStreamReader</code> can be used in combination with an explicit
encoding value. This encoding value can be retrieved from a mojo parameter such
that the user can configure the plugin to fit his/her needs.</p>
<p>To save the user from configuring each plugin individually, conventions
have been established that allow a user to centrally configure the file
encoding per POM. Plugin developers should respect these conventions whereever
possible:</p>
<ul>
-
-<li>
-<p><a
href="https://cwiki.apache.org/confluence/display/MAVEN/POM+Element+for+Source+File+Encoding"
class="externalLink">Source File Encoding</a></p></li>
-<li>
-<p><a
href="http://cwiki.apache.org/confluence/display/MAVENOLD/Reporting+Encoding+Configuration"
class="externalLink">Report Output Encoding</a></p></li>
-</ul>
+<li><a class="externalLink"
href="https://cwiki.apache.org/confluence/display/MAVEN/POM+Element+for+Source+File+Encoding">Source
File Encoding</a></li>
+<li><a class="externalLink"
href="http://cwiki.apache.org/confluence/display/MAVENOLD/Reporting+Encoding+Configuration">Report
Output Encoding</a></li></ul>
<p>Finally note that XML files require special handling because they are
equipped with an encoding declaration in the XML prolog. Reading or writing XML
files with an encoding that does not match their XML prolog's
<code>encoding</code> attribute is a bad idea:</p>
-
-<div class="source"><pre class="prettyprint linenums"><code
class="language-java">/*
+<div class="source"><pre class="prettyprint linenums">/*
* FIXME: This assumes the XML encoding declaration matches the platform's
default encoding.
*/
Writer writer = new FileWriter( xmlFile );
-writer.write( xmlContent );
-</code></pre></div>
-<p>To ease the correct processing of XML files, developers are encouraged to
use
<code>[ReaderFactory.newXmlReader()](https://codehaus-plexus.github.io/plexus-utils/apidocs/org/codehaus/plexus/util/ReaderFactory.html#newXmlReader(java.io.File))</code>
and
<code>[WriterFactory.newXmlWriter()](https://codehaus-plexus.github.io/plexus-utils/apidocs/org/codehaus/plexus/util/WriterFactory.html#newXmlWriter(java.io.File))</code>
from the Plexus Utilities.</p></section><section>
-<h3>Converting between URLs and Filesystem Paths</h3>
+writer.write( xmlContent );</pre></div>
+<p>To ease the correct processing of XML files, developers are encouraged to
use <code><a class="externalLink"
href="https://codehaus-plexus.github.io/plexus-utils/apidocs/org/codehaus/plexus/util/ReaderFactory.html#newXmlReader(java.io.File)">ReaderFactory.newXmlReader()</a></code>
and <code><a class="externalLink"
href="https://codehaus-plexus.github.io/plexus-utils/apidocs/org/codehaus/plexus/util/WriterFactory.html#newXmlWriter(java.io.File)">WriterFactory.newXmlWriter()</a></code>
from the Plexus Utilities.</p></section><section>
+<h2><a id="Converting_between_URLs_and_Filesystem_Paths">Converting between
URLs and Filesystem Paths</a></h2>
<p>URLs and filesystem paths are really two different things and converting
between them is not trivial. The main source of problems is that different
encoding rules apply for the strings that make up a URL or filesystem path. For
example, consider the following code snippet and its associated console
output:</p>
-
-<div class="source"><pre class="prettyprint linenums"><code
class="language-java">File file = new File( "foo bar+foo" );
+<div class="source"><pre class="prettyprint linenums">File file = new File(
"foo bar+foo" );
URL url = file.toURI().toURL();
System.out.println( file.toURL() );
@@ -223,60 +185,51 @@ System.out.println( url.getPath() );
> /C:/temp/foo%20bar+foo
System.out.println( URLDecoder.decode( url.getPath(), "UTF-8" ) );
-> /C:/temp/foo bar foo
-</code></pre></div>
-<p>First of all, please note that
<code>[File.toURL()](http://java.sun.com/javase/6/docs/api/java/io/File.html#toURL())</code>
does not escape the space character (and others). This yields an invalid URL,
as per <a href="http://www.faqs.org/rfcs/rfc2396.html" class="externalLink">RFC
2396, section 2.4.3 “Excluded US-ASCII Characters”</a>. The class
<code>java.net.URL</code> will silently accept such invalid URLs, in contrast
<code>java.net.URI</code> will not (see also
<code>[URL.toURI()](http://java.sun.com/javase/6/docs/api/java/net/URL.html#toURI())</code>).
For this reason, <code>File.toURL()</code> has been deprecated and should be
replaced with <code>File.toURI().toURL()</code>.</p>
-<p>Next,
<code>[URL.getPath()](http://java.sun.com/javase/6/docs/api/java/net/URL.html#getPath())</code>
does in general not return a string that can be used as a filesystem path. It
returns a substring of the URL and as such can contain escape sequences. The
prominent example is the space character which will show up as
“%20”. People sometimes hack around this by means of
<code>replace("%20", " ")</code> but that does simply not
cover all cases. It's worth to mention that on the other hand the related
method
<code>[URI.getPath()](http://java.sun.com/javase/6/docs/api/java/net/URI.html#getPath())</code>
does decode escapes but still the result is not a filesystem path (compare the
source for the constructor <code>File(URI)</code>). To summarize, the following
idiom is to be avoided:</p>
-
-<div class="source"><pre class="prettyprint linenums"><code
class="language-java">URL url = new URL(
"file:/C:/Program%20Files/Java/bin/java.exe" );
+> /C:/temp/foo bar foo</pre></div>
+<p>First of all, please note that <code><a class="externalLink"
href="http://java.sun.com/javase/6/docs/api/java/io/File.html#toURL()">File.toURL()</a></code>
does not escape the space character (and others). This yields an invalid URL,
as per <a class="externalLink" href="http://www.faqs.org/rfcs/rfc2396.html">RFC
2396, section 2.4.3 "Excluded US-ASCII Characters"</a>. The class
<code>java.net.URL</code> will silently accept such invalid URLs, in contrast
<code>java.net.URI</code> will not (see also <code><a class="externalLink"
href="http://java.sun.com/javase/6/docs/api/java/net/URL.html#toURI()">URL.toURI()</a></code>).
For this reason, <code>File.toURL()</code> has been deprecated and should be
replaced with <code>File.toURI().toURL()</code>.</p>
+<p>Next, <code><a class="externalLink"
href="http://java.sun.com/javase/6/docs/api/java/net/URL.html#getPath()">URL.getPath()</a></code>
does in general not return a string that can be used as a filesystem path. It
returns a substring of the URL and as such can contain escape sequences. The
prominent example is the space character which will show up as "%20".
People sometimes hack around this by means of <code>replace("%20",
" ")</code> but that does simply not cover all cases. It's worth to
mention that on the other hand the related method <code><a class="externalLink"
href="http://java.sun.com/javase/6/docs/api/java/net/URI.html#getPath()">URI.getPath()</a></code>
does decode escapes but still the result is not a filesystem path (compare the
source for the constructor <code>File(URI)</code>). To summarize, the following
idiom is to be avoided:</p>
+<div class="source"><pre class="prettyprint linenums">URL url = new URL(
"file:/C:/Program%20Files/Java/bin/java.exe" );
/*
* FIXME: This does not decode percent encoded characters.
*/
-File path = new File( url.getPath() );
-</code></pre></div>
-<p>To decode a URL, people sometimes also choose
<code>[java.net.URLDecoder](http://java.sun.com/javase/6/docs/api/java/net/URLDecoder.html)</code>.
The pitfall with this class is that is actually performs HTML form decoding
which is yet another encoding and not the same as the URL encoding (compare the
last paragraph in class javadoc about
<code>[java.net.URL](http://java.sun.com/javase/6/docs/api/java/net/URL.html)</code>).
For instance, a <code>URLDecoder</code> will erroneously convert the character
“+” into a space as illustrated by the last sysout in the example
above.</p>
-<p>In an ideal world, code targetting JRE 1.4+ could easily avoid these
problems by using the constructor
<code>[File(URI)](http://java.sun.com/javase/6/docs/api/java/io/File.html#File(java.net.URI))</code>
as suggested by the following snippet:</p>
-
-<div class="source"><pre class="prettyprint linenums"><code
class="language-java">URL url = new URL( "file:/C:/Documents and
Settings/user/.m2/settings.xml" );
+File path = new File( url.getPath() );</pre></div>
+<p>To decode a URL, people sometimes also choose <code><a class="externalLink"
href="http://java.sun.com/javase/6/docs/api/java/net/URLDecoder.html">java.net.URLDecoder</a></code>.
The pitfall with this class is that is actually performs HTML form decoding
which is yet another encoding and not the same as the URL encoding (compare the
last paragraph in class javadoc about <code><a class="externalLink"
href="http://java.sun.com/javase/6/docs/api/java/net/URL.html">java.net.URL</a></code>).
For instance, a <code>URLDecoder</code> will erroneously convert the character
"+" into a space as illustrated by the last sysout in the example
above.</p>
+<p>In an ideal world, code targetting JRE 1.4+ could easily avoid these
problems by using the constructor <code><a class="externalLink"
href="http://java.sun.com/javase/6/docs/api/java/io/File.html#File(java.net.URI)">File(URI)</a></code>
as suggested by the following snippet:</p>
+<div class="source"><pre class="prettyprint linenums">URL url = new URL(
"file:/C:/Documents and Settings/user/.m2/settings.xml" );
/*
* FIXME: This assumes the URL is fully compliant with RFC 3986.
*/
-File path = new File( new URI( url.toExternalForm() ) );
-</code></pre></div>
-<p>The remaining source of frustration is the conversion from <code>URL</code>
to <code>URI</code>. As already said, the <code>URL</code> class accepts
malformed URLs which will make the constructor of <code>URI</code> throw an
exception. And indeed, class loaders from Sun JREs up to Java 1.4 will deliver
malformed URLs when queried for a resource. Likewise, the class loaders
employed by Maven 2.x deliver malformed resource URLs regardless of the JRE
version (see <a href="https://issues.apache.org/jira/browse/MNG-3607"
class="externalLink">MNG-3607</a>).</p>
-<p>For all these reasons, it is recommended to use
<code>[FileUtils.toFile()](http://commons.apache.org/io/api-release/org/apache/commons/io/FileUtils.html#toFile(java.net.URL))</code>
from Commons IO or
<code>[FileUtils.toFile()](https://codehaus-plexus.github.io/plexus-utils/apidocs/org/codehaus/plexus/util/FileUtils.html#toFile(java.net.URL))</code>
from a recent Plexus Utilities.</p></section><section>
-<h3>Handling Strings Case-insensitively</h3>
-<p>When developers need to compare strings without regard to case or want to
realize a map with case-insensitive string keys, they often employ
<code>[String.toLowerCase()](http://java.sun.com/javase/6/docs/api/java/lang/String.html#toLowerCase())</code>
or
<code>[String.toUpperCase()](http://java.sun.com/javase/6/docs/api/java/lang/String.html#toUpperCase())</code>
to create a “normalized” string before doing a simple
<code>String.equals()</code>. Now, the <code>to\*Case()</code> methods are
overloaded: One takes no arguments and one takes a <code>Locale</code>
object.</p>
-<p>The gotcha with the arg-less methods is that their output depends on the
default locale of the JVM but the default locale is out of control of the
developer. That means the string expected by the developer (who runs/tests his
code in a JVM using locale <code>xy</code>) does not necessarily match the
string seen by another user (that runs a JVM with locale <code>ab</code>). For
example, the comparison shown in the next code snippet is likely to fail for
systems with default locale Turkish because Turkish has unusual casing rules
for the characters “i” and “I”:</p>
-
-<div class="source"><pre class="prettyprint linenums"><code
class="language-java">/*
+File path = new File( new URI( url.toExternalForm() ) );</pre></div>
+<p>The remaining source of frustration is the conversion from <code>URL</code>
to <code>URI</code>. As already said, the <code>URL</code> class accepts
malformed URLs which will make the constructor of <code>URI</code> throw an
exception. And indeed, class loaders from Sun JREs up to Java 1.4 will deliver
malformed URLs when queried for a resource. Likewise, the class loaders
employed by Maven 2.x deliver malformed resource URLs regardless of the JRE
version (see <a class="externalLink"
href="https://issues.apache.org/jira/browse/MNG-3607">MNG-3607</a>).</p>
+<p>For all these reasons, it is recommended to use <code><a
class="externalLink"
href="http://commons.apache.org/io/api-release/org/apache/commons/io/FileUtils.html#toFile(java.net.URL)">FileUtils.toFile()</a></code>
from Commons IO or <code><a class="externalLink"
href="https://codehaus-plexus.github.io/plexus-utils/apidocs/org/codehaus/plexus/util/FileUtils.html#toFile(java.net.URL)">FileUtils.toFile()</a></code>
from a recent Plexus Utilities.</p></section><section>
+<h2><a id="Handling_Strings_Case-insensitively">Handling Strings
Case-insensitively</a></h2>
+<p>When developers need to compare strings without regard to case or want to
realize a map with case-insensitive string keys, they often employ <code><a
class="externalLink"
href="http://java.sun.com/javase/6/docs/api/java/lang/String.html#toLowerCase()">String.toLowerCase()</a></code>
or <code><a class="externalLink"
href="http://java.sun.com/javase/6/docs/api/java/lang/String.html#toUpperCase()">String.toUpperCase()</a></code>
to create a "normalized" string before doing a simple
<code>String.equals()</code>. Now, the <code>to*Case()</code> methods are
overloaded: One takes no arguments and one takes a <code>Locale</code>
object.</p>
+<p>The gotcha with the arg-less methods is that their output depends on the
default locale of the JVM but the default locale is out of control of the
developer. That means the string expected by the developer (who runs/tests his
code in a JVM using locale <code>xy</code>) does not necessarily match the
string seen by another user (that runs a JVM with locale <code>ab</code>). For
example, the comparison shown in the next code snippet is likely to fail for
systems with default locale Turkish because Turkish has unusual casing rules
for the characters "i" and "I":</p>
+<div class="source"><pre class="prettyprint linenums">/*
* FIXME: This assumes the casing rules of the current platform
* match the rules for the English locale.
*/
if ( "info".equals( debugLevel.toLowerCase() ) )
- logger.info( message );
-</code></pre></div>
-<p>For case-insensitive string comparisons which should be locale-insensitive,
the method
<code>[String.equalsIgnoreCase()](http://java.sun.com/javase/6/docs/api/java/lang/String.html#equalsIgnoreCase(java.lang.String))</code>
should be used instead. If only a substring like a prefix/suffix should be
compared, the method
<code>[String.regionMatches()](http://java.sun.com/javase/6/docs/api/java/lang/String.html#regionMatches(boolean,%20int,%20java.lang.String,%20int,%20int))</code>
can be used instead.</p>
-<p>If the usage of <code>String.to\*Case()</code> cannot be avoided, the
overloaded version taking a <code>Locale</code> object should be used, passing
in
<code>[Locale.ENGLISH](http://java.sun.com/javase/6/docs/api/java/util/Locale.html#ENGLISH)</code>.
The resulting code will still run on Non-English systems, the parameter only
locks down the casing rules used for the string comparison such that the code
delivers the same results on all platforms.</p></section><section>
-<h3>Creating Resource Bundle Families</h3>
-<p>Especially reporting plugins employ resource bundles to support
internationalization. One language (usually English) is provided as the
fallback/default language in the base resource bundle. Due to the lookup
strategy performed by
<code>[ResourceBundle.getBundle()](http://java.sun.com/javase/6/docs/api/java/util/ResourceBundle.html#getBundle(java.lang.String,%20java.util.Locale,%20java.lang.ClassLoader))</code>,
one must always provide a dedicated resource bundle for this default language,
too. This bundle should be empty because it inherits the strings via the parent
chain from the base bundle, but it must exist.</p>
+ logger.info( message );</pre></div>
+<p>For case-insensitive string comparisons which should be locale-insensitive,
the method <code><a class="externalLink"
href="http://java.sun.com/javase/6/docs/api/java/lang/String.html#equalsIgnoreCase(java.lang.String)">String.equalsIgnoreCase()</a></code>
should be used instead. If only a substring like a prefix/suffix should be
compared, the method <code><a class="externalLink"
href="http://java.sun.com/javase/6/docs/api/java/lang/String.html#regionMatches(boolean,%20int,%20java.lang.String,%20int,%20int)">String.regionMatches()</a></code>
can be used instead.</p>
+<p>If the usage of <code>String.to*Case()</code> cannot be avoided, the
overloaded version taking a <code>Locale</code> object should be used, passing
in <code><a class="externalLink"
href="http://java.sun.com/javase/6/docs/api/java/util/Locale.html#ENGLISH">Locale.ENGLISH</a></code>.
The resulting code will still run on Non-English systems, the parameter only
locks down the casing rules used for the string comparison such that the code
delivers the same results on all platforms.</p></section><section>
+<h2><a id="Creating_Resource_Bundle_Families">Creating Resource Bundle
Families</a></h2>
+<p>Especially reporting plugins employ resource bundles to support
internationalization. One language (usually English) is provided as the
fallback/default language in the base resource bundle. Due to the lookup
strategy performed by <code><a class="externalLink"
href="http://java.sun.com/javase/6/docs/api/java/util/ResourceBundle.html#getBundle(java.lang.String,%20java.util.Locale,%20java.lang.ClassLoader)">ResourceBundle.getBundle()</a></code>,
one must always provide a dedicated resource bundle for this default language,
too. This bundle should be empty because it inherits the strings via the parent
chain from the base bundle, but it must exist.</p>
<p>The following example illustrates this requirement. Imagine the broken
resource bundle family shown below which is intended to provide localization
for English, German and French:</p>
-
-<div class="source"><pre class="prettyprint linenums"><code>src/
+<div>
+<pre>src/
+- main/
+- resources/
+- mymojo-report.properties
+- mymojo-report_de.properties
- +- mymojo-report_fr.properties
-</code></pre></div>
+ +- mymojo-report_fr.properties</pre></div>
<p>Now, if a resource bundle is to be looked up for English on a JVM whose
default locale happens to be French, the bundle
<code>mymojo-report_fr.properties</code> will be loaded instead of the intended
bundle <code>mymojo-report.properties</code>.</p>
<p>Reporting plugins that suffer from this bug can easily be detected by
executing <code>mvn site -D locales=xy,en</code> where <code>xy</code> denotes
any other language code supported by the particular plugin. Specifying
<code>xy</code> as the first locale will have the Maven Site Plugin change the
JVM's default locale to <code>xy</code> which in turn causes the lookup for
<code>en</code> to fail as outlined above unless the plugin has a dedicated
resource bundle for English.</p></section><section>
-<h3>Using System Properties</h3>
-<p>Maven's command line supports the definition of system properties via
arguments of the form <code>-D key=value</code>. While these properties are
called system properties, plugins should never use
<code>[System.getProperty()](http://java.sun.com/javase/6/docs/api/java/lang/System.html#getProperty(java.lang.String))</code>
and related methods to query these properties. For example, the following code
snippet will not work reliably when Maven is embedded, say into an IDE or a CI
server:</p>
-
-<div class="source"><pre class="prettyprint linenums"><code
class="language-java">public MyMojo extends AbstractMojo
+<h2><a id="Using_System_Properties">Using System Properties</a></h2>
+<p>Maven's command line supports the definition of system properties via
arguments of the form <code>-D key=value</code>. While these properties are
called system properties, plugins should never use <code><a
class="externalLink"
href="http://java.sun.com/javase/6/docs/api/java/lang/System.html#getProperty(java.lang.String)">System.getProperty()</a></code>
and related methods to query these properties. For example, the following code
snippet will not work reliably when Maven is embedded, say into an IDE or a CI
server:</p>
+<div class="source"><pre class="prettyprint linenums">public MyMojo extends
AbstractMojo
{
public void execute()
{
@@ -285,13 +238,11 @@ if ( "info".equals( debugLevel
*/
String value = System.getProperty( "maven.test.skip" );
}
-}
-</code></pre></div>
-<p>The problem is that the properties managed by the <code>System</code> class
are global, i.e. shared among all threads in the current JVM. To prevent
conflicts with other code running in the same JVM, Maven plugins should instead
query the execution properties. These can be obtained from
<code>[MavenSession.getExecutionProperties()](https://maven.apache.org/ref/current/maven-core/apidocs/org/apache/maven/execution/MavenSession.html#getExecutionProperties())</code>.</p></section><section>
-<h3>Using Shutdown Hooks</h3>
+}</pre></div>
+<p>The problem is that the properties managed by the <code>System</code> class
are global, i.e. shared among all threads in the current JVM. To prevent
conflicts with other code running in the same JVM, Maven plugins should instead
query the execution properties. These can be obtained from <code><a
class="externalLink"
href="https://maven.apache.org/ref/current/maven-core/apidocs/org/apache/maven/execution/MavenSession.html#getExecutionProperties()">MavenSession.getExecutionProperties()</a></code>.</p></section><section>
+<h2><a id="Using_Shutdown_Hooks">Using Shutdown Hooks</a></h2>
<p>People occasionally employ shutdown hooks to perform cleanup tasks, e.g. to
delete temporary files as shown in the example below:</p>
-
-<div class="source"><pre class="prettyprint linenums"><code
class="language-java">public MyMojo extends AbstractMojo
+<div class="source"><pre class="prettyprint linenums">public MyMojo extends
AbstractMojo
{
public void execute()
{
@@ -302,23 +253,22 @@ if ( "info".equals( debugLevel
*/
tempFile.deleteOnExit();
}
-}
-</code></pre></div>
+}</pre></div>
<p>The problem is that the JVM executing Maven can be running much longer than
the actual Maven build. Of course, this does not apply to the standalone
invocation of Maven from the command line. However, it affects the embedded
usage of Maven in IDEs or CI servers. In those cases, the cleanup tasks will be
deferred, too. If the JVM is then executing a bunch of other Maven builds, many
such cleanup tasks can sum up, eating up resources of the JVM.</p>
<p>For this reason, plugin developers should avoid usage of shutdown hooks and
rather use <code>try</code>/<code>finally</code> blocks to perform cleanup as
soon as the resources are no longer needed.</p></section><section>
-<h3>Resolving Relative Paths</h3>
+<h2><a id="Resolving_Relative_Paths">Resolving Relative Paths</a></h2>
<p>It is common practice for users of Maven to specify relative paths in the
POM, not to mention that the Super POM does so, too. The intention is to
resolve such relative paths against the base directory of the current project.
In other words, the paths <code>target/classes</code> and
<code>${basedir}/target/classes</code> should resolve to the same directory for
a given POM.</p>
-<p>Unfortunately, the class
<code>[java.io.File](http://java.sun.com/javase/6/docs/api/java/io/File.html)</code>
does not resolve relative paths against the project's base directory. As
mentioned in its class javadoc, it resolves relative paths against the current
working directory. In plain English: Unless a Maven component has complete
control over the current working directory, any usage of
<code>java.io.File</code> in combination with a relative path is a bug.</p>
+<p>Unfortunately, the class <code><a class="externalLink"
href="http://java.sun.com/javase/6/docs/api/java/io/File.html">java.io.File</a></code>
does not resolve relative paths against the project's base directory. As
mentioned in its class javadoc, it resolves relative paths against the current
working directory. In plain English: Unless a Maven component has complete
control over the current working directory, any usage of
<code>java.io.File</code> in combination with a relative path is a bug.</p>
<p>At first glance, one might be tempted to argue that the project base
directory is equal to the current working directory. However, this assumption
is generally not true. Consider the following scenarios:</p>
-<p>a Reactor Builds</p>
-<p>When a child module is build during a reactor build, the current working
directory is usually the base directory of the parent project, not the base
directory of the current module. That is the most common scenario where users
are faced with the bug.</p>
-<p>a Embedded Maven Invocations</p>
-<p>Other tools, most notably IDEs, that run Maven under the hood may have set
the current working directory to their installation directory or whatever they
like.</p>
-<p>a Maven Invocations using the <code>-f</code> Switch</p>
-<p>While it is surely an uncommon use-case, the user is free to invoke Maven
from an arbitrary working directory by specifying an absolute path like
<code>mvn -f /home/me/projects/demo/pom.xml</code>.</p>
+<ol style="list-style-type: lower-alpha">
+<li>Reactor Builds
+<p>When a child module is build during a reactor build, the current working
directory is usually the base directory of the parent project, not the base
directory of the current module. That is the most common scenario where users
are faced with the bug.</p></li>
+<li>Embedded Maven Invocations
+<p>Other tools, most notably IDEs, that run Maven under the hood may have set
the current working directory to their installation folder or whatever they
like.</p></li>
+<li>Maven Invocations using the <code>-f</code> Switch
+<p>While it is surely an uncommon use-case, the user is free to invoke Maven
from an arbitrary working directory by specifying an absolute path like
<code>mvn -f /home/me/projects/demo/pom.xml</code>.</p></li></ol>
<p>Hence this example code is prone to misbehave:</p>
-
-<div class="source"><pre class="prettyprint linenums"><code
class="language-java">public MyMojo extends AbstractMojo
+<div class="source"><pre class="prettyprint linenums">public MyMojo extends
AbstractMojo
{
/**
* @parameter
@@ -333,22 +283,18 @@ if ( "info".equals( debugLevel
*/
File outputDir = new File( outputDirectory ).getAbsoluteFile();
}
-}
-</code></pre></div>
+}</pre></div>
<p>In order to guarantee reliable builds, Maven and its plugins must manually
resolve relative paths against the project's base directory. A simple idiom
like the following will do just fine:</p>
-
-<div class="source"><pre class="prettyprint linenums"><code
class="language-java">File file = new File( path );
+<div class="source"><pre class="prettyprint linenums">File file = new File(
path );
if ( !file.isAbsolute() )
{
file = new File( project.getBasedir(), file );
-}
-</code></pre></div>
-<p>Many Maven plugins can get this resolution automatically if they declare
their affected mojo parameters of type <code>java.io.File</code> instead of
<code>java.lang.String</code>. This subtle difference in parameter types will
trigger a feature known as <em>path translation</em>, i.e. the Maven core will
automatically resolve relative paths when it pumps the XML configuration into a
mojo.</p></section><section>
-<h3>Determining the Output Directory for a Site Report</h3>
+}</pre></div>
+<p>Many Maven plugins can get this resolution automatically if they declare
their affected mojo parameters of type <code>java.io.File</code> instead of
<code>java.lang.String</code>. This subtle difference in parameter types will
trigger a feature known as <i>path translation</i>, i.e. the Maven core will
automatically resolve relative paths when it pumps the XML configuration into a
mojo.</p></section><section>
+<h2><a id="Determining_the_Output_Directory_for_a_Site_Report">Determining the
Output Directory for a Site Report</a></h2>
<p>Most reporting plugins inherit from <code>AbstractMavenReport</code>. In
doing so, they need to implement the inherited but abstract method
<code>getOutputDirectory()</code>. To implement this method, plugins usually
declare a field named <code>outputDirectory</code> which they return in the
method. Nothing wrong so far.</p>
<p>Now, some plugins need to create additional files in the report output
directory that accompany the report generated via the sink interface. While it
is tempting to use either the method <code>getOutputDirectory()</code> or the
field <code>outputDirectory</code> directly in order to setup a path for the
output files, this leads most likely to a bug. More precisely, those plugins
will not properly output files when run by the Maven Site Plugin as part of the
site lifecycle. This is best noticed when the output directory for the site is
configured directly in the Maven Site Plugin such that it deviates from the
expression <code>${project.reporting.outputDirectory}</code> that the plugins
use by default. Multi-language site generation is another scenario to exploit
this bug which is illustrated below:</p>
-
-<div class="source"><pre class="prettyprint linenums"><code
class="language-java">public MyReportMojo extends AbstractMavenReport
+<div class="source"><pre class="prettyprint linenums">public MyReportMojo
extends AbstractMavenReport
{
/**
* @parameter
default-value="${project.reporting.outputDirectory}"
@@ -368,15 +314,13 @@ if ( !file.isAbsolute() )
*/
outputDirectory.mkdirs();
}
-}
-</code></pre></div>
+}</pre></div>
<p>There are in principal two situations in which a report mojo could be
invoked. The mojo might be run directly from the command line or the default
build lifecycle or it might be run indirectly as part of the site generation
along with other report mojos. The glaring difference between these two
invocations is the way the output directory is controlled. In the first case,
the parameter <code>outputDirectory</code> from the mojo itself is used. In the
second case however, the Maven Site Plugin takes over control and will set the
output directory according to its own configuration by calling
<code>MavenReport.setReportOutputDirectory()</code> on the reports being
generated.</p>
<p>Therefore, developers should always use
<code>MavenReport.getReportOutputDirectory()</code> if they need to query the
effective output directory for the report. The implementation of
<code>AbstractMavenReport.getOutputDirectory()</code> is only intended as a
fallback in case the mojo is not run as part of the site
generation.</p></section><section>
-<h3>Retrieving the Mojo Logger</h3>
-<p>Maven employs an IoC container named Plexus to setup a plugin's mojos
before their execution. In other words, components required by a mojo will be
provided by means of dependency injection, more precisely field injection. The
important point to keep in mind is that this field injection happens
<em>after</em> the mojo's constructor has finished. This means that references
to injected components are invalid during the construction time of the mojo.</p>
+<h2><a id="Retrieving_the_Mojo_Logger">Retrieving the Mojo Logger</a></h2>
+<p>Maven employs an IoC container named Plexus to setup a plugin's mojos
before their execution. In other words, components required by a mojo will be
provided by means of dependency injection, more precisely field injection. The
important point to keep in mind is that this field injection happens
<i>after</i> the mojo's constructor has finished. This means that references to
injected components are invalid during the construction time of the mojo.</p>
<p>For example, the next snippet tries to retrieve the mojo logger during
construction time but the mojo logger is an injected component and as such has
not been properly initialized yet:</p>
-
-<div class="source"><pre class="prettyprint linenums"><code
class="language-java">public MyMojo extends AbstractMojo
+<div class="source"><pre class="prettyprint linenums">public MyMojo extends
AbstractMojo
{
/*
* FIXME: This will retrieve a wrong logger instead of the intended mojo
logger.
@@ -387,9 +331,8 @@ if ( !file.isAbsolute() )
{
log.debug( "..." );
}
-}
-</code></pre></div>
-<p>In case of the logger, the above mojo will simply use a default console
logger, i.e. the code defect is not immediately noticeable by a
<code>NullPointerException</code>. This default logger will however use a
different message format for its output and also outputs debug messages even if
Maven's debug mode was not enabled. For this reason, developers must not try to
cache the logger during construction time. The method <code>getLog()</code> is
fast enough and can simply be called whenever one needs it.
+—</p></section></section></section>
+}</pre></div>
+<p>In case of the logger, the above mojo will simply use a default console
logger, i.e. the code defect is not immediately noticeable by a
<code>NullPointerException</code>. This default logger will however use a
different message format for its output and also outputs debug messages even if
Maven's debug mode was not enabled. For this reason, developers must not try to
cache the logger during construction time. The method <code>getLog()</code> is
fast enough and can simply be called whenever one needs it.
+---</p></section></section>
</main>
</div>
</div>
Modified: maven/website/content/plugin-developers/cookbook/index.html
==============================================================================
--- maven/website/content/plugin-developers/cookbook/index.html (original)
+++ maven/website/content/plugin-developers/cookbook/index.html Sat Feb 18
20:40:58 2023
@@ -2,7 +2,7 @@
<!--
- | Generated by Apache Maven Doxia Site Renderer 2.0.0-M4 from
content/markdown/plugin-developers/cookbook/index.md at 2023-02-18
+ | Generated by Apache Maven Doxia Site Renderer 2.0.0-M4 from
content/apt/plugin-developers/cookbook/index.apt at 2023-02-18
| Rendered using Apache Maven Fluido Skin 1.11.1
-->
<html xmlns="http://www.w3.org/1999/xhtml" lang="">
@@ -10,7 +10,8 @@
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="generator" content="Apache Maven Doxia Site Renderer 2.0.0-M4"
/>
- <meta name="author" content="Brett Porter, Vincent Siveton" />
+ <meta name="author" content="Brett Porter
+Vincent Siveton" />
<meta name="date" content="2009-08-02" />
<title>Maven – Plugins Cookbook</title>
<link rel="stylesheet" href="../../css/apache-maven-fluido-1.11.1.min.css"
/>
@@ -48,7 +49,7 @@
<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 ">Plugins Cookbook <a
href="https://github.com/apache/maven-site/tree/master/content/markdown/plugin-developers/cookbook/index.md"><img
src="../../images/accessories-text-editor.png" title="Edit" /></a></li>
+ <li class="active ">Plugins Cookbook <a
href="https://github.com/apache/maven-site/tree/master/content/apt/plugin-developers/cookbook/index.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-18</li>
<li class="pull-right"><span class="divider">|</span>
<a href="../../scm.html" title="Get Sources">Get Sources</a></li>
@@ -123,34 +124,12 @@
</div>
</header>
<main id="bodyColumn" class="span10" >
-<!--
-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>Maven Extensions Cookbook</h2>
+<section>
+<h1>Maven Extensions Cookbook</h1>
<p>Extensions are based on components, defined either with Plexus or
JSR-330:</p>
<ul>
-
-<li>
-<p><a href="./plexus-plugin-upgrade.html">How to upgrade from Plexus javadoc
tags to Plexus Java annotations?</a></p></li>
-<li>
-<p><a href="/maven-jsr330.html">Using JSR-330 (instead of Plexus Java
annotations)</a></p></li>
-</ul></section></section>
+<li><a href="./plexus-plugin-upgrade.html">How to upgrade from Plexus javadoc
tags to Plexus Java annotations?</a></li>
+<li><a href="/maven-jsr330.html">Using JSR-330 (instead of Plexus Java
annotations)</a></li></ul></section>
</main>
</div>
</div>
Modified:
maven/website/content/plugin-developers/cookbook/plexus-plugin-upgrade.html
==============================================================================
--- maven/website/content/plugin-developers/cookbook/plexus-plugin-upgrade.html
(original)
+++ maven/website/content/plugin-developers/cookbook/plexus-plugin-upgrade.html
Sat Feb 18 20:40:58 2023
@@ -2,7 +2,7 @@
<!--
- | Generated by Apache Maven Doxia Site Renderer 2.0.0-M4 from
content/markdown/plugin-developers/cookbook/plexus-plugin-upgrade.md at
2023-02-18
+ | Generated by Apache Maven Doxia Site Renderer 2.0.0-M4 from
content/apt/plugin-developers/cookbook/plexus-plugin-upgrade.apt at 2023-02-18
| Rendered using Apache Maven Fluido Skin 1.11.1
-->
<html xmlns="http://www.w3.org/1999/xhtml" lang="">
@@ -48,7 +48,7 @@
<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 ">Cookbook - How To Upgrade from Plexus Javadoc Tags to
Plexus Java Annotations <a
href="https://github.com/apache/maven-site/tree/master/content/markdown/plugin-developers/cookbook/plexus-plugin-upgrade.md"><img
src="../../images/accessories-text-editor.png" title="Edit" /></a></li>
+ <li class="active ">Cookbook - How To Upgrade from Plexus Javadoc Tags to
Plexus Java Annotations <a
href="https://github.com/apache/maven-site/tree/master/content/apt/plugin-developers/cookbook/plexus-plugin-upgrade.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-18</li>
<li class="pull-right"><span class="divider">|</span>
<a href="../../scm.html" title="Get Sources">Get Sources</a></li>
@@ -136,105 +136,73 @@
</div>
</header>
<main id="bodyColumn" class="span10" >
-<!--
-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>Cookbook: How To Upgrade from Plexus Javadoc Tags to Plexus Java
Annotations?</h2><section>
-<h3>Summary</h3>
+<section>
+<h1>Cookbook: How To Upgrade from Plexus Javadoc Tags to Plexus Java
Annotations?</h1><section>
+<h2>Summary</h2>
<p>This recipe describes how to upgrade from Plexus Javadoc Tags to Plexus
Java Annotations when defining a Plexus component.</p>
<p>This is done in 2 steps:</p>
-<p>1 replace the <a
href="https://codehaus-plexus.github.io/plexus-maven-plugin/"
class="externalLink">deprecated <code>plexus-maven-plugin</code></a>, which
only supports Plexus Javadoc Tags, with its <a
href="https://codehaus-plexus.github.io/plexus-containers/plexus-component-metadata/"
class="externalLink">successor: <code>plexus-component-metadata</code></a>,
which support both Plexus Javadoc Tags and Plexus Java Annotations,</p>
-<p>1 update sources with <a
href="https://codehaus-plexus.github.io/plexus-containers/plexus-component-annotations/"
class="externalLink">Java Annotations for Plexus</a>.</p>
-<p><strong>Notice</strong>: if you're targeting components for Maven 3.1.0+,
using <a href="/maven-jsr330.html"><code>@Named</code>/<code>@Inject</code>
JSR-330 annotations</a> instead of
<code>@Component</code>/<code>@Requirement</code> Plexus Java Annotations may
be a good next step</p></section><section>
-<h3>Prerequisite Plugins</h3>
+<ol style="list-style-type: decimal">
+<li>replace the <a class="externalLink"
href="https://codehaus-plexus.github.io/plexus-maven-plugin/">deprecated
<code>plexus-maven-plugin</code></a>, which only supports Plexus Javadoc Tags,
with its <a class="externalLink"
href="https://codehaus-plexus.github.io/plexus-containers/plexus-component-metadata/">successor:
<code>plexus-component-metadata</code></a>, which support both Plexus Javadoc
Tags and Plexus Java Annotations,</li>
+<li>update sources with <a class="externalLink"
href="https://codehaus-plexus.github.io/plexus-containers/plexus-component-annotations/">Java
Annotations for Plexus</a>.</li></ol>
+<p><b>Notice</b>: if you're targeting components for Maven 3.1.0+, using <a
href="/maven-jsr330.html"><code>@Named</code>/<code>@Inject</code> JSR-330
annotations</a> instead of <code>@Component</code>/<code>@Requirement</code>
Plexus Java Annotations may be a good next step</p></section><section>
+<h2>Prerequisite Plugins</h2>
<p>Here is the list of the plugins used:</p>
-<table class="table table-striped">
-<thead>
+<table class="bodyTable bodyTableBorder">
<tr class="a">
-<th><strong>Plugin</strong></th>
-<th><strong>Version</strong></th></tr></thead><tbody>
+<th><b>Plugin</b></th>
+<th><b>Version</b></th></tr>
<tr class="b">
-<td><a href="https://codehaus-plexus.github.io/plexus-maven-plugin/"
class="externalLink"><code>plexus-maven-plugin</code></a></td>
-<td>1.3.8</td></tr>
+<td style="text-align: left;"><a class="externalLink"
href="https://codehaus-plexus.github.io/plexus-maven-plugin/"><code>plexus-maven-plugin</code></a></td>
+<td style="text-align: left;">1.3.8</td></tr>
<tr class="a">
-<td><a
href="https://codehaus-plexus.github.io/plexus-containers/plexus-component-metadata/"
class="externalLink"><code>plexus-component-metadata</code></a></td>
-<td>1.7.1</td></tr></tbody>
-</table>
-</section><section>
-<h3>Equivalence Table</h3>
-<table class="table table-striped">
-<thead>
+<td style="text-align: left;"><a class="externalLink"
href="https://codehaus-plexus.github.io/plexus-containers/plexus-component-metadata/"><code>plexus-component-metadata</code></a></td>
+<td style="text-align: left;">1.7.1</td></tr></table></section><section>
+<h2>Equivalence Table</h2>
+<table class="bodyTable bodyTableBorder">
<tr class="a">
-<th></th>
-<th><strong>plexus-maven-plugin</strong></th>
-<th><strong>plexus-component-metadata</strong></th></tr></thead><tbody>
+<td style="text-align: center;"></td>
+<th><b>plexus-maven-plugin</b></th>
+<th><b>plexus-component-metadata</b></th></tr>
<tr class="b">
-<td></td>
-<td><a href="https://codehaus-plexus.github.io/plexus-maven-plugin/"
class="externalLink">project</a> / <a
href="https://codehaus-plexus.github.io/plexus-maven-plugin/plugin-info.html"
class="externalLink">plugin info</a></td>
-<td><a
href="https://codehaus-plexus.github.io/plexus-containers/plexus-component-metadata/"
class="externalLink">project</a> / <a
href="https://codehaus-plexus.github.io/plexus-containers/plexus-component-metadata/plugin-info.html"
class="externalLink">plugin info</a></td></tr>
+<td style="text-align: center;"></td>
+<td style="text-align: center;"><a class="externalLink"
href="https://codehaus-plexus.github.io/plexus-maven-plugin/">project</a> / <a
class="externalLink"
href="https://codehaus-plexus.github.io/plexus-maven-plugin/plugin-info.html">plugin
info</a></td>
+<td style="text-align: center;"><a class="externalLink"
href="https://codehaus-plexus.github.io/plexus-containers/plexus-component-metadata/">project</a>
/ <a class="externalLink"
href="https://codehaus-plexus.github.io/plexus-containers/plexus-component-metadata/plugin-info.html">plugin
info</a></td></tr>
<tr class="a">
-<td>latest</td>
-<td>1.3.8</td>
-<td>1.7.1</td></tr>
+<th>latest</th>
+<td style="text-align: center;">1.3.8</td>
+<td style="text-align: center;">1.7.1</td></tr>
<tr class="b">
-<td>phase</td>
-<td>process-sources</td>
-<td>process-classes</td></tr>
+<th>phase</th>
+<td style="text-align: center;">process-sources</td>
+<td style="text-align: center;">process-classes</td></tr>
<tr class="a">
-<td>goals</td>
-<td><a
href="https://codehaus-plexus.github.io/plexus-maven-plugin/descriptor-mojo.html"
class="externalLink"><code>descriptor</code></a></td>
-<td><a
href="https://codehaus-plexus.github.io/plexus-containers/plexus-component-metadata/generate-metadata-mojo.html"
class="externalLink"><code>generate-metadata</code></a></td></tr>
+<th>goals</th>
+<td style="text-align: center;"><a class="externalLink"
href="https://codehaus-plexus.github.io/plexus-maven-plugin/descriptor-mojo.html"><code>descriptor</code></a></td>
+<td style="text-align: center;"><a class="externalLink"
href="https://codehaus-plexus.github.io/plexus-containers/plexus-component-metadata/generate-metadata-mojo.html"><code>generate-metadata</code></a></td></tr>
<tr class="b">
-<td></td>
-<td><a
href="https://codehaus-plexus.github.io/plexus-maven-plugin/merge-descriptors-mojo.html"
class="externalLink"><code>merge-descriptors</code></a></td>
-<td>see <code>staticMetadataDirectory</code> parameter  </td></tr>
+<td style="text-align: center;"></td>
+<td style="text-align: center;"><a class="externalLink"
href="https://codehaus-plexus.github.io/plexus-maven-plugin/merge-descriptors-mojo.html"><code>merge-descriptors</code></a></td>
+<td style="text-align: center;">see <code>staticMetadataDirectory</code>
parameter  <br />default:
<code>${basedir}/src/main/resources/META-INF/plexus</code></td></tr>
<tr class="a">
-<td>default:
<code>${basedir}/src/main/resources/META-INF/plexus</code></td></tr>
+<td style="text-align: center;"></td>
+<td style="text-align: center;"><a class="externalLink"
href="https://codehaus-plexus.github.io/plexus-maven-plugin/test-descriptor-mojo.html"><code>test-descriptor</code></a></td>
+<td style="text-align: center;"><a class="externalLink"
href="https://codehaus-plexus.github.io/plexus-containers/plexus-component-metadata/generate-test-metadata-mojo.html"><code>generate-test-metadata</code></a></td></tr>
<tr class="b">
-<td></td>
-<td><a
href="https://codehaus-plexus.github.io/plexus-maven-plugin/test-descriptor-mojo.html"
class="externalLink"><code>test-descriptor</code></a></td>
-<td><a
href="https://codehaus-plexus.github.io/plexus-containers/plexus-component-metadata/generate-test-metadata-mojo.html"
class="externalLink"><code>generate-test-metadata</code></a></td></tr>
+<td style="text-align: center;"></td>
+<td style="text-align: center;"><a class="externalLink"
href="https://codehaus-plexus.github.io/plexus-maven-plugin/test-merge-descriptors-mojo.html"><code>test-merge-descriptors</code></a></td>
+<td style="text-align: center;">see <code>testStaticMetadataDirectory</code>
parameter  <br />default:
<code>${basedir}/src/test/resources/META-INF/plexus</code></td></tr>
<tr class="a">
-<td></td>
-<td><a
href="https://codehaus-plexus.github.io/plexus-maven-plugin/test-merge-descriptors-mojo.html"
class="externalLink"><code>test-merge-descriptors</code></a></td>
-<td>see <code>testStaticMetadataDirectory</code> parameter  </td></tr>
+<td style="text-align: center;"></td>
+<td style="text-align: center;"><a class="externalLink"
href="https://codehaus-plexus.github.io/plexus-maven-plugin/components-report-mojo.html"><code>components-report</code></a></td>
+<td style="text-align: center;">reporting feature not available</td></tr>
<tr class="b">
-<td>default:
<code>${basedir}/src/test/resources/META-INF/plexus</code></td></tr>
-<tr class="a">
-<td></td>
-<td><a
href="https://codehaus-plexus.github.io/plexus-maven-plugin/components-report-mojo.html"
class="externalLink"><code>components-report</code></a></td>
-<td>reporting feature not available</td></tr>
-<tr class="b">
-<td>source annotations</td>
-<td>javadoc tags:  </td></tr>
-<tr class="a">
-<td><code>@plexus.component</code>, <code>@plexus.requirement</code>,
<code>@plexus.configuration</code>  </td>
-<td>javadoc tags + <a
href="https://codehaus-plexus.github.io/plexus-containers/plexus-component-annotations/"
class="externalLink"><code>plexus-component-annotations</code></a> Java 5
annotations:</td></tr>
-<tr class="b">
-<td><a
href="https://codehaus-plexus.github.io/plexus-containers/plexus-component-annotations/apidocs/org/codehaus/plexus/component/annotations/Component.html"
class="externalLink"><code>@Component</code></a>, <a
href="https://codehaus-plexus.github.io/plexus-containers/plexus-component-annotations/apidocs/org/codehaus/plexus/component/annotations/Requirement.html"
class="externalLink"><code>@Requirement</code></a>, <a
href="https://codehaus-plexus.github.io/plexus-containers/plexus-component-annotations/apidocs/org/codehaus/plexus/component/annotations/Configuration.html"
class="externalLink"><code>@Configuration</code></a>,</td></tr></tbody>
-</table>
-</section><section>
-<h3>Recipe</h3><section>
-<h4>Plugin Configuration</h4>
+<th>source annotations</th>
+<td style="text-align: center;">javadoc tags:  <br
/><code>@plexus.component</code>, <code>@plexus.requirement</code>,
<code>@plexus.configuration</code>  </td>
+<td style="text-align: center;">javadoc tags + <a class="externalLink"
href="https://codehaus-plexus.github.io/plexus-containers/plexus-component-annotations/"><code>plexus-component-annotations</code></a>
Java 5 annotations: <br /><a class="externalLink"
href="https://codehaus-plexus.github.io/plexus-containers/plexus-component-annotations/apidocs/org/codehaus/plexus/component/annotations/Component.html"><code>@Component</code></a>,
<a class="externalLink"
href="https://codehaus-plexus.github.io/plexus-containers/plexus-component-annotations/apidocs/org/codehaus/plexus/component/annotations/Requirement.html"><code>@Requirement</code></a>,
<a class="externalLink"
href="https://codehaus-plexus.github.io/plexus-containers/plexus-component-annotations/apidocs/org/codehaus/plexus/component/annotations/Configuration.html"><code>@Configuration</code></a>,</td></tr></table></section><section>
+<h2>Recipe</h2><section>
+<h3>Plugin Configuration</h3>
<p>In your <code>pom.xml</code>, replace <code>plexus-maven-plugin</code>
configuration:</p>
-
-<div class="source"><pre class="prettyprint linenums"><code
class="language-xml"><project>
+<div class="source"><pre class="prettyprint linenums"><project>
<build>
<plugins>
<plugin>
@@ -250,11 +218,9 @@ under the License.
</executions>
</plugin>
</build>
-</project>
-</code></pre></div>
+</project></pre></div>
<p>with corresponding <code>plexus-component-metadata</code> configuration:</p>
-
-<div class="source"><pre class="prettyprint linenums"><code
class="language-xml"><project>
+<div class="source"><pre class="prettyprint linenums"><project>
<build>
<plugins>
<plugin>
@@ -270,13 +236,11 @@ under the License.
</executions>
</plugin>
</build>
-</project>
-</code></pre></div>
+</project></pre></div>
<p>If <code>merge-descriptors</code> is used, move the handwritten xml file to
<code>${basedir}/src/main/resources/META-INF/plexus</code>.</p></section><section>
-<h4>Replacing Plexus Javadoc Tags with Plexus Java 5 Annotations</h4>
+<h3>Replacing Plexus Javadoc Tags with Plexus Java 5 Annotations</h3>
<p>In your <code>pom.xml</code>, add <code>plexus-component-annotations</code>
dependency:</p>
-
-<div class="source"><pre class="prettyprint linenums"><code
class="language-xml"><project>
+<div class="source"><pre class="prettyprint linenums"><project>
<dependencies>
<dependency>
<groupId>org.codehaus.plexus</groupId>
@@ -284,11 +248,9 @@ under the License.
<version>1.7.1</version>
</dependency>
</dependencies>
-</project>
-</code></pre></div>
+</project></pre></div>
<p>In your java sources, replace javadoc tags:</p>
-
-<div class="source"><pre class="prettyprint linenums"><code
class="language-java">/**
+<div class="source"><pre class="prettyprint linenums">/**
* @plexus.component role="foo.MyComponent"
role-hint="hint-value"
*/
public class MyComponentImplementation
@@ -298,11 +260,9 @@ public class MyComponentImplementation
* @plexus.requirement
*/
private InjectedComponent;
-}
-</code></pre></div>
+}</pre></div>
<p>with corresponding Java 5 annotations</p>
-
-<div class="source"><pre class="prettyprint linenums"><code
class="language-java">import
org.codehaus.plexus.component.annotations.Component;
+<div class="source"><pre class="prettyprint linenums">import
org.codehaus.plexus.component.annotations.Component;
import org.codehaus.plexus.component.annotations.Requirement;
@Component( role = MyComponent.class, hint = "hint-value" )
@@ -311,8 +271,7 @@ public class MyComponentImplementation
{
@Requirement
private InjectedComponent;
-}
-</code></pre></div></section></section></section></section>
+}</pre></div></section></section></section>
</main>
</div>
</div>
Modified: maven/website/content/plugin-developers/index.html
==============================================================================
--- maven/website/content/plugin-developers/index.html (original)
+++ maven/website/content/plugin-developers/index.html Sat Feb 18 20:40:58 2023
@@ -2,7 +2,7 @@
<!--
- | Generated by Apache Maven Doxia Site Renderer 2.0.0-M4 from
content/markdown/plugin-developers/index.md at 2023-02-18
+ | Generated by Apache Maven Doxia Site Renderer 2.0.0-M4 from
content/apt/plugin-developers/index.apt at 2023-02-18
| Rendered using Apache Maven Fluido Skin 1.11.1
-->
<html xmlns="http://www.w3.org/1999/xhtml" lang="">
@@ -48,7 +48,7 @@
<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 ">Plugin Developers Centre <a
href="https://github.com/apache/maven-site/tree/master/content/markdown/plugin-developers/index.md"><img
src="../images/accessories-text-editor.png" title="Edit" /></a></li>
+ <li class="active ">Plugin Developers Centre <a
href="https://github.com/apache/maven-site/tree/master/content/apt/plugin-developers/index.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-18</li>
<li class="pull-right"><span class="divider">|</span>
<a href="../scm.html" title="Get Sources">Get Sources</a></li>
@@ -136,70 +136,29 @@
</div>
</header>
<main id="bodyColumn" class="span10" >
-<!--
-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>Plugin Developers Centre</h2>
-<p>This documentation centre is for those who are developing Maven plugins.
This might be for your own build, or as an accompaniment to your third party
tool.</p><!-- TODO: callout -->
-
-<p><strong>What is a Mojo?</strong> A mojo is a <strong>M</strong>aven plain
<strong>O</strong>ld <strong>J</strong>ava <strong>O</strong>bject. Each mojo
is an executable <em>goal</em> in Maven, and a plugin is a distribution of one
or more related mojos.</p><!-- TODO: tasks as buttons? -->
-
-<ul>
-
-<li>
-<p><a href="../guides/introduction/introduction-to-plugins.html">Introduction
to Plugin Development</a> - Introduction to concepts</p></li>
-<li>
-<p><a href="../guides/plugin/guide-java-plugin-development.html">Your First
Mojo</a> - Learn how to write your first plugin</p></li>
-<li>
-<p><a href="../guides/plugin/guide-java-report-plugin-development.html">Your
First Report Mojo</a> - Learn how to write your first reporting plugin</p></li>
-<li>
-<p><a href="./plugin-testing.html">Testing your Plugin</a> - How to write
tests for your plugins</p></li>
-<li>
-<p><a href="./plugin-documenting.html">Documenting your Plugin</a> - How to
write documentation for your plugins</p></li>
-<li>
-<p>TODO: creating and using custom packaging (like <a
href="/archetype/archetype-packaging/"><code>maven-archetype</code>
packaging</a>)</p></li>
-<li>
-<p><a href="./common-bugs.html">Common Bugs and Pitfalls</a> - Overview of
problematic coding patterns</p></li>
-</ul><!-- TODO: trails -->
<section>
-<h3>Reference</h3>
+<h1>Plugin Developers Centre</h1>
+<p>This documentation centre is for those who are developing Maven plugins.
This might be for your own build, or as an accompaniment to your third party
tool.</p>
+<p><b>What is a Mojo?</b> A mojo is a <b>M</b>aven plain <b>O</b>ld
<b>J</b>ava <b>O</b>bject. Each mojo is an executable <i>goal</i> in Maven, and
a plugin is a distribution of one or more related mojos.</p>
<ul>
-
-<li>
-<p><a href="../developers/mojo-api-specification.html">Mojo API and Annotation
Reference</a></p></li>
-<li>
-<p><a href="/plugin-tools/examples/using-annotations.html">Maven Plugin Tools
and annotations</a></p></li>
-<li>
-<p><a href="../ref/current/index.html">Maven API Reference</a></p></li>
-<li>
-<p><a href="../guides/mini/guide-maven-classloading.html">Maven Class
Loading</a></p></li>
-</ul></section><section>
-<h3>Extensions</h3>
+<li><a href="../guides/introduction/introduction-to-plugins.html">
Introduction to Plugin Development</a> - Introduction to concepts</li>
+<li><a href="../guides/plugin/guide-java-plugin-development.html"> Your First
Mojo</a> - Learn how to write your first plugin</li>
+<li><a href="../guides/plugin/guide-java-report-plugin-development.html"> Your
First Report Mojo</a> - Learn how to write your first reporting plugin</li>
+<li><a href="./plugin-testing.html"> Testing your Plugin</a> - How to write
tests for your plugins</li>
+<li><a href="./plugin-documenting.html"> Documenting your Plugin</a> - How to
write documentation for your plugins</li>
+<li>TODO: creating and using custom packaging (like <a
href="/archetype/archetype-packaging/"><code>maven-archetype</code>
packaging</a>)</li>
+<li><a href="./common-bugs.html"> Common Bugs and Pitfalls</a> - Overview of
problematic coding patterns</li></ul><section>
+<h2>Reference</h2>
<ul>
-
-<li>
-<p><a href="../examples/maven-3-lifecycle-extensions.html">Maven 3 lifecycle
extensions</a></p></li>
-<li>
-<p><a href="./cookbook/plexus-plugin-upgrade.html">How to upgrade from Plexus
javadoc tags to Plexus Java annotations?</a></p></li>
-<li>
-<p><a href="/maven-jsr330.html">Using JSR-330 (instead of Plexus Java
annotations)</a></p></li>
-</ul></section></section></section>
+<li><a href="../developers/mojo-api-specification.html"> Mojo API and
Annotation Reference</a></li>
+<li><a href="/plugin-tools/examples/using-annotations.html"> Maven Plugin
Tools and annotations</a></li>
+<li><a href="../ref/current/index.html"> Maven API Reference</a></li>
+<li><a href="../guides/mini/guide-maven-classloading.html"> Maven Class
Loading</a></li></ul></section><section>
+<h2>Extensions</h2>
+<ul>
+<li><a href="../examples/maven-3-lifecycle-extensions.html">Maven 3 lifecycle
extensions</a></li>
+<li><a href="./cookbook/plexus-plugin-upgrade.html">How to upgrade from Plexus
javadoc tags to Plexus Java annotations?</a></li>
+<li><a href="/maven-jsr330.html">Using JSR-330 (instead of Plexus Java
annotations)</a></li></ul></section></section>
</main>
</div>
</div>
Modified: maven/website/content/plugin-developers/plugin-documenting.html
==============================================================================
--- maven/website/content/plugin-developers/plugin-documenting.html (original)
+++ maven/website/content/plugin-developers/plugin-documenting.html Sat Feb 18
20:40:58 2023
@@ -2,7 +2,7 @@
<!--
- | Generated by Apache Maven Doxia Site Renderer 2.0.0-M4 from
content/markdown/plugin-developers/plugin-documenting.md at 2023-02-18
+ | Generated by Apache Maven Doxia Site Renderer 2.0.0-M4 from
content/apt/plugin-developers/plugin-documenting.apt at 2023-02-18
| Rendered using Apache Maven Fluido Skin 1.11.1
-->
<html xmlns="http://www.w3.org/1999/xhtml" lang="">
@@ -48,7 +48,7 @@
<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 ">Developers centre - Documentation Plugins Strategies
<a
href="https://github.com/apache/maven-site/tree/master/content/markdown/plugin-developers/plugin-documenting.md"><img
src="../images/accessories-text-editor.png" title="Edit" /></a></li>
+ <li class="active ">Developers centre - Documentation Plugins Strategies
<a
href="https://github.com/apache/maven-site/tree/master/content/apt/plugin-developers/plugin-documenting.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-18</li>
<li class="pull-right"><span class="divider">|</span>
<a href="../scm.html" title="Get Sources">Get Sources</a></li>
@@ -136,38 +136,17 @@
</div>
</header>
<main id="bodyColumn" class="span10" >
-<!--
-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>Introduction</h2>
+<section>
+<h1>Introduction</h1>
<p>A <a href="../guides/development/guide-plugin-documentation.html">Guide to
the Plugin Documentation Standard</a> was created. This document is intended to
verify it during the Plugins development.</p></section><section>
-<h2>Verify Plugin Documentation</h2>
+<h1>Verify Plugin Documentation</h1>
<p>The <a href="../plugins/maven-docck-plugin">maven-docck-plugin</a> checks
that a project complies with the Plugin Documentation Standard.</p>
-<p>You <strong>should</strong> verify that all Plugin documentation respects
this standard. The maven-docck-plugin can be run:</p>
-
-<div class="source"><pre class="prettyprint linenums"><code>mvn docck:check
-</code></pre></div></section><section>
-<h2>References</h2>
+<p>You <b>should</b> verify that all Plugin documentation respects this
standard. The maven-docck-plugin can be run:</p>
+<div>
+<pre>mvn docck:check</pre></div></section><section>
+<h1>References</h1>
<ul>
-
-<li><a
href="http://cwiki.apache.org/confluence/display/MAVENOLD/Maven+Plugin+Documentation"
class="externalLink">Maven Plugin Documentation</a></li>
-</ul></section></section>
+<li><a class="externalLink"
href="http://cwiki.apache.org/confluence/display/MAVENOLD/Maven+Plugin+Documentation">Maven
Plugin Documentation</a></li></ul></section>
</main>
</div>
</div>