Hi everyone,
I’ve used the org.camunda.bpm.archetype:camunda-archetype-spring-boot:7.9.0 archetype to set up a new project in IntelliJ IDEA. The Project SDK is 1.8.0_172 and Maven Version 3.
I started the “CamundaApplication” and the project works fine so far.
Now I’d like to remove the internal Tomcat Web-Application Server and deploy the project as a .war to an external Wildfly 11 Server.
What I’ve done so far to achieve this:
-
change to war in the pom.xml
-
exclude tomcat inside the dependency of org.camunda.bpm.springboot as following in the pom.xml:
<exclusions> <exclusion> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-tomcat</artifactId> </exclusion> </exclusions>
-
classify one dependency as provided, as it gets shipped with the wildfly instance itself:
<dependency> <groupId>org.camunda.bpm.springboot</groupId> <artifactId>camunda-bpm-spring-boot-starter-rest</artifactId> <version>${camundaSpringBoot.version}</version> <scope>provided</scope> </dependency>
-
create run configurations for the deployment with maven after adding the maven plugin to the pom.xml:
clean wildfly:deploy
After starting the Wildfly, I run the maven Run Configuration and receive the following output:
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 16.121 s
[INFO] Finished at: 2018-07-06T10:14:07+02:00
[INFO] Final Memory: 136M/1235M
[INFO] ------------------------------------------------------------------------
10:14:07.823 [Thread-3] INFO o.s.c.a.AnnotationConfigApplicationContext - Closing org.springframework.context.annotation.AnnotationConfigApplicationContext@5773f83d: startup date [Fri Jul 06 10:13:57 CEST 2018]; root of context hierarchy
10:14:08.162 [Thread-3] INFO org.camunda.bpm.container - ENGINE-08051 Process application my_project_name undeployed
10:14:08.172 [Thread-3] INFO org.camunda.bpm.engine - ENGINE-00007 Process Engine default closed
10:14:08.172 [Thread-3] INFO o.s.j.d.e.EmbeddedDatabaseFactory - Shutting down embedded database: url='jdbc:h2:mem:testdb;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=false'
Process finished with exit code 0
So I checked the deployments in the Wildfly Admin Console and saw my project deployed, as well as five other apps.
- camunda-engine-rest-7.9.1-ee-wildfly.war
- camunda-example-invoice-7.9.1-ee.war
- camunda-h2-webapp-7.9.1-ee.war
- camunda-webapp-ee-jboss-7.9.1-ee.war
- camunda-welcome.war
- my-project-name.war
The camunda-webapp-ee-jboss-7.9.1-ee.war is the one, which I guess should also be classified as ‘provided’ in the pom.xml.
Here’s my first question:
Which is the dependency that represents this in the pom.xml that I may have to exclude? I tried putting ‘org.camunda.bpm.springboot’ on provided, but it didn’t help.
Second: At the end of the logs it says: Process application my_project_name undeployed, so my guess is, that my deployed war-file fails to register at the camunda process engine. But why does this happen?
Third: Are there some more steps that I have to follow to achieve what I want?
Does anyone have experience in this topic and is willing to help me out here?
Thank you very much in advance,
Daniel