The best way to deploy a Camunda Cockpit plugin running on Wildfly?

Hello again,
I’m trying to deploy the plugin: https://github.com/camunda/camunda-consulting/tree/master/snippets/camunda-kpi-monitoring-demo/plugin/cockpit-kpi-overview-plugin into Camunda Cockpit running on Wildfly. I’ve downloaded the plugin and trying to build it using ant. The problem is it can’t found “mvn.bat”, but since Maven 3.1.1 there is no “mvn.bat”.

Hi @dikey94,

is your PATH system variable set? what is the value?

Cheers,
Askar

Ant is looking for “mvn.bat” inside “cockpit-kpi-overview-plugin”. There is a condition in “build.xml” - if Windows then “mvn.bat”. Since Maven 3.1.1 there is “mvn.cmd” against “mvn.bat”. I’ve changed the condition but I get:

C:\Users\Damian\me\KPI\camunda-consulting-master\snippets\camunda-kpi-monitoring-demo\plugin\cockpit-kpi-overview-plugin>ant
Buildfile: C:\Users\me\Desktop\KPI\camunda-consulting-master\snippets\camunda-kpi-monitoring-demo\plugin\cockpit-kpi-overview-plugin\build.xml

package.mvn:

BUILD FAILED
C:\Users\me\Desktop\KPI\camunda-consulting-master\snippets\camunda-kpi-monitoring-demo\plugin\cockpit-kpi-overview-plugin\build.xml:21: exec returned: 1

Total time: 0 seconds

Hi @dikey94,

I’m sorry but I did not understand if your PATH system variable is set and what is the value of it. You can read more about system variables here for instance: https://www.java.com/en/download/help/path.xml

Cheers,
Askar

Path variables already exist. I have %M2_HOME%\bin, %JAVA_HOME%\bin, %ANT_HOME%\bin. I can execute “mvn -v” in the shell.

I’m going to build WAR file using Maven. What I get is:

C:\Users\me\Downloads\camunda-consulting-master\snippets\camunda-kpi-monitoring-demo\plugin\cockpit-kpi-overview-plugin>mvn clean install
[INFO] Scanning for projects…
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[ERROR] Non-resolvable import POM: Failure to find org.camunda.bpm:camunda-bom:pom:7.5.3-ee in https://app.camunda.com/nexus/content/groups/public was cached in the local repository, resolution will not be reattempted until the update interval of camunda-bpm-nexus has elapsed or updates are forced @ line 28, column 19
[ERROR] ‘dependencies.dependency.version’ for org.camunda.bpm:camunda-engine:jar is missing. @ line 46, column 14
@
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project org.camunda.consulting.cockpit.plugin:kpioverview:1.0-SNAPSHOT (C:\Users\me\Downloads\camunda-consulting-master\snippets\camunda-kpi-monitoring-demo\plugin\cockpit-kpi-overview-plugin\pom.xml) has 2 errors
[ERROR] Non-resolvable import POM: Failure to find org.camunda.bpm:camunda-bom:pom:7.5.3-ee in https://app.camunda.com/nexus/content/groups/public was cached in the local repository, resolution will not be reattempted until the update interval of camunda-bpm-nexus has elapsed or updates are forced @ line 28, column 19 -> [Help 2]
[ERROR] ‘dependencies.dependency.version’ for org.camunda.bpm:camunda-engine:jar is missing. @ line 46, column 14
[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/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException

Hi @dikey94,

what happens if you add -U flag to your maven build command?

Cheers,
Askar

C:\Users\me\Downloads\camunda-consulting-master\snippets\camunda-kpi-monitoring-demo\plugin\cockpit-kpi-overview-plugin>mvn clean install -U
[INFO] Scanning for projects…
Downloading: https://app.camunda.com/nexus/content/groups/public/org/camunda/bpm/camunda-bom/7.5.3-ee/camunda-bom-7.5.3-ee.pom
Downloading: https://repo.maven.apache.org/maven2/org/camunda/bpm/camunda-bom/7.5.3-ee/camunda-bom-7.5.3-ee.pom
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[ERROR] Non-resolvable import POM: Could not find artifact org.camunda.bpm:camunda-bom:pom:7.5.3-ee in camunda-bpm-nexus (https://app.camunda.com/nexus/content/groups/public) @ line 28, column 19
[ERROR] ‘dependencies.dependency.version’ for org.camunda.bpm:camunda-engine:jar is missing. @ line 46, column 14
@
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project org.camunda.consulting.cockpit.plugin:kpioverview:1.0-SNAPSHOT (C:\Users\me\Downloads\camunda-consulting-master\snippets\camunda-kpi-monitoring-demo\plugin\cockpit-kpi-overview-plugin\pom.xml) has 2 errors
[ERROR] Non-resolvable import POM: Could not find artifact org.camunda.bpm:camunda-bom:pom:7.5.3-ee in camunda-bpm-nexus (https://app.camunda.com/nexus/content/groups/public) @ line 28, column 19 -> [Help 2]
[ERROR] ‘dependencies.dependency.version’ for org.camunda.bpm:camunda-engine:jar is missing. @ line 46, column 14
[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/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException

C:\Users\me\Downloads\camunda-consulting-master\snippets\camunda-kpi-monitoring-demo\plugin\cockpit-kpi-overview-plugin>

You have to set the Camunda versions to 7.5.0 or another community edition version. 7.5.3-ee is not publicly available.

1 Like

Works! Really sorry for the missing. I have the .jar file. Do I have to rebuild Cockpit Application?

I found this: https://docs.camunda.org/manual/7.3/real-life/how-to/#cockpit-how-to-develop-a-cockpit-plugin-integrationinto-cockpit

There are two ways to add your plugin to the camunda BPM webapp.

You can copy it to the WEB-INF/lib folder of the camunda webapp.
You can set up a maven war overlay for the camunda webapp.

The first solution is the simplest: if you dowloaded the tomcat distribution, you can copy the plugin jar file to the /server/apache-tomcat-${tomcat-version}/webapps/camunda/WEB-INF/lib/ folder and restart the server.

first option: How to do it with Wildfly? Camunda Webapp is deployed as WAR file.

second option: How? :slight_smile:

Thanks for any help.

Hi @dikey94,

Did you finally find how to deploy a Cockpit plugin?
I’m also interested in developing/using such a plugin and I’m a bit confused.
I use a full Wildfly distribution which has a shared process engine (started inside the Wildfly runtime container).
What is the best approach to “hack” the Cockpit?
Use the standalone Webapplication? In that case, do I have to download the source code, change it and then deploy it again? And then? How will it run in the same runtime Wildfly server?

Thanks!

Hi guys,

The keywords are Maven overlay. See https://github.com/camunda-consulting/code/tree/master/snippets/camunda-webapp-customized for an example.

Cheers,
Thorben