Web files of Plugin not packed into jar

Hi,

I’m currently developing my first Graylog plugin bases on the Sample Plugin.


My problem is that after building the project (mvn clean package) the web files (target/web/build/*) are not part of the created jar.

As a temporary solution I’m adding them manually but that can’t be the correct way :wink:

Any ideas what’s the problem?

Hey @Escert,

thanks for creating that plugin!

The culprit is this: https://github.com/sportalliance/graylog-plugin-slack-notification/blob/master/pom.xml#L109

It needs to looks like this:

<resource><directory>${web.build-dir}</directory></resource>

This is caused by the introduction of https://github.com/Graylog2/graylog2-server/pull/5853. Actually it is reflected in our maven archetype you probably have used to generate the boilerplate for your plugin. Maybe you did that before this PR got merged?

Thank you very much @dennis. With your correction it is working!

I used the Sample Plugin as a template for my plugin as i did not got the Graylog CLI thing running to generate a plugin skeleton…

Oh. The Sample Plugin is unfortunately not actively maintained anymore, I am adding a notice to the README indicating that it should not be used as a template. We are currently updating the docs to correct a number of mistakes in there and streamline the process of creating new plugins. Thanks for your input!