camunda-community-hub / camunda-7-cockpit-plugin-statistics

camunda BPM community extension providing a statistics plugin for camunda Cockpit
Apache License 2.0
25 stars 20 forks source link

Can you inject the plugin as a maven dependency? #9

Closed manugarciac closed 8 years ago

manugarciac commented 8 years ago

I'm building my project through maven using maven overlays. This way, when I deploy my app, I also deploy the tasklist, cockpit and admin apps without having to handle multiple wars.

Is there a way to add this plugin as a maven dependency so that it also gets deployed with my cockipit?

eklieme commented 8 years ago

Can you give further details on your project? Afaik, the camunda web applications are already delivered in one .war (camunda-webapp) archive. Did you have a look at the build.xml in this plugin-project? It shows how you can execute the maven command to built plugin using ant and afterwards "inject" the plugin.jar..

After a quick google research this should be possible using maven without ant, too.

cheers,

Eric

manugarciac commented 8 years ago

I was able to do what I want. I uploaded the .jar of the plugin to my local Nexus, and added it as a maven dependency. It gets built and it seems to almost work. This is what doesnt work. It tries to execute this URL:

http://localhost:8090/engine-rest/engine/default/process-definition

But in my deployment, the URL that it should be executing is:

http://localhost:8090/camunda-spring/api/engine/engine/default/process-definition

Where is that URL configured?

eklieme commented 8 years ago

Hi,

can you get the newest version and check again? There were some issues with some usages of the engine rest api

manugarciac commented 8 years ago

Could it be that you missed line 10 of this file?

https://github.com/camunda/camunda-cockpit-plugin-statistics/blob/master/src/main/resources/plugin-webapp/statistics-plugin/app/process-diagram-overlay/views/processDiagram.html#L10

The fix appears to be pretty straightforward there

eklieme commented 8 years ago

Oh...give it a try now!

manugarciac commented 8 years ago

Great! It works now. I'll let you know if I find another URL that needs fixing.

I'm having a different problem now, but as it's not related I'll open a new issue. Thank you.