In the majority of cases, most Lumify components can be built by simply opening a terminal to the component root
directory and running mvn package. The two most common components that are a little less straight-forward are the
web application and yarn ingest components. Additional instructions for both can be found below.
Each yarn ingestion plugin can be build independently using the following Maven command.
mvn package -pl <path_to_plugin_dir> -amOnce the plugin JAR file is created, copy it to the /lumify/libcache directory in HDFS.
hadoop fs -put <path_to_plugin_jar> /lumify/libcacheAs an example, to build and deploy the tika-mime-type-plugin one would run the following commands from the root of
the Lumify project.
mvn package -pl graph-property-worker/plugins/tika-mime-type -am
hadoop fs -put graph-property-worker/plugins/tika-mime-type/target/lumify-tika-mime-*-jar-with-dependencies.jar /lumify/libcacheLumify's yarn topology will automatically detect the plugin in the classpath.
From the root directory of the Lumify project, run
mvn package -P web-war -pl web/war -am -DskipTests -Dsource.skip=trueThe previous command will create a WAR file in the web/war/target directory.
The Lumify web application can be extended with dynamically loaded plugins. You can find some example plugins in
web/plugins. To build a web plugin, run mvn package -pl ./web/plugins/<plugin-name>/ -am -DskipTests.
Once the plugin JAR file is created, copy it to the /lumify/libcache directory in HDFS
hadoop fs -put <path_to_plugin_jar> /lumify/libcache. Or, copy it to the web server's lib directory
/opt/lumify/lib or for docker docker/lumify-dev-persistent/opt/lumify/lib.
This is the easiest way to expose the plugin to all web servers. The Lumify web application will automatically add the JAR file to the classpath.
To learn more about extending Lumify with plugins, please read this.