eclipse调试activiti-webapp-explorer2源码

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/xiaozaq/article/details/88947913

1.下载源码

找了很久才找到源码。之前都是下载的activiti-explorer.war。直接放到tomcate运行的。想看源码找了很久没找到。

下载activiti 5.23.0版本的源码。这个我找到的包含activiti-explorer最高版本了。更高版本好像没有activiti-explorer了。

https://mvnrepository.com/artifact/org.activiti/activiti-engine

mvn仓库里我只找到activiti 5.22.0。没有5.23.0版本。5.23.0版本下载地址:

github:https://github.com/Activiti/Activiti/tree/5.23.0-release

云盘链接:https://pan.baidu.com/s/1wMupYHqYvlT__xFdYjMkiw   提取码:8i06 
 

2.解压源码到指定目录。

3.eclipse导入maven项目。

导入时需要下载大量的jar。右下角有下载进度。这个步骤需要时间较长。我大概花费了3个小时左右。需要耐心吧依赖都下载完成。

4.导入完成后运行项目。

右键项目”activiti-webapp-explorer2“  ——》Run as ——》maven build ... ——》Goals: tomcate7:run——》Run

5.运行后会报错。

[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building Activiti - Webapp - Explorer V2 5.23.0
[INFO] ------------------------------------------------------------------------
[INFO] Downloading: http://maven.vaadin.com/vaadin-addons/org/activiti/activiti-engine/5.23.0/activiti-engine-5.23.0.pom
[INFO] Downloading: https://repo.maven.apache.org/maven2/org/activiti/activiti-engine/5.23.0/activiti-engine-5.23.0.pom
[WARNING] The POM for org.activiti:activiti-engine:jar:5.23.0 is missing, no dependency information available
[INFO] Downloading: http://maven.vaadin.com/vaadin-addons/org/activiti/activiti-spring/5.23.0/activiti-spring-5.23.0.pom
[INFO] Downloading: https://repo.maven.apache.org/maven2/org/activiti/activiti-spring/5.23.0/activiti-spring-5.23.0.pom
[WARNING] The POM for org.activiti:activiti-spring:jar:5.23.0 is missing, no dependency information available
[INFO] Downloading: http://maven.vaadin.com/vaadin-addons/org/activiti/activiti-explorer/5.23.0/activiti-explorer-5.23.0.pom
[INFO] Downloading: https://repo.maven.apache.org/maven2/org/activiti/activiti-explorer/5.23.0/activiti-explorer-5.23.0.pom
[WARNING] The POM for org.activiti:activiti-explorer:jar:5.23.0 is missing, no dependency information available
[INFO] Downloading: http://maven.vaadin.com/vaadin-addons/org/activiti/activiti-modeler/5.23.0/activiti-modeler-5.23.0.pom
[INFO] Downloading: https://repo.maven.apache.org/maven2/org/activiti/activiti-modeler/5.23.0/activiti-modeler-5.23.0.pom
[WARNING] The POM for org.activiti:activiti-modeler:jar:5.23.0 is missing, no dependency information available
[INFO] Downloading: http://maven.vaadin.com/vaadin-addons/org/activiti/activiti-diagram-rest/5.23.0/activiti-diagram-rest-5.23.0.pom
[INFO] Downloading: https://repo.maven.apache.org/maven2/org/activiti/activiti-diagram-rest/5.23.0/activiti-diagram-rest-5.23.0.pom
[WARNING] The POM for org.activiti:activiti-diagram-rest:jar:5.23.0 is missing, no dependency information available
[INFO] Downloading: http://maven.vaadin.com/vaadin-addons/org/activiti/activiti-simple-workflow/5.23.0/activiti-simple-workflow-5.23.0.pom
[INFO] Downloading: https://repo.maven.apache.org/maven2/org/activiti/activiti-simple-workflow/5.23.0/activiti-simple-workflow-5.23.0.pom
[WARNING] The POM for org.activiti:activiti-simple-workflow:jar:5.23.0 is missing, no dependency information available
[INFO] Downloading: http://maven.vaadin.com/vaadin-addons/org/activiti/activiti-engine/5.23.0/activiti-engine-5.23.0.jar
[INFO] Downloading: http://maven.vaadin.com/vaadin-addons/org/activiti/activiti-spring/5.23.0/activiti-spring-5.23.0.jar
[INFO] Downloading: http://maven.vaadin.com/vaadin-addons/org/activiti/activiti-explorer/5.23.0/activiti-explorer-5.23.0.jar
[INFO] Downloading: http://maven.vaadin.com/vaadin-addons/org/activiti/activiti-modeler/5.23.0/activiti-modeler-5.23.0.jar
[INFO] Downloading: http://maven.vaadin.com/vaadin-addons/org/activiti/activiti-diagram-rest/5.23.0/activiti-diagram-rest-5.23.0.jar
[INFO] Downloading: http://maven.vaadin.com/vaadin-addons/org/activiti/activiti-simple-workflow/5.23.0/activiti-simple-workflow-5.23.0.jar
[INFO] Downloading: https://repo.maven.apache.org/maven2/org/activiti/activiti-engine/5.23.0/activiti-engine-5.23.0.jar
[INFO] Downloading: https://repo.maven.apache.org/maven2/org/activiti/activiti-spring/5.23.0/activiti-spring-5.23.0.jar
[INFO] Downloading: https://repo.maven.apache.org/maven2/org/activiti/activiti-explorer/5.23.0/activiti-explorer-5.23.0.jar
[INFO] Downloading: https://repo.maven.apache.org/maven2/org/activiti/activiti-modeler/5.23.0/activiti-modeler-5.23.0.jar
[INFO] Downloading: https://repo.maven.apache.org/maven2/org/activiti/activiti-diagram-rest/5.23.0/activiti-diagram-rest-5.23.0.jar
[INFO] Downloading: https://repo.maven.apache.org/maven2/org/activiti/activiti-simple-workflow/5.23.0/activiti-simple-workflow-5.23.0.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 20.067 s
[INFO] Finished at: 2019-04-01T15:03:06+08:00
[INFO] Final Memory: 13M/37M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project activiti-webapp-explorer2: Could not resolve dependencies for project org.activiti:activiti-webapp-explorer2:war:5.23.0: The following artifacts could not be resolved: org.activiti:activiti-engine:jar:5.23.0, org.activiti:activiti-spring:jar:5.23.0, org.activiti:activiti-explorer:jar:5.23.0, org.activiti:activiti-modeler:jar:5.23.0, org.activiti:activiti-diagram-rest:jar:5.23.0, org.activiti:activiti-simple-workflow:jar:5.23.0: Could not find artifact org.activiti:activiti-engine:jar:5.23.0 in vaadin-addons (http://maven.vaadin.com/vaadin-addons) -> [Help 1]
[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/DependencyResolutionException
[ERROR] Failed to execute goal on project activiti-webapp-explorer2:
 Could not resolve dependencies for project org.activiti:activiti-webapp-explorer2:war:5.23.0: 
The following artifacts could not be resolved: 
org.activiti:activiti-engine:jar:5.23.0, 
org.activiti:activiti-spring:jar:5.23.0, 
org.activiti:activiti-explorer:jar:5.23.0, 
org.activiti:activiti-modeler:jar:5.23.0, 
org.activiti:activiti-diagram-rest:jar:5.23.0, 
org.activiti:activiti-simple-workflow:jar:5.23.0: Could not find artifact 
org.activiti:activiti-engine:jar:5.23.0 in vaadin-addons (http://maven.vaadin.com/vaadin-addons) -> [Help 1]

主要是上面这句。提示activiti-engine:jar:5.23.0,activiti-spring:jar:5.23.0等等都没有。

之前说过mvn仓库里找不到5.23.0版本的activiti的。所以需要根据源码先安装这些jar。才能运行activiti-webapp-explorer2。

6.安装依赖项目。

比如安装activiti-engine项目:

右键项目”activiti-engine“  ——》Run as ——》maven install——》提示安装成功(mvn仓库可以看到activiti的5.23.0版本了)

其他依赖项目类似安装。都安装好后,再次执行第5步,这可以正常运行activiti-webapp-explorer2项目了。

这里需要注意的几点:

1.花费时间较长,maven install过程中还会继续下载很多依赖。

2.maven install时,会调用测试用例tests。我的电脑运行用例时报错,提示内存溢出了。解决办法:不调用测试用例。

activiti-engine/pom.xml中,大概193行加入下面配置,跳过测试。

<skipTests>true</skipTests> 

7.debug调试。(前提是第5步是dubug方式运行activiti-webapp-explorer2项目)

设置断点:activiti-explorer项目——》org.activiti.explorer.filter.ExplorerFilter ——》第36行设置断点

访问:http://localhost:8080/activiti-explorer

此时eclipse会进入debug模式。在断点出暂停。

maven 多模块工程 Debug断点出现无法找到源问题:

https://blog.csdn.net/u010154380/article/details/70880217

默认用户和密码:

账号 密码 角色
kermit kermit admin
gonzo gonzo manager
fozzie fozzie user

猜你喜欢

转载自blog.csdn.net/xiaozaq/article/details/88947913
今日推荐