linkcheck:linkcheck

Note:This goal should be used as a Maven report.

Full name:

org.apache.maven.plugins:maven-linkcheck-plugin:1.2:linkcheck

Description:

Generates a Linkcheck report.

Attributes:

  • Requires a Maven project to be executed.
  • Since version: 1.0.

Required Parameters

Name Type Since Description
httpMethod String 1.0 The HTTP method to use. Currently supported are "GET" and "HEAD".
HTTP GET
The HTTP GET method is defined in section 9.3 of RFC2616: The GET method means retrieve whatever information (in the form of an entity) is identified by the Request-URI.
HTTP HEAD
The HTTP HEAD method is defined in section 9.4 of RFC2616: The HEAD method is identical to GET except that the server MUST NOT return a message-body in the response.

Default value is: head.
linkcheckCache File 1.0 The location of the Linkcheck cache file.
Default value is: ${project.build.directory}/linkcheck/linkcheck.cache.
linkcheckOutput File 1.0 The location of the Linkcheck report file.
Default value is: ${project.build.directory}/linkcheck/linkcheck.xml.
offline boolean 1.0 Whether we are offline or not.
Default value is: ${settings.offline}.
User property is: linkcheck.offline.

Optional Parameters

Name Type Since Description
baseURL String 1.0 The base URL to use for absolute links (eg /index.html) in the site.
Default value is: ${project.url}.
User property is: linkcheck.baseURL.
encoding String 1.0 The file encoding to use when Linkcheck reads the source files. If the property project.build.sourceEncoding is not set, the platform default encoding is used.
Default value is: ${project.build.sourceEncoding}.
User property is: encoding.
excludedHttpStatusErrors Integer[] 1.0 The list of HTTP errors to ignored, like 404.
excludedHttpStatusWarnings Integer[] 1.0 The list of HTTP warnings to ignored, like 301.
excludedLinks String[] 1.0 The list of links to exclude.
Note: Patterns like **/dummy/* are allowed for excludedLink.
excludedPages String[] 1.0 A list of pages to exclude.
Note:
  • This report, i.e. linkcheck.html, is always excluded.
  • May contain Ant-style wildcards and double wildcards, e.g. apidocs/**, etc.

forceSite boolean 1.0 true to force the site generation, false otherwise. Using this parameter ensures that all documents have been correctly generated.
Default value is: true.
User property is: linkcheck.forceSite.
httpClientParameters Properties 1.0 The extra HttpClient parameters to be used when fetching links. For instance:
<httpClientParameters>
 <property>
  <name>http.protocol.max-redirects</name>
  <value>10</value>
 </property>
</httpClientParameters>
See HttpClient preference page
User property is: httpClientParameters.
httpFollowRedirect boolean 1.0 If online, the HTTP method should automatically follow HTTP redirects, false otherwise.
Default value is: true.
skip boolean 1.0 true to skip the report execution, false otherwise. The purpose is to prevent infinite call when forceSite is enable.
Default value is: false.
User property is: linkcheck.skip.
timeout int 1.0 Set the timeout to be used when fetching links. A value of zero means the timeout is not used.
Default value is: 2000.
User property is: timeout.

Parameter Details

baseURL:

The base URL to use for absolute links (eg /index.html) in the site.
  • Type: java.lang.String
  • Since: 1.0
  • Required: No
  • User Property: linkcheck.baseURL
  • Default: ${project.url}

encoding:

The file encoding to use when Linkcheck reads the source files. If the property project.build.sourceEncoding is not set, the platform default encoding is used.
  • Type: java.lang.String
  • Since: 1.0
  • Required: No
  • User Property: encoding
  • Default: ${project.build.sourceEncoding}

excludedHttpStatusErrors:

The list of HTTP errors to ignored, like 404.
  • Type: java.lang.Integer[]
  • Since: 1.0
  • Required: No

excludedHttpStatusWarnings:

The list of HTTP warnings to ignored, like 301.
  • Type: java.lang.Integer[]
  • Since: 1.0
  • Required: No

excludedLinks:

The list of links to exclude.
Note: Patterns like **/dummy/* are allowed for excludedLink.
  • Type: java.lang.String[]
  • Since: 1.0
  • Required: No

excludedPages:

A list of pages to exclude.
Note:
  • This report, i.e. linkcheck.html, is always excluded.
  • May contain Ant-style wildcards and double wildcards, e.g. apidocs/**, etc.
  • Type: java.lang.String[]
  • Since: 1.0
  • Required: No

forceSite:

true to force the site generation, false otherwise. Using this parameter ensures that all documents have been correctly generated.
  • Type: boolean
  • Since: 1.0
  • Required: No
  • User Property: linkcheck.forceSite
  • Default: true

httpClientParameters:

The extra HttpClient parameters to be used when fetching links. For instance:
<httpClientParameters>
 <property>
  <name>http.protocol.max-redirects</name>
  <value>10</value>
 </property>
</httpClientParameters>
See HttpClient preference page
  • Type: java.util.Properties
  • Since: 1.0
  • Required: No
  • User Property: httpClientParameters

httpFollowRedirect:

If online, the HTTP method should automatically follow HTTP redirects, false otherwise.
  • Type: boolean
  • Since: 1.0
  • Required: No
  • Default: true

httpMethod:

The HTTP method to use. Currently supported are "GET" and "HEAD".
HTTP GET
The HTTP GET method is defined in section 9.3 of RFC2616: The GET method means retrieve whatever information (in the form of an entity) is identified by the Request-URI.
HTTP HEAD
The HTTP HEAD method is defined in section 9.4 of RFC2616: The HEAD method is identical to GET except that the server MUST NOT return a message-body in the response.
  • Type: java.lang.String
  • Since: 1.0
  • Required: Yes
  • Default: head

linkcheckCache:

The location of the Linkcheck cache file.
  • Type: java.io.File
  • Since: 1.0
  • Required: Yes
  • Default: ${project.build.directory}/linkcheck/linkcheck.cache

linkcheckOutput:

The location of the Linkcheck report file.
  • Type: java.io.File
  • Since: 1.0
  • Required: Yes
  • Default: ${project.build.directory}/linkcheck/linkcheck.xml

offline:

Whether we are offline or not.
  • Type: boolean
  • Since: 1.0
  • Required: Yes
  • User Property: linkcheck.offline
  • Default: ${settings.offline}

skip:

true to skip the report execution, false otherwise. The purpose is to prevent infinite call when forceSite is enable.
  • Type: boolean
  • Since: 1.0
  • Required: No
  • User Property: linkcheck.skip
  • Default: false

timeout:

Set the timeout to be used when fetching links. A value of zero means the timeout is not used.
  • Type: int
  • Since: 1.0
  • Required: No
  • User Property: timeout
  • Default: 2000