How to build Graylog project and version management

HI ,
i used https://github.com/Graylog2/graylog-project-cli.git to clone all the repos using https://github.com/Graylog2/graylog-project.git

it creates two folders graylog-project and graylog-project-repos (repos will have server and plugins )

i fired below commands in graylog-project folder to get tar file

mvn compile
mvn install -DskipTests=true -Dmaven.javadoc.skip=true -B -V
mvn -B -Dmaven.test.skip=true -Dskip.web.build=true assembly:single

is this the proper way i’m doing to build the project

or can i just build server (excluding plugin ) and build plugin later and add in plugin folder

how do i change the version of the server and if i change the version of the server where all the places i need to change ??

i’m totally confused please help

`

Hi @graylogDev,

If you look at the Development section of the README for my QuickValuesPlus plugin, you can see I do it a little differently as I don’t build the server. I use the hot-reloading (npm start) for working on the GUI part and I also compile the plugin (mvn package) and upload the jar file to the VM for the GL release I am targeting in order to test the java part of the plugin.

Here is how I build my plugin if it helps you out.

A couple things to remember. Change the GL pom file to the version of GL you are targeting.

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>

        <!-- Plugins will not be deployed by default - set to `false` if you actually want to deploy it -->
        <maven.deploy.skip>true</maven.deploy.skip>

        <graylog.version>2.3.0</graylog.version>
        <graylog.plugin-dir>/usr/share/graylog-server/plugin</graylog.plugin-dir>
    </properties>

Also, the plugins that have a GUI component require the graylog-web-plugin which you can get by cloning the GL repo. Again download the branch of GL that you need to target.

git clone -b "2.3.2" https://github.com/Graylog2/graylog2-server.git

Thanks for the replay !!

i have no problem in development environment UI parts works fine

once i build the plugin using mvn package and copy the .jar file to /plugin folder and restart graylog logs says plugin loaded but UI part wont come up

below is the pom property’s my graylog server is at 2.3.1

<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>
    <graylog2.version>2.3.1</graylog2.version> 
    <graylog2.plugin-dir>/usr/share/graylog-server/plugin</graylog2.plugin-dir>
</properties>

please help me to solve this

i just don’t understand why is will not work i can share more details if needed

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