Uploaded image for project: 'camunda BPM'
  1. camunda BPM
  2. CAM-12620

Document setup of Cockpit Plugins when using JAR deployments

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Fixed
    • Icon: L3 - Default L3 - Default
    • 7.14.2, 7.15.0-alpha2, 7.15.0
    • None
    • None
    • None

      User story

      When building a Cockpit Plugin using the spring-boot starter project, I want to follow the documentation to complete the setup correctly. 

      Background

      Snipped from a customer support request, having a problem when loading Cockpit in the browser - the plugin.js and the plugin.css cannot be found (404):

      "The plugin itself (Java class) is found. The problem we face is that on loading the Cockpit in the browser (http://localhost:8080/camunda/app/cockpit/default/#/dashboard)

      In the class SamplePluginApp.java I added logging to prove that the resources can be found in the classpath:

      2020-10-19 10:28:53.198  WARN 9994 --- [           main] uginApp$$EnhancerBySpringCGLIB$$d52ab2d3 : info: jar:file:/home/dev/Development/eclipse-workspace/sample-plugin/main/target/main-0.0.1-SNAPSHOT-runnable.jar!/BOOT-INF/lib/plugin-0.0.1-SNAPSHOT.jar!/plugin-webapp/sample-plugin/app/plugin.js
      2020-10-19 10:28:53.206  WARN 9994 --- [           main] uginApp$$EnhancerBySpringCGLIB$$d52ab2d3 : info: jar:file:/home/dev/Development/eclipse-workspace/sample-plugin/main/target/main-0.0.1-SNAPSHOT-runnable.jar!/BOOT-INF/lib/plugin-0.0.1-SNAPSHOT.jar!/plugin-webapp/sample-plugin/info.txt
      

      If I run it in the Eclipse IDE the classpath is different but the plugin resources cannot be found either. Here the output form Eclipse console:

      2020-10-19 10:47:40.048  WARN 11452 --- [           main] uginApp$$EnhancerBySpringCGLIB$$2b65b90c : info: file:/home/dev/Development/eclipse-workspace/sample-plugin/plugin/target/classes/plugin-webapp/sample-plugin/app/plugin.js
      2020-10-19 10:47:40.050  WARN 11452 --- [           main] uginApp$$EnhancerBySpringCGLIB$$2b65b90c : info: file:/home/dev/Development/eclipse-workspace/sample-plugin/plugin/target/classes/plugin-webapp/sample-plugin/info.txt
      

      I tried to find information in the docs but couldn't find a solution.

      In the docs neither https://docs.camunda.org/manual/7.14/user-guide/spring-boot-integration/ nor https://docs.camunda.org/manual/7.14/webapps/cockpit/extend/plugins/ points out how to do this in a Spring boot environment. Also the examples on GitHub just build the plugin-jar.

       

      Acceptance criteria

      • Setup to add Cockpit plugin is documented for Springboot starter project
        • If there are more distinctive steps to take when using another setup, please make sure to add the necessary configuration steps for these, too.
      • Cases in which the AbstractCockpitPluginRootResource needs to be inherited are documented

        This is the controller panel for Smart Panels app

              martin.stamm Martin Stamm
              andre.bappert Andre
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: