Compile Graylog Sample Plugin


#1

After using graylog-cli to successfully standup a graylog server (2.3.0) via Intellij. I downloaded the sample plugin code from github. (https://github.com/Graylog2/graylog-plugin-sample)

Following the readme documentation when I try to compile the plugin via command line. I get the following error.
Could not find artifact org.graylog2:graylog2-plugin:jar:2.0.0-SNAPSHOT

When I load the plugin into Intellij the following dependencies are missing in the pom.xml
<artifactId>graylog2-plugin</artifactId> <version>${graylog2.version}</version>

I have the plugin and the graylog server both in the same root directory.
graylog-project-repos/graylog2-server graylog-project-repos/graylog-plugin-sample

How do I resolve this dependency issue!? It does not seem that the sample plugin code comes with graylog2-plugin code.

TLDR;
Issue is that the sample plugin code cannot find the grayloy2-plugin dependency.


(Jochen) #2

The sample plugin is pretty much out of date and doesn’t work with Graylog 2.2.x or Graylog 2.3.x in that state.

Better take a look at a real plugin such as https://github.com/Graylog2/graylog-plugin-map-widget


(Jochen) #3

I’ve created 2 issues for the sample plugin, so we don’t forget to fix that:



#4

Thanks, is there any suggestions you have on learning how to create a plugin besides looking at the map-widget or any of the ones in the graylog-project. I know that the scripts that used to be include to bootstrap plugins and setup all the components have been deprecated for graylog 2.0.


(Jochen) #5

No, just stick to the existing (real-world) plugins on GitHub.


(system) #6

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.