You can use the Maven archetypes to develop a plug-in.

Procedure

  1. Run the following command in the command line of your machine.
    mvn archetype:generate -Dfilter="com.vmware.o11n:"
    With this command, Maven generates a project by using the archetype catalog on your local machine and the archetypes that are installed by the Automation Orchestrator Plug-in SDK script. The command is interactive and requires specifying several parameters.
    1. Select the numeric option that corresponds to the model-driven archetype.
      Choose archetype: 
      1: local -> com.vmware.o11n:o11n-plugin-archetype-modeldriven (o11n-plugin-archetype-modeldriven)
      2: local -> com.vmware.o11n:o11n-package-archetype (o11n-package-archetype) 
      Choose a number or apply filter (format: [groupId:]artifactId, case sensitive contains): : 1 
    2. Enter the group ID according to the naming convention that your company uses. For more information, see the Guide to naming conventions on groupId, artifactId and version in the official Maven documentation.
      Define value for property 'groupId': : com.vmware.o11n.plugin 
      [INFO] Using property: groupId = com.vmware.o11n.plugin 
    3. Enter the artifactId that corresponds to the developed integration. In this example – Redis.
      Define value for property 'artifactId': : redis 
      [INFO] Using property: artifactId = redis  
    4. Enter a name for the package.
      The package name must correspond to the groupId value and must be compliant with the Java packages naming convention. For more information, see Naming a Package in the official Java documentation.
      Define value for property 'package':  com.vmware.o11n.plugin: : com.vmware.o11n.plugin.redis 
      [INFO] Using property: package = com.vmware.o11n.plugin.redis 
    5. Enter name and alias of the plug-in.
      Define value for property 'pluginAlias': : Redis 
      Define value for property 'pluginName': : Redis 
      The alias must not contain spaces because it is used as a prefix for the scripting objects. The archetype also uses the alias to prefix the adapter and the factory of the plug-in.
      Note: If the prefix contains spaces or invalid characters, Java classes with invalid names might be generated and the plug-in might not compile successfully.
      When you output all parameters, you are prompted to confirm the information.
      Confirm properties configuration: 
      groupId: com.vmware.o11n.plugin 
      artifactId: redis 
      version: 1.0.0-SNAPSHOT 
      package: com.vmware.o11n.plugin.redis 
      pluginAlias: Redis 
      pluginName: Redis 
      vcoVersion: 8.8.1
      sdkVersion: 10.0.0
      Note: With Automation Orchestrator Plug-in SDK 10.0.0 and later, the plug-ins depend only on the SDK. The property vcoVersion is set to 8.8.1 because the SDK itself depends on the model for this Automation Orchestrator version.
  2. Navigate to the project directory and verify that the directory structure is similar to the following example.
    drwxr-xr-x   9 username  staff   306 Feb  7 11:08 . 
    drwxr-xr-x  46 username  staff  1564 Feb  6 10:34 .. 
    drwxr-xr-x   4 username  staff   136 Feb  7 11:08 o11nplugin-redis 
    drwxr-xr-x   4 username  staff   136 Feb  7 11:08 o11nplugin-redis-core 
    drwxr-xr-x   4 username  staff   136 Feb  7 11:08 o11nplugin-redis-custom 
    drwxr-xr-x   3 username  staff   102 Feb  7 11:08 o11nplugin-redis-gen 
    drwxr-xr-x   6 username  staff   204 Feb  7 11:08 o11nplugin-redis-package 
    -rw-r--r--   1 username  staff  2519 Feb  7 11:08 pom.xml
  3. Run the following command to build the plug-in.
    mvn clean install
    If the build is successful, the console displays the [INFO] BUILD SUCCESS message.
  4. Verify the following.
    1. The PluginFactory class must match your factory, namely RedisPluginFactory.
    2. The redis_gen directory that contains the runtime-config.properties file must match the folder of your plug-in project.

What to do next

Deploy the plug-in to the Automation Orchestrator server. See Deploy a Plug-In.