Comments (2)
There's no plan to work on this, so closing the issue. We are looking at Docker images instead.
from flowable-engine.
Here is how it is working for me:
package org.flowable;
import org.apache.catalina.Context;
import org.apache.catalina.loader.WebappLoader;
import org.apache.catalina.startup.HostConfig;
import org.apache.catalina.startup.Tomcat;
import javax.servlet.ServletException;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.nio.file.Files;
public class WebLauncher
{
private static final String BASEDIR = ".";
private static final String DOC_BASE = "webapps";
private static final String BOOT_INF_LIB = "/BOOT-INF/lib/";
public static void main(String[] args) throws Exception
{
String version = WebLauncher.class.getPackage().getImplementationVersion();
Tomcat tomcat = new Tomcat();
tomcat.setPort(8080);
tomcat.setBaseDir(BASEDIR);
addWebApps("flowable-ui-idm-app-", "/flowable-idm", version, tomcat);
addWebApps("flowable-ui-admin-", "/flowable-admin", version, tomcat);
addWebApps("flowable-ui-task-app-", "/flowable-task", version, tomcat);
addWebApps("flowable-ui-modeler-app-", "/flowable-modeler", version, tomcat);
addWebApps("flowable-app-rest-", "/flowable-rest", version, tomcat);
tomcat.start();
tomcat.getServer().await();
}
private static void addWebApps(String app, String contextRoot, String version, Tomcat tomcat)
throws IOException, ServletException
{
final String warName = makeWarName(app, version);
final String docBaseDir = BASEDIR + "/" + DOC_BASE;
final File docBaseDirFile = new File(docBaseDir);
if (!docBaseDirFile.exists())
{
docBaseDirFile.mkdir();
}
File file = extractWarFile(warName, docBaseDir);
Context context = tomcat.addWebapp(contextRoot, file.getAbsolutePath());
context.setReloadable(false);
context.setParentClassLoader(tomcat.getHost().getParentClassLoader());
WebappLoader loader = new WebappLoader(tomcat.getClass().getClassLoader());
context.setLoader(loader);
}
private static File extractWarFile(String warName, String docBaseDir) throws IOException
{
File file = new File(docBaseDir, warName);
if (!file.exists())
{
InputStream link = (WebLauncher.class.getResourceAsStream(BOOT_INF_LIB + warName));
Files.copy(link, file.getAbsoluteFile().toPath());
}
return file;
}
private static String makeWarName(String app, String version)
{
return app + version + ".war";
}
}
Here is pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<artifactId>flowable-boot</artifactId>
<packaging>jar</packaging>
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.flowable</groupId>
<artifactId>flowable-parent</artifactId>
<version>6.0.0-SNAPSHOT</version>
</parent>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot</artifactId>
<version>${spring-boot.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
<version>${spring-boot.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-log4j</artifactId>
<version>${spring-boot.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-core</artifactId>
<version>${tomcat.version}</version>
</dependency>
<dependency>
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat-util</artifactId>
<version>${tomcat.version}</version>
</dependency>
<dependency>
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat-coyote</artifactId>
<version>${tomcat.version}</version>
</dependency>
<dependency>
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat-api</artifactId>
<version>${tomcat.version}</version>
</dependency>
<dependency>
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat-jdbc</artifactId>
<version>${tomcat.version}</version>
</dependency>
<dependency>
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat-dbcp</artifactId>
<version>${tomcat.version}</version>
</dependency>
<dependency>
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat-servlet-api</artifactId>
<version>${tomcat.version}</version>
</dependency>
<dependency>
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat-jsp-api</artifactId>
<version>${tomcat.version}</version>
</dependency>
<dependency>
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat-jasper</artifactId>
<version>${tomcat.version}</version>
</dependency>
<dependency>
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat-jasper-el</artifactId>
<version>${tomcat.version}</version>
</dependency>
<dependency>
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat-el-api</artifactId>
<version>${tomcat.version}</version>
</dependency>
<dependency>
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat-catalina</artifactId>
<version>${tomcat.version}</version>
</dependency>
<dependency>
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat-tribes</artifactId>
<version>${tomcat.version}</version>
</dependency>
<dependency>
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat-catalina-ha</artifactId>
<version>${tomcat.version}</version>
</dependency>
<dependency>
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat-annotations-api</artifactId>
<version>${tomcat.version}</version>
</dependency>
<dependency>
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat-juli</artifactId>
<version>${tomcat.version}</version>
</dependency>
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-logging-juli</artifactId>
<version>${tomcat.version}</version>
</dependency>
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-logging-log4j</artifactId>
<version>${tomcat.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.flowable</groupId>
<artifactId>flowable-ui-idm-app</artifactId>
<version>${project.version}</version>
<type>war</type>
</dependency>
<dependency>
<groupId>org.flowable</groupId>
<artifactId>flowable-ui-admin</artifactId>
<version>${project.version}</version>
<type>war</type>
</dependency>
<dependency>
<groupId>org.flowable</groupId>
<artifactId>flowable-ui-task-app</artifactId>
<version>${project.version}</version>
<type>war</type>
</dependency>
<dependency>
<groupId>org.flowable</groupId>
<artifactId>flowable-ui-modeler-app</artifactId>
<version>${project.version}</version>
<type>war</type>
</dependency>
<dependency>
<groupId>org.flowable</groupId>
<artifactId>flowable-app-rest</artifactId>
<version>${project.version}</version>
<type>war</type>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<version>2.4.1</version>
<configuration>
<filesets>
<fileset>
<directory>${project.basedir}</directory>
<includes>
<include>work/**</include>
<include>webapps/**</include>
<include>conf/**</include>
<include>data/**</include>
</includes>
<followSymlinks>false</followSymlinks>
</fileset>
</filesets>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<archive>
<manifest>
<mainClass>${flowable.mainClass}</mainClass>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>${spring-boot.version}</version>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
<configuration>
<mainClass>${flowable.mainClass}</mainClass>
</configuration>
</plugin>
</plugins>
</build>
<properties>
<tomcat.version>8.0.26</tomcat.version>
<compileSource>1.8</compileSource>
<spring-boot.version>1.4.3.RELEASE</spring-boot.version>
<spring.version>4.3.5.RELEASE</spring.version>
<flowable.mainClass>org.flowable.WebLauncher</flowable.mainClass>
</properties>
</project>
and the start script
#!/bin/sh
java -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8800 -jar target/flowable-boot*.jar --debug
from flowable-engine.
Related Issues (20)
- BpmnXMLUtil.parseExtensionElement setElementText has bug of Line wrap cover HOT 1
- Process migration cannot migrate processes HOT 1
- Process definition id of an async external worker service task job is not updated after direct migration HOT 2
- 是否有审批人驳回到上级,上级修改后在发起继续审批流程 HOT 1
- Invalid SQL upgrade scripts for HSQL database (7.0.0 -> 7.0.1)
- The DefaultIdentityLinkIterceptor.java creates duplicate identityLinks on ProcessInstance
- AsyncTaskInvokerTaskExecutor supplied by Spring Boot autoconfiguration is not started
- Not possible to exclude the `flowable-event-registry` JAR even if EventRegistry disabled
- startProcessInstanceByKey does not always trigger the process HOT 3
- Liquibase first up does not work with JtaProcessEngineConfiguration HOT 1
- Timer job never unlocked after an exception
- Query the sorting exception of HistoricActivityInstance
- After running runtimeService().deleteProcessInstance(processInstance.getId()) to delete the parent process instance, the CallActivity subprocessInstance query is null HOT 1
- Flowable Open Source Documentation should support dark mode
- 数据量过大以后,flowable有相关的归档功能吗?或者是否支持集成其他分库分表的框架,如 sharding HOT 1
- reject problem HOT 6
- Process start, potentially migration: Signal scope gets ignored starting with the 2nd process
- BpmnJsonConverter is removed? What are the alternatives?
- Change the parameter type from FlowableEngineEventType to FlowableEventType in RuntimeService .
- Event subscription is missing after migration of an active embedded sub process
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flowable-engine.