robotframework:libdoc

Full name:

org.robotframework:robotframework-maven-plugin:2.1.0:libdoc

Description:

Create documentation of test libraries or resource files using the Robot Framework libdoc tool. Uses the libdoc bundled in Robot Framework jar distribution. For more help see libdoc documentation.

Attributes:

  • Requires a Maven project to be executed.
  • Requires dependency resolution of artifacts in scope: test.

Required Parameters

Name Type Since Description
<libdoc> LibDocConfiguration - Library documentation configuration. Required settings:
  • outputFile The name for the output file. Documentation output format is deduced from the file extension. We also support patterns like *.html, which indicates to derive the output name from the original name.
  • libraryOrResourceFile Name or path of the documented library or resource file. Supports ant-like pattern format to match multiple inputs, such as src/java/**/*.java Name must be in the same format as when used in Robot Framework test data, for example BuiltIn or com.acme.FooLibrary. When name is used, the library is imported the same as when running the tests. Use extraPathDirectories to set PYTHONPATH/CLASSPATH accordingly. Paths are considered relative to the location of pom.xml and must point to a valid Python/Java source file or a resource file. For example src/main/python/test/ExampleLib.py Note that you should preferably import java classes by classname, not path. Dynamic libraries will not be compiled correctly with path.
Optional settings:
  • outputDirectory Specifies the directory where documentation files are written. Considered relative to the ${basedir} of the project, but also supports absolute paths. Defaults to ${project.build.directory}/robotframework/libdoc
  • name Sets the name of the documented library or resource.
  • version Sets the version of the documented library or resource.
  • extraPathDirectories A directory to be added to the PYTHONPATH/CLASSPATH when creating documentation. e.g. src/main/java/com/test/
Example 1:
<libdoc>
     <outputFile>MyLib.html</outputFile>
     <libraryOrResourceFile>com.mylib.MyLib</libraryOrResourceFile>
</libdoc>
Example 2:
<libdoc>
     <outputFile>*.html</outputFile>
     <libraryOrResourceFile>src/java/**/*Lib.java</libraryOrResourceFile>
</libdoc>
Example 3:
<libdoc>
     <outputFile>*.html</outputFile>
     <libraryOrResourceFile>com.**.*Lib</libraryOrResourceFile>
</libdoc>

Optional Parameters

Name Type Since Description
<externalRunner> ExternalRunnerConfiguration -

Test are executed in a new process if this configuration is used.

The classpath for the new process will include by default all the test scope dependencies from the pom.

  • Environment variables can be added with environmentVariables map. CLASSPATH environment variable is added (prepended) to the default dependencies.
  • excludeDependencies can be used to exclude the test scope dependencies from the classpath of the new process.
  • jvmArgs can be used to specify JVM options
  • runnerClass can be used to specify runner class
  • runWithPython can be used to specify running with Python Robot Framework
Example:

<externalRunner>
     <environmentVariables>
         <foo>bar</foo>
         <CLASSPATH>this-should-be-seen-by-external-process.jar</CLASSPATH>
     </environmentVariables>
     <jvmArgs>
         <jvmArg>-XX:PermSize=128m</jvmArg>
         <jvmArg>-XX:MaxPermSize=256m</jvmArg>
         <jvmArg>-Xmx512m</jvmArg>
     </jvmArgs>
     <excludeDependencies>true</excludeDependencies>
     <runnerClass>org.robotframework.RobotFramework</runnerClass>
     <runWithPython>false</runWithPython>
</externalRunner>

Parameter Details

<externalRunner>

Test are executed in a new process if this configuration is used.

The classpath for the new process will include by default all the test scope dependencies from the pom.

  • Environment variables can be added with environmentVariables map. CLASSPATH environment variable is added (prepended) to the default dependencies.
  • excludeDependencies can be used to exclude the test scope dependencies from the classpath of the new process.
  • jvmArgs can be used to specify JVM options
  • runnerClass can be used to specify runner class
  • runWithPython can be used to specify running with Python Robot Framework
Example:

<externalRunner>
     <environmentVariables>
         <foo>bar</foo>
         <CLASSPATH>this-should-be-seen-by-external-process.jar</CLASSPATH>
     </environmentVariables>
     <jvmArgs>
         <jvmArg>-XX:PermSize=128m</jvmArg>
         <jvmArg>-XX:MaxPermSize=256m</jvmArg>
         <jvmArg>-Xmx512m</jvmArg>
     </jvmArgs>
     <excludeDependencies>true</excludeDependencies>
     <runnerClass>org.robotframework.RobotFramework</runnerClass>
     <runWithPython>false</runWithPython>
</externalRunner>
  • Type: org.robotframework.mavenplugin.ExternalRunnerConfiguration
  • Required: No

<libdoc>

Library documentation configuration. Required settings:
  • outputFile The name for the output file. Documentation output format is deduced from the file extension. We also support patterns like *.html, which indicates to derive the output name from the original name.
  • libraryOrResourceFile Name or path of the documented library or resource file. Supports ant-like pattern format to match multiple inputs, such as src/java/**/*.java Name must be in the same format as when used in Robot Framework test data, for example BuiltIn or com.acme.FooLibrary. When name is used, the library is imported the same as when running the tests. Use extraPathDirectories to set PYTHONPATH/CLASSPATH accordingly. Paths are considered relative to the location of pom.xml and must point to a valid Python/Java source file or a resource file. For example src/main/python/test/ExampleLib.py Note that you should preferably import java classes by classname, not path. Dynamic libraries will not be compiled correctly with path.
Optional settings:
  • outputDirectory Specifies the directory where documentation files are written. Considered relative to the ${basedir} of the project, but also supports absolute paths. Defaults to ${project.build.directory}/robotframework/libdoc
  • name Sets the name of the documented library or resource.
  • version Sets the version of the documented library or resource.
  • extraPathDirectories A directory to be added to the PYTHONPATH/CLASSPATH when creating documentation. e.g. src/main/java/com/test/
Example 1:
<libdoc>
     <outputFile>MyLib.html</outputFile>
     <libraryOrResourceFile>com.mylib.MyLib</libraryOrResourceFile>
</libdoc>
Example 2:
<libdoc>
     <outputFile>*.html</outputFile>
     <libraryOrResourceFile>src/java/**/*Lib.java</libraryOrResourceFile>
</libdoc>
Example 3:
<libdoc>
     <outputFile>*.html</outputFile>
     <libraryOrResourceFile>com.**.*Lib</libraryOrResourceFile>
</libdoc>
  • Type: org.robotframework.mavenplugin.LibDocConfiguration
  • Required: Yes