This is an automated email from the ASF dual-hosted git repository. slachiewicz pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/maven-site.git
commit f0ce7be4fc3a14f4f0aee29202a1fadcaa57b01c Author: Sylwester Lachiewicz <[email protected]> AuthorDate: Sun Nov 1 10:02:07 2026 +0000 Give code blocks a real language instead of unknown --- content/markdown/doxia/developers/macros.md | 8 ++-- content/markdown/doxia/developers/modules.md.vm | 12 +++--- content/markdown/doxia/developers/sink.md | 12 +++--- content/markdown/doxia/issues/index.md | 10 ++--- content/markdown/doxia/macros/index.md | 26 +++++------ content/markdown/doxia/overview.md | 6 +-- content/markdown/doxia/references/apt-format.md | 50 +++++++++++----------- content/markdown/doxia/references/doxia-apt.md | 16 +++---- content/markdown/doxia/references/fml-format.md | 2 +- content/markdown/doxia/references/index.md | 2 +- content/markdown/doxia/references/xdoc-format.md | 22 +++++----- .../development/guide-plugin-documentation.md.vm | 16 +++---- .../introduction-to-plugin-prefix-mapping.md.vm | 4 +- .../plugin/guide-java-plugin-development.md.vm | 16 +++---- .../guide-java-report-plugin-development.md.vm | 12 +++--- 15 files changed, 107 insertions(+), 107 deletions(-) diff --git a/content/markdown/doxia/developers/macros.md b/content/markdown/doxia/developers/macros.md index 7285b279..e3d569fc 100644 --- a/content/markdown/doxia/developers/macros.md +++ b/content/markdown/doxia/developers/macros.md @@ -28,7 +28,7 @@ under the License. You need to add the following [plexus-component-metadata plugin](https://codehaus-plexus.github.io/plexus-containers/plexus-component-metadata/) configuration to generate the correct Plexus _component.xml_ file from annotations for the project containing your macro: -```unknown +```xml <project> ... <build> @@ -55,7 +55,7 @@ You need to add the following [plexus-component-metadata plugin](https://codehau You should implement the _AbstractMacro_ class: -```unknown +```java import org.apache.maven.doxia.macro.AbstractMacro; /** @@ -79,13 +79,13 @@ To use it, you need to write the following markups: - APT - ```unknown + ```text %{my|myParam=myValue} <!-- my is the macro name defined by role-hint --> ``` - XDoc - ```unknown + ```xml <macro name="my"> <!-- my is the required macro name defined by role-hint --> <param name="myParam" value="myValue"/> </macro> diff --git a/content/markdown/doxia/developers/modules.md.vm b/content/markdown/doxia/developers/modules.md.vm index c7840666..0e934bee 100644 --- a/content/markdown/doxia/developers/modules.md.vm +++ b/content/markdown/doxia/developers/modules.md.vm @@ -28,7 +28,7 @@ under the License. First, the easiest way is to create a POM with _doxia-modules_ as parent: -```unknown +```xml <project> <parent> <groupId>org.apache.maven.doxia</groupId> @@ -49,7 +49,7 @@ ${esc.h}${esc.h} Parsing - _MyParser_ class - ```unknown + ```java import org.apache.maven.doxia.parser.AbstractParser; import org.apache.maven.doxia.parser.Parser; import org.codehaus.plexus.component.annotations.Component; @@ -66,7 +66,7 @@ ${esc.h}${esc.h} Parsing - _MyParseException_ class (optional) - ```unknown + ```java import org.apache.maven.doxia.parser.ParseException; public class MyParseException @@ -78,7 +78,7 @@ ${esc.h}${esc.h} Parsing - _MyParserModule_ class - ```unknown + ```java import org.apache.maven.doxia.parser.module.AbstractParserModule; import org.codehaus.plexus.component.annotations.Component; @@ -94,7 +94,7 @@ ${esc.h}${esc.h} Generating - _MySink_ class - ```unknown + ```java import org.apache.maven.doxia.sink.SinkAdapter; public class MySink @@ -108,7 +108,7 @@ ${esc.h}${esc.h} Generating - _MySinkFactory_ class - ```unknown + ```java import org.apache.maven.doxia.sink.SinkFactory; import org.codehaus.plexus.component.annotations.Component; diff --git a/content/markdown/doxia/developers/sink.md b/content/markdown/doxia/developers/sink.md index 3ce67162..de118f69 100644 --- a/content/markdown/doxia/developers/sink.md +++ b/content/markdown/doxia/developers/sink.md @@ -31,7 +31,7 @@ under the License. Doxia can be used to transform an arbitrary input document to any supported output format. The following snippet shows how to use a Doxia _Parser_ to transform an apt file to html: -```unknown +```java File userDir = new File( System.getProperty ( "user.dir" ) ); File inputFile = new File( userDir, "test.apt" ); File outputFile = new File( userDir, "test.html" ); @@ -55,7 +55,7 @@ You could also use the [Doxia Converter Tool](/doxia/doxia-tools/doxia-converter The snippet below gives a simple example of how to generate a document using the Doxia Sink API. -```unknown +```java /** * Generate a simple document and emit it * into the specified sink. The sink is flushed but not closed. @@ -110,7 +110,7 @@ A more complete example that also shows the 'canonical' order of event A number of methods in the Sink API enable passing a set of attributes to many sink events. A typical use case is: -```unknown +```java SinkEventAttributeSet atts = new SinkEventAttributeSet(); atts.addAttribute( SinkEventAttributes.ALIGN, "center" ); @@ -123,7 +123,7 @@ The kind of attributes supported depends on the event and the sink implementatio In **Doxia 1\.0** it was a common practice to use sink.rawText() to generate elements that were not supported by the Sink API. For example, the following snippet could be used to generate a styled HTML <div> block: -```unknown +```java sink.RawText( "<div style=\"cool\">" ); sink.text( "A text with a cool style." ); sink.rawText( "</div>" ); @@ -135,7 +135,7 @@ In **Doxia 1\.1** a new method unknown() was added to the Sink API that can be u The correct way to generate the above <div> block is now: -```unknown +```java SinkEventAttributeSet atts = new SinkEventAttributeSet(); atts.addAttribute( SinkEventAttributes.STYLE, "cool" ); @@ -152,7 +152,7 @@ Read the javadocs of the unknown() method in the [Sink](./doxia/doxia-sink-api/a Related to the above, here is the correct way of injecting a javascript snippet into a Sink: -```unknown +```java // the javascript code is emitted within a commented CDATA section // so we have to start with a newline and comment the CDATA closing in the end // note that the sink will replace the newline by the system EOL diff --git a/content/markdown/doxia/issues/index.md b/content/markdown/doxia/issues/index.md index dcdb3097..fd87551e 100644 --- a/content/markdown/doxia/issues/index.md +++ b/content/markdown/doxia/issues/index.md @@ -33,13 +33,13 @@ This document collects some infos about specific issues and 'gotchas' Using **Doxia 1\.1** you may see a lot of warnings when processing old Apt source files: -```unknown +```text [WARNING] [Apt Parser] Ambiguous link: 'doxia-apt.html'. If this is a local link, prepend "./"! ``` and -```unknown +```text [WARNING] [Apt Parser] Modified invalid link: references/doxia-apt.html ``` @@ -51,7 +51,7 @@ The reason is that in Apt, links to other source documents have to start with ei Doxia distinguishes between figures, which are block-level elements, and images (or icons), which are in-line elements. For instance, the following sequence of sink events -```unknown +```java sink.figure( null ); sink.figureGraphics( "figure.png", null ); @@ -65,7 +65,7 @@ sink.figure_(); should output the equivalent of this html snippet: -```unknown +```xml <div class="figure"> <p><img src="figure.png"/></p> <p>Figure caption</p> @@ -76,7 +76,7 @@ while the `figureGraphics( ... );` event alone can be used to generate an in-lin **Note** that we are using the forms that take a `SinkEventAttributeSet` above, even though we are just passing in null values. The reason is that the alternative forms (without `SinkEventAttributeSet`) have a different behavior, which is kept for backward compatibility (but the methods have been deprecated). Using the same sequence of sink events as above, but omitting the `null` method parameters, will generate -```unknown +```xml <img src="figure.png" alt="Figure caption"/> ``` diff --git a/content/markdown/doxia/macros/index.md b/content/markdown/doxia/macros/index.md index 6f2fd03f..8ef30b54 100644 --- a/content/markdown/doxia/macros/index.md +++ b/content/markdown/doxia/macros/index.md @@ -32,13 +32,13 @@ Macros are supported by the APT, Xdoc, FML, XHTML and Markdown formats. A macro in an APT source file is a **non-indented** line that looks like this: -```unknown +```text %{macro_name|param1=value1|param2=value2|...} ``` An Xdoc or FML macro has the following syntax: -```unknown +```xml <macro name="macro_name"> <param name="param1" value="value1"/> <param name="param2" value="value2"/> @@ -48,7 +48,7 @@ An Xdoc or FML macro has the following syntax: Since Doxia 1\.7, an XHTML or Markdown macro has the following syntax: -```unknown +```xml <!-- MACRO{macro_name|param1=value1|param2=value2|...} --> ``` @@ -59,13 +59,13 @@ The following macros are available: The _Echo_ macro is a very simple macro: it prints out the key and value of any supplied parameters. For instance, in an APT file, you could write: -```unknown +```text %{echo|param1=value1|param2=value2} ``` Similarly, it will be for xdoc file: -```unknown +```xml <macro name="echo"> <param name="param1" value="value1"/> <param name="param2" value="value2"/> @@ -74,7 +74,7 @@ Similarly, it will be for xdoc file: and it will output -```unknown +```text param1 ---> value1 param2 ---> value2 ``` @@ -83,13 +83,13 @@ and it will output The _Snippet_ macro is a very useful macro: it prints out the content of a file or a URL. For instance, in an APT file, you could write: -```unknown +```text %{snippet|id=myid|url=http://myserver/path/to/file.txt} ``` In a xdoc file, it will be: -```unknown +```xml <macro name="snippet"> <param name="id" value="myid"/> <param name="url" value="http://myserver/path/to/file.txt"/> @@ -100,7 +100,7 @@ The `id` parameter is not required if you want to include the entire file. If yo - Start and end snippets in a Java file - ```unknown + ```java public class MyClass { // START SNIPPET: myid @@ -114,7 +114,7 @@ The `id` parameter is not required if you want to include the entire file. If yo - Start and end snippets in a XML file - ```unknown + ```xml <project> ... <build> @@ -140,7 +140,7 @@ The `id` parameter is not required if you want to include the entire file. If yo The _TOC_ macro prints a Table Of Content of a document. It is useful if you have several sections and subsections in your document. For instance, in an APT file, you could write: -```unknown +```text %{toc|section=2|fromDepth=2|toDepth=3} ``` @@ -150,7 +150,7 @@ This displays a TOC for the second section in the document, including all subsec In a xdoc file, it will be: -```unknown +```xml <macro name="toc"> <param name="section" value="2"/> <param name="fromDepth" value="0"/> @@ -166,7 +166,7 @@ In a xdoc file, it will be: From **Doxia 1\.1\.1** on you may also specify any of the html base attributes (_i.e._ any of `id`, `class`, `style`, `lang`, `title`) as parameters, e.g.: -```unknown +```text %{toc|class=myTOC} ``` diff --git a/content/markdown/doxia/overview.md b/content/markdown/doxia/overview.md index f7427940..76d169f7 100644 --- a/content/markdown/doxia/overview.md +++ b/content/markdown/doxia/overview.md @@ -38,7 +38,7 @@ The _Sink_ interface is a generic markup language interface. It contains several For instance, you could do things like: -```unknown +```java sink.paragraph(); sink.text( "my text" ); sink.paragraph_(); @@ -46,7 +46,7 @@ sink.paragraph_(); similar to this HTML markup: -```unknown +```xml <p>my text</p> ``` @@ -56,7 +56,7 @@ To find out more about the Sink API, you could read the Javadoc [here](http://ma The _Core_ is the API to parse a source and populate it in a _Sink_ object. The _Parser_ interface contains only one method: -```unknown +```java void parse( Reader source, Sink sink ) throws ParseException; ``` diff --git a/content/markdown/doxia/references/apt-format.md b/content/markdown/doxia/references/apt-format.md index fbdebdd6..6ff45364 100644 --- a/content/markdown/doxia/references/apt-format.md +++ b/content/markdown/doxia/references/apt-format.md @@ -53,7 +53,7 @@ A file contains a sequence of paragraphs and \`\`displays'' (non parag A paragraph is simply a sequence of consecutive text lines. -```unknown +```text First line of first paragraph. Second line of first paragraph. Third line of first paragraph. @@ -66,7 +66,7 @@ The indentation of the first line of a paragraph is the main method used by an A A \`\`plain'' paragraph must be indented by a certain amount of space. For example, a plain paragraph which is not contained in a list may be indented by two spaces. -```unknown +```text My section title (not indented). My paragraph first line (indented by 2 spaces). @@ -74,7 +74,7 @@ My section title (not indented). Indentation is not rigid. Any amount of space will do. You don't even need to use a consistent indentation all over your document. What really matters for an APT processor is whether the paragraph is not indented at all or, when inside a list, whether a paragraph is more or less indented than the first item of the list (more about this later). -```unknown +```text First paragraph has its first line indented by four spaces. Then the author did not even bother to indent the other lines of the paragraph. @@ -98,7 +98,7 @@ Note that tabs are expanded with a tab width set to 8\. A title is optional. If used, it must appear as the first block of the document. -```unknown +```text ------ Title ------ @@ -117,7 +117,7 @@ The author sub-block may optionally be followed by a date sub-block using the sa The following example is used for a document with an title and a date but with no declared author. -```unknown +```text ------ Title ------ @@ -140,7 +140,7 @@ where **YYYY** is the year in the Gregorian calendar, **MM** is the month of the Paragraphs other than the title block may appear before the first section. -```unknown +```text Paragraph 1, line 1. Paragraph 1, line 2. @@ -156,7 +156,7 @@ Paragraphs are indented. They have already been described in the [Document struc Sections are created by inserting section titles into the document. Simple documents need not contain sections. -```unknown +```text Section title * Sub-section title @@ -174,7 +174,7 @@ Section titles are not indented. A sub-section title begins with one asterisk (` <!--~~~~~~--> -```unknown +```text * List item 1. * List item 2. @@ -196,7 +196,7 @@ To nest a list inside a list, indent its first item more than its parent list. T Section titles always end a list. Displays cannot end a list but the `[]` pseudo-element may be used to force the end of a list. -```unknown +```text * List item 3. Force end of list: @@ -211,7 +211,7 @@ In the previous example, without the `[]`, the verbatim text (not indented as al A single `[]` may be used to end several nested lists at the same time. The indentation of `[]` may be used to specify exactly which lists should be ended. Example: -```unknown +```text * List item 1. * List item 2. @@ -229,7 +229,7 @@ Verbatim text contained in list item 2, but not in sub-list item 2 There are three kind of lists, the bulleted lists we have already described, the numbered lists and the definition lists. -```unknown +```text [[1]] Numbered item 1. [[A]] Numbered item A. @@ -256,7 +256,7 @@ A numbered list item begins with a label between two square brackets. The label The labels of the items other than the first one are ignored. It is recommended to take the time to type the correct label for each item in order to keep the APT source document readable. -```unknown +```text [Defined term 1] of definition list 2. [Defined term 2] of definition list 2. @@ -268,7 +268,7 @@ A definition list item begins with a defined term: text between square brackets. <!--~~~~~~~~~~~~~~~--> -```unknown +```text ---------------------------------------- Verbatim text, @@ -289,7 +289,7 @@ Like in HTML, verbatim text is preformatted. Unlike HTML, verbatim text is escap <!--~~~~~~~~--> -```unknown +```text [Figure name] Figure caption ``` @@ -313,7 +313,7 @@ The first line is not only used to recognize a table but also to specify column - the plus sign (`+`) specifies that column 2 is left aligned, - the colon (`:`) specifies that column 3 is right aligned. -```unknown +```text *----------*--------------+----------------: | Centered | Left-aligned | Right-aligned | | cell 1,1 | cell 1,2 | cell 1,3 | @@ -333,7 +333,7 @@ The last `|` is only used to make the table nicer. The first `|` is not only use The following example shows a simple table with no grid and no caption. -```unknown +```text *-----*------* cell | cell *-----*------* @@ -345,7 +345,7 @@ The following example shows a simple table with no grid and no caption. <!--~~~~~~~~~~~~~~~~~--> -```unknown +```text ===================== ``` @@ -355,7 +355,7 @@ A non indented line containing at least 3 equal signs (`===`). <!--~~~~~~~~~~~~--> -```unknown +```text ^L ``` @@ -368,7 +368,7 @@ A non indented line containing a single form feed character (Control-L). <!--~~~~~~--> -```unknown +```text <Italic> font. <<Bold>> font. <<<Monospaced>>> font. ``` @@ -382,7 +382,7 @@ It is not recommended to use font elements inside titles, section titles, links <!--~~~~~~~~~~~~~~~~~--> -```unknown +```text {Anchor}. Link to {{anchor}}. Link to {{http://www.pixware.fr}}. Link to {{{anchor}showing alternate text}}. Link to {{{http://www.pixware.fr}Pixware home page}}. @@ -404,7 +404,7 @@ Section titles are implicitly defined anchors. [\[Change\]](./doxia-apt.html#Anc <!--~~~~~~~~~~~~--> -```unknown +```text Force line\ break. ``` @@ -417,7 +417,7 @@ Line breaks must not be used inside titles and tables (which are line oriented b <!--~~~~~~~~~~~~~~~~~~~~--> -```unknown +```text Non\ breaking\ space. ``` @@ -427,7 +427,7 @@ A backslash character (`\`) followed by a space character. <!--~~~~~~~~~~~~~~~~~~~--> -```unknown +```text Escaped special characters: \~, \=, \-, \+, \*, \[, \], \<, \>, \{, \}, \\. ``` @@ -435,7 +435,7 @@ In certain contexts, these characters have a special meaning and therefore must Note that an asterisk, for example, needs to be escaped only if its begins a paragraph. (`*` has no special meaning in the middle of a paragraph.) -```unknown +```text Copyright symbol: \251, \xA9, \u00a9. ``` @@ -447,7 +447,7 @@ Unicode characters may be specified by their codes using the `\u`_NNNN_ notation <!--~~~~~~~~~--> -```unknown +```text ~~Commented out. ``` diff --git a/content/markdown/doxia/references/doxia-apt.md b/content/markdown/doxia/references/doxia-apt.md index 8d0af034..10a58bee 100644 --- a/content/markdown/doxia/references/doxia-apt.md +++ b/content/markdown/doxia/references/doxia-apt.md @@ -38,19 +38,19 @@ In the following we provide a list of differences/enhancements to the original [ Contrary to the original APT parser, the Doxia APT parser does not put list items within paragraphs. Eg, the example given in the APT guide: -```unknown +```text * List item 1. ``` will, for instance, produce the following html: -```unknown +```xml <li>List item 1.</li> ``` To get the same result as aptconvert, use -```unknown +```text * List item 1. @@ -58,7 +58,7 @@ To get the same result as aptconvert, use which will produce: -```unknown +```xml <li><p>List item 1.</p></li> ``` @@ -68,7 +68,7 @@ which will produce: Header cells are defined by an additional pipe character '|' at the beginning of the cell: -```unknown +```text *-----------+-----------+ || Header 1 || Header 2 | *-----------+-----------+ @@ -87,7 +87,7 @@ produces: Since 1\.1, multi-lines cells are recognized with the character '\\' at the end of the cells: -```unknown +```text *-----------+-----------+ || Header 1 || Header 2 | *-----------+-----------+ @@ -109,7 +109,7 @@ produces: When a document is rendered as part of a Maven site, Doxia gives every section title an anchor of its own, built from the title text by the rules below. Because that name follows the wording, rewording a title moves the anchor and breaks links aimed at it. Define the anchor explicitly where a reference has to hold: -```unknown +```text * {Anchors for section titles} ``` @@ -175,7 +175,7 @@ Since Doxia 1\.4 there is support for literal anchors, by using 2 hashed (\#\#) Contrary to the original APT format, a figure name has to be given fully **with** extension. For instance: -```unknown +```text [/home/joe/docs/mylogo.jpeg] Figure caption ``` diff --git a/content/markdown/doxia/references/fml-format.md b/content/markdown/doxia/references/fml-format.md index c78fb1ce..efc6b594 100644 --- a/content/markdown/doxia/references/fml-format.md +++ b/content/markdown/doxia/references/fml-format.md @@ -37,7 +37,7 @@ Below the root element `faqs` there are one or more `part` elements. Each `part` The following is a sample FML document: -```unknown +```xml <?xml version="1.0" encoding="UTF-8"?> <faqs xmlns="http://maven.apache.org/FML/1.0.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" diff --git a/content/markdown/doxia/references/index.md b/content/markdown/doxia/references/index.md index 6a9efad2..bbef98ef 100644 --- a/content/markdown/doxia/references/index.md +++ b/content/markdown/doxia/references/index.md @@ -48,7 +48,7 @@ Note some modules are not included per default with the site plugin. Have a look If you need to add module for the `maven-site-plugin` simply add it as a dependency of the plugin: -```unknown +```xml <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-site-plugin</artifactId> diff --git a/content/markdown/doxia/references/xdoc-format.md b/content/markdown/doxia/references/xdoc-format.md index bd3ff3c7..e07afe94 100644 --- a/content/markdown/doxia/references/xdoc-format.md +++ b/content/markdown/doxia/references/xdoc-format.md @@ -48,7 +48,7 @@ The full documentation is available in the annotated [xdoc-2.0.xsd](https://mave The following is a sample XDoc document: -```unknown +```xml <?xml version="1.0" encoding="UTF-8"?> <document xmlns="http://maven.apache.org/XDOC/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" @@ -99,7 +99,7 @@ code line 2 `<source>` tags are special. Anything within this tag is rendered within a "verbatim box" as pre-formatted text. If you are embedding other XML/XHTML markup within the source tags, then you need to place a CDATA section within the source section. Example: -```unknown +```xml <source><![CDATA[ content here <a href="">foo</a>]]></source> ``` @@ -108,7 +108,7 @@ code line 2 Since Doxia 2\.0, `<section>` and `<subsection>` elements produce `<h1>` and `<h2>` headings respectively; before 2\.0 they started at `<h2>`. It is therefore perfectly valid to put some sub-headings (`<h3>` to `<h6>`) inside a subsection. For instance, -```unknown +```xml <h3>A subsubsection</h3> ``` @@ -123,7 +123,7 @@ When a document is rendered as part of a Maven site, Doxia creates an anchor for For a reference that has to survive editing, name the anchor yourself. Either provide an explicit anchor: -```unknown +```xml <a name="Section1"/> <section name="Section"> @@ -136,7 +136,7 @@ For a reference that has to survive editing, name the anchor yourself. Either pr or use an `id` attribute for section and subsections (note that `id`'s have to be unique within one xdoc source document): -```unknown +```xml <section name="Section" id="Section1"> <subsection name="SubSection" id="SubSection1"> @@ -160,7 +160,7 @@ Here is a list of common mistakes to be aware of: Wrong: -```unknown +```xml <p> Here's a list: <ul> @@ -173,7 +173,7 @@ Wrong: Correct: -```unknown +```xml <p> Here's a list: </p> @@ -193,7 +193,7 @@ Typical block level elements are list elements, `<table>`, `<source>`, `<div>`, Wrong: -```unknown +```xml <section name="Downloads"> <a href="downloads.html">Downloads</a> </section> @@ -201,7 +201,7 @@ Wrong: Correct: -```unknown +```xml <section name="Downloads"> <p> <a href="downloads.html">Downloads</a> @@ -221,7 +221,7 @@ The `<title>` element has to come before `<author>`. Wrong: -```unknown +```xml <p> The following command executes the program: <source>java -jar CoolApp.jar</source> @@ -230,7 +230,7 @@ Wrong: Correct: -```unknown +```xml <p> The following command executes the program: </p> diff --git a/content/markdown/guides/development/guide-plugin-documentation.md.vm b/content/markdown/guides/development/guide-plugin-documentation.md.vm index e7bd7e8e..c2c884d1 100644 --- a/content/markdown/guides/development/guide-plugin-documentation.md.vm +++ b/content/markdown/guides/development/guide-plugin-documentation.md.vm @@ -89,7 +89,7 @@ The [Maven Plugin Report Plugin](/plugin-tools/maven-plugin-report-plugin/) is r It needs to be added to the `<reporting>` section, unless it is already inherited from a parent POM: -```unknown +```xml <project> [...] <reporting> @@ -109,7 +109,7 @@ The comments, annotations and plugin goals parameter names are extracted from th - All `@Parameter` fields should have a descriptive comment, informative enough that a regular user can understand. - ```unknown + ```java [...] /** * Put something informative here that a regular user can understand. @@ -121,7 +121,7 @@ The comments, annotations and plugin goals parameter names are extracted from th - If a parameter is not just a simple Java type or a list of simple types, but a specific additional class, give a sample XML snippet showing the structure of objects that can be configured. - ```unknown + ```java [...] /** * A complex configuration @@ -143,7 +143,7 @@ The comments, annotations and plugin goals parameter names are extracted from th - The class level comment should explain what the goal does. - ```unknown + ```java [...] /** * Everything here will show up on the top of the generated plugin info page. @@ -173,7 +173,7 @@ You must define a [skin](../../skins/) if you are using a site descriptor. No de Below is the suggested site descriptor template (with maven-fluido-skin). -```unknown +```xml <?xml version="1.0" encoding="UTF-8"?> <project> <skin> @@ -270,7 +270,7 @@ Below is the suggested site descriptor template (with maven-fluido-skin). A well documented project always collates frequently asked questions which are usually located in `src/site/fml/faq.fml`. The example below provides a template for your FAQ: - ```unknown + ```xml <?xml version="1.0" encoding="UTF-8"?> <faqs id="FAQ" title="Frequently Asked Questions"> <part id="General"> @@ -306,7 +306,7 @@ There are 2 recommended report plugins to enhance the plugin documentation, Java To enable javadoc for your plugin add the following to your `pom.xml` - ```unknown + ```xml <project> [...] <build> @@ -339,7 +339,7 @@ There are 2 recommended report plugins to enhance the plugin documentation, Java To enable source code cross-references, add the following to your `pom.xml` - ```unknown + ```xml <project> [...] <build> diff --git a/content/markdown/guides/introduction/introduction-to-plugin-prefix-mapping.md.vm b/content/markdown/guides/introduction/introduction-to-plugin-prefix-mapping.md.vm index a6fc7c50..ba37e416 100644 --- a/content/markdown/guides/introduction/introduction-to-plugin-prefix-mapping.md.vm +++ b/content/markdown/guides/introduction/introduction-to-plugin-prefix-mapping.md.vm @@ -42,7 +42,7 @@ In order to give users a convenient prefix with which to reference your plugin a If your plugin's artifactId fits this pattern, Maven will automatically map your plugin to the correct prefix in the metadata stored within your plugin's groupId path on the repository. However, if you want to customize the prefix used to reference your plugin, you can specify the prefix directly through a configuration parameter on the `maven-plugin-plugin` in your plugin's POM: -```unknown +```xml <project> ... <build> @@ -86,7 +86,7 @@ By default, Maven will search the groupId **org.apache.maven.plugins** for prefi As it turns out, this is simple. In the Maven settings file (per-user: `${esc.d}{user.home}/.m2/settings.xml`; global: `${esc.d}{maven.home}/conf/settings.xml`), you can provide a custom **pluginGroups** section, listing the plugin groupIds you want to search (each groupId goes in its own **pluginGroup** sub-element). For example, if my project uses a Modello model file, I might have the following in my settings: -```unknown +```xml <pluginGroups> <pluginGroup>org.codehaus.modello</pluginGroup> </pluginGroups> diff --git a/content/markdown/guides/plugin/guide-java-plugin-development.md.vm b/content/markdown/guides/plugin/guide-java-plugin-development.md.vm index f4387bb8..3b1f1bd9 100644 --- a/content/markdown/guides/plugin/guide-java-plugin-development.md.vm +++ b/content/markdown/guides/plugin/guide-java-plugin-development.md.vm @@ -56,7 +56,7 @@ At its simplest, a Java mojo consists simply of a single class representing one Listed below is a simple mojo class which has no parameters. This is about as simple as a mojo can be. After the listing is a description of the various parts of the source. -```unknown +```java package sample.plugin; import org.apache.maven.plugin.AbstractMojo; @@ -99,7 +99,7 @@ Once the mojos have been written for the plugin, it is time to build the plugin. Listed below is an illustration of the sample mojo project's pom with the parameters set as described in the above table: -```unknown +```xml <project> <modelVersion>4.0.0</modelVersion> @@ -184,7 +184,7 @@ For more details, you can look at [ detailed bindings for `maven-plugin` packagi The most direct means of executing your new plugin is to specify the plugin goal directly on the command line. To do this, configure the `hello-maven-plugin` plugin in the project: -```unknown +```xml <project> ... <build> @@ -220,7 +220,7 @@ There are several ways to reduce the amount of required typing: - You can assign a shortened prefix to your plugin, such as `mvn hello:sayhi`. This is done automatically if you follow the convention of using `${esc.d}{prefix}-maven-plugin` (or `maven-${esc.d}{prefix}-plugin` if the plugin is part of the Apache Maven project). You may also assign one through additional configuration. For more information, see [ Introduction to Plugin Prefix Mapping](../introduction/introduction-to-plugin-prefix-mapping.html). - Finally, you can also add your plugin's group ID to the list of group IDs searched by default. To do this, add the following to your `${esc.d}{user.home}/.m2/settings.xml` file: - ```unknown + ```xml <pluginGroups> <pluginGroup>sample.plugin</pluginGroup> </pluginGroups> @@ -232,7 +232,7 @@ At this point, you can run the mojo with "`mvn hello:sayhi`". You can also configure the plugin to attach specific goals to a particular phase of the build lifecycle. Here is an example: -```unknown +```xml <build> <pluginManagement> <plugins> @@ -286,7 +286,7 @@ It is unlikely that a mojo will be very useful without parameters. Parameters pr Defining a parameter is as simple as creating an instance variable in the mojo and adding the proper annotations. Listed below is an example of a parameter for the simple mojo: -```unknown +```java /** * The greeting to display. */ @@ -300,7 +300,7 @@ The Javadoc comment is the description of the parameter. The `@Parameter` annota Each Maven project can configure the plugins it uses in the `pluginManagement` section of the pom.xml. For example: -```unknown +```xml <plugin> <groupId>sample.plugin</groupId> <artifactId>hello-maven-plugin</artifactId> @@ -322,7 +322,7 @@ You are not restricted to using private field mapping which is helpful if you ar So the Mojo would look like the following: -```unknown +```java public class MyQueryMojo extends AbstractMojo { diff --git a/content/markdown/guides/plugin/guide-java-report-plugin-development.md.vm b/content/markdown/guides/plugin/guide-java-report-plugin-development.md.vm index 84ef8776..c55160e2 100644 --- a/content/markdown/guides/plugin/guide-java-report-plugin-development.md.vm +++ b/content/markdown/guides/plugin/guide-java-report-plugin-development.md.vm @@ -40,7 +40,7 @@ How It Works 1. A regular Maven project usually invokes _reporting goals_ of a plugin by declaring such plugin in the [`<reporting>`](/plugins/maven-site-plugin/examples/configuring-reports.html) section of its `pom.xml` as in the example below: - ```unknown + ```xml <project> ... <reporting> @@ -101,7 +101,7 @@ The below examples can be copied and pasted as a template. #[[### ./pom.xml]]# -```unknown +```xml <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> @@ -201,7 +201,7 @@ The below examples can be copied and pasted as a template. #[[### ./src/main/java/com/mycompany/maven/SimpleReport.java]]# -```unknown +```java package com.mycompany.maven; import java.util.Locale; @@ -350,7 +350,7 @@ simple:simple To invoke the _report Mojo_ of our plugin in another Maven project, we just need to declare the plugin in the [`<reporting>`](/plugins/maven-site-plugin/examples/configuring-reports.html) section of its `pom.xml` as in the example below: -```unknown +```xml <project> ... <reporting> @@ -377,7 +377,7 @@ In your `executeReport()` method, you will leverage the [Doxia Sink API](/doxia/ You will use the [`Sink`](/doxia/doxia/doxia-sink-api/apidocs/org/apache/maven/doxia/sink/Sink.html) object associated to the report: -```unknown +```java Sink sink = getSink(); ``` @@ -407,7 +407,7 @@ The Doxia Sink API allows you to specify [_SinkEventAttributes_](/doxia/doxia/do You may need to create not just one HTML file, but several of them (like Javadoc produces one HTML file for each Java class). To do so, you will need to get a new _Sink_ for each HTML file you need to produce. This is achieved by using the [`SinkFactory`](/doxia/doxia/doxia-sink-api/apidocs/org/apache/maven/doxia/sink/SinkFactory.html) object that you can easily obtain with the [`getSinkFactory()`](/shared/maven-reporting-impl/apidocs/org/apache/maven/reporting/AbstractMavenReport.html#g [...] -```unknown +```java public class SimpleReport extends AbstractMavenReport { ...
