Deployment

Option 1: Reference Scripts in an External JAR File

Step1: Add Maven Build target (pom.xml)

Ensure that the following maven build configuration is in your pom.xml file.

<packaging>jarpackaging>
<build>
      <defaultGoal>packagedefaultGoal>
      <pluginManagement>
             <plugins>
                    <plugin>
                           <artifactId>maven-compiler-pluginartifactId>

                           <version>3.1version>
                           <configuration>
                                  <compilerId>groovy-eclipse-compilercompilerId>
                           configuration>
                           <dependencies>
                                  <dependency>
                                          <groupId>org.codehaus.groovygroupId>
                                          <artifactId>groovy-eclipse-compilerartifactId>
                                          <version>2.9.1-01version>
                                  dependency>

                                  <dependency>
                                          <groupId>org.codehaus.groovygroupId>
                                          <artifactId>groovy-eclipse-batchartifactId>
                                          <version>2.3.7-01version>
                                   dependency>
                             dependencies>
                      plugin>
              plugins>
  pluginManagement>
build>

You can then run the maven package command ( mvn package) from the command line, or use your IDE to run the build and generate an external JAR file:

Step 2: Configure Flex Scripting Action

The following steps outline the configuration for Ooyala Flex to execute custom scripts in an external JAR file:

  1. Upload a JAR file containing the above class, to a shared storage accessible by the Ooayala Flex Job nodes (HTTP(S) also supported)

  2. Create a new action

    • Action Type: Script
    • Plugin: External Script Action
  3. Configure the action to point to the JAR file and PluginCommand subclass.

  4. Set the Flex system property to automatically reload JAR file changes:

Option 2: Copy and Paste Scripts to Flex Action

  1. Create a new action.

    • Action Type: Script.
    • Plugin: Groovy Script Action.
  2. Copy the def execute() method into the script action: