Annotation Interface ExternalLib


Specifies that the annotated element depends on a library which is not packaged with the extension.

This annotation is intended to be used in classes which represent the extension, a configuration or a connection provider.

When the dependency is needed extension wide, then this annotation should be used at the extension level. If it's only needed when using a particular configuration, then it should be used at the config level. Finally, if it's needed only for establishing connections, then it should be used on a connection provider. Notice that you can have a mix of any of these options, since an extension can depend on many external libraries in different places. An example would be the Database connector, which has different ConnectionProvider for connecting to different types of databases, each one requiring a different JDBC driver.

This annotation is repeatable, which means that any annotated component can depend on many external libraries.

Since:
1.0
  • Element Details

    • description

      String description
      Returns:
      The library's description
      Default:
      ""
    • nameRegexpMatcher

      String nameRegexpMatcher
      Returns:
      A regexp to match the name of the library's file.
      Default:
      ""
    • requiredClassName

      String requiredClassName
      Returns:
      If provided, the library should contain a class of the given name
      Default:
      ""
    • coordinates

      String coordinates
      If provided, suggests Maven coordinates where the required library can be found. This coordinates should follow the Maven convention: groupId:artifactId:packaging:classifier:version.

      Keep in mind that not all the values of the coordinates are required, for example: org.mule.modules:a-required-lib:1.0.0 are valid coordinates, which communicates the groupId, artifactId and version of the external library.

      By default, the packaging is jar, so if is required to use a native library, like a .DLL, you will provide: org.mule.module:a-native-lib:dll:1.0.0 where dll is the packaging of the library.

      More information in: https://maven.apache.org/pom.html#Maven_Coordinates

      Returns:
      The optional maven coordinates.
      Default:
      ""
    • optional

      boolean optional
      Returns:
      Indicates whether the library is not required for the basic functioning of the extension.
      Default:
      false