build-helper:fix-site-anchors

Full name:

com.github.robtimus:build-helper-maven-plugin:2.0:fix-site-anchors

Description:

Fixes anchors in URLs in site files.

If a Markdown file contains a link to a method's Javadoc, in modern Java versions this link contains ( and ). Even if these are escaped, the site plugin replaces these with .28 and .29 respectively. This mojo can be used to fix these incorrect replacements.

Attributes:

  • Requires a Maven project to be executed.
  • The goal is thread-safe and supports parallel builds.
  • Since version: 2.0.
  • Binds by default to the lifecycle phase: site.

Required Parameters

Name Type Since Description
<files> File[] 2.0 The files to replace anchors in.

Optional Parameters

Name Type Since Description
<encoding> String 2.0 The encoding to use for reading and writing site files.
Default: ${project.build.sourceEncoding}
<replacements> FixSiteAnchorsMojo$Replacement[] 2.0 The replacements to make. If not specified this is equal to the following:

<replacements>
  <replacement>
    <search>.28</search>
    <replace>(</replace>
  </replacement>
  <replacement>
    <search>.29</search>
    <replace>)</replace>
  </replacement>
  <replacement>
    <search>.25</search>
    <replace>%</replace>
  </replacement>
</replacements>

Parameter Details

<encoding>

The encoding to use for reading and writing site files.
  • Type: java.lang.String
  • Since: 2.0
  • Required: No
  • Default: ${project.build.sourceEncoding}

<files>

The files to replace anchors in.
  • Type: java.io.File[]
  • Since: 2.0
  • Required: Yes

<replacements>

The replacements to make. If not specified this is equal to the following:

<replacements>
  <replacement>
    <search>.28</search>
    <replace>(</replace>
  </replacement>
  <replacement>
    <search>.29</search>
    <replace>)</replace>
  </replacement>
  <replacement>
    <search>.25</search>
    <replace>%</replace>
  </replacement>
</replacements>
  • Type: com.github.robtimus.maven.plugins.buildhelper.FixSiteAnchorsMojo$Replacement[]
  • Since: 2.0
  • Required: No