Building from repo

I am having some issues in running project following the official guide from here: https://github.com/Graylog2/graylog-project-cli

What I’ve done so far:
bootstrapped project with graylog-project bootstrap github://Graylog2/graylog-project.git

run mvn install from graylog2-server (readme is not clear on this point, just in case I ran it from the graylog-project as well).

Created intellij run profile (also tried with the generated option idea setup with no much luck either).

on running the build I am getting Guice errors about injection, i.e.

2) No implementation for org.graylog2.indexer.cluster.ClusterAdapter was bound.
  Did you mean?
    org.graylog2.indexer.cluster.Cluster bound  at org.graylog2.indexer.cluster.Cluster.class(Cluster.java:44)

  while locating org.graylog2.indexer.cluster.ClusterAdapter
    for the 4th parameter of org.graylog2.indexer.cluster.Cluster.<init>(Cluster.java:55)
  while locating org.graylog2.indexer.cluster.Cluster
    for the 2nd parameter of org.graylog2.initializers.BufferSynchronizerService.<init>(BufferSynchronizerService.java:51)
  while locating org.graylog2.initializers.BufferSynchronizerService
    for the 2nd parameter of org.graylog2.initializers.OutputSetupService.<init>(OutputSetupService.java:46)
  at org.graylog2.bindings.InitializerBindings.configure(InitializerBindings.java:30)

(see https://pastebin.com/jBUyfK97 for full log)

Am I missing something obvious?

This is a bug in graylog-project. I will fix it and notify you when it’s done. Thanks for the heads up, @alekc!

If you want a quick fix, you can try https://github.com/Graylog2/graylog-project/pull/18 if it has not been merged already.

Thanks @dennis, we are getting closer.
I bootstrapped a new project and now those errors related to the injection are gone.
However, there are issues related to Error:(564, 56) java: package RuleLangParser does not exist, see https://pastebin.com/gWGF6SQQ

Edit: after right clicking on graylog-server module in idea and selecting maven->“generate sources and update folder” all paths have been fixed and I am able to build final project.

p.s. it would be good to write somewhere instruction for releasing of a patched version of graylog, I believe that there is no such page for now and you have to search in community/elsewhere (mvn install?)

I was celebrating too soon, while the project is working with idea, I still cannot package it.

My steps:
bootstrap project
mvn compile
mvn package

Reported error:

[INFO] Reactor Summary for graylog-project 4.0.0-SNAPSHOT:
[INFO] 
[INFO] Graylog Parent POM ................................. SUCCESS [  0.004 s]
[INFO] Graylog Project Parent POM ......................... SUCCESS [  0.099 s]
[INFO] Graylog ............................................ SUCCESS [05:40 min]
[INFO] Graylog Plugin Parent POM .......................... SUCCESS [  0.002 s]
[INFO] graylog-storage-elasticsearch6 ..................... SUCCESS [  7.549 s]
[INFO] Graylog Binary Distribution Tarball ................ SUCCESS [  7.931 s]
[INFO] Graylog Plugin with Web support Parent POM ......... SUCCESS [  0.599 s]
[INFO] graylog-plugin-collector ........................... SUCCESS [ 45.073 s]
[INFO] graylog-plugin-aws ................................. SUCCESS [ 37.293 s]
[INFO] graylog-plugin-threatintel ......................... SUCCESS [ 38.491 s]
[INFO] graylog-plugin-integrations ........................ SUCCESS [ 44.626 s]
[INFO] graylog-project .................................... FAILURE [  0.092 s]
[INFO] runner ............................................. SKIPPED
[INFO] integration-tests .................................. SKIPPED
[INFO] full-backend-tests ................................. SKIPPED
[INFO] graylog-plugin-archetype ........................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  08:42 min
[INFO] Finished at: 2020-06-11T11:49:30+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:3.1.0:single (generate-project-server-artifact) on project graylog-project: Assembly is incorrectly configured: graylog: Assembly is incorrectly configured: graylog: 
[ERROR] Assembly: graylog is not configured correctly: Cannot find attachment with classifier: graylog-server-tarball in module project: org.graylog2:graylog2-server:jar:4.0.0-SNAPSHOT. Please exclude this module from the module-set.
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <args> -rf :graylog-project

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