一、添加官方activiti骨架到idea中
下载Acticiti官方源码
进入tooling模块下
shellcd Activiti/tooling/archetypes
执行maven安装命令
shellmvn clean install
配置骨架
二、添加自定义activiti骨架到idea中
复制原来官方的骨架,更改pom文件
添加没有src/main/java和srcmain/resources目录
将HelloWord.java拷入src/main/java目录中,更改package,更改为package ${package}; 占位符
将HelloWord的resources目录下的文件拷贝进srcmain/resources
更改META-INF/maven/archetype-metadata.xml
xml<?xml version="1.0" encoding="UTF-8"?> <archetype-descriptor name="activiti-archetype-unittest2"> <fileSets> <fileSet filtered="true" packaged="true"> <directory>src/main/java</directory> <includes> <include>**/*.java</include> </includes> </fileSet> <fileSet filtered="false" packaged="false"> <directory>src/main/resources</directory> <includes> <include>activiti.cfg.xml</include> <include>logback.xml</include> <include>diagrams/second_approve.bpmn20.xml</include> </includes> </fileSet> <fileSet filtered="true" packaged="true"> <directory>src/test/java</directory> <includes> <include>**/*.java</include> </includes> </fileSet> <fileSet filtered="true" packaged="true"> <directory>src/test/resources</directory> <includes> <include>my-process.bpmn20.xml</include> </includes> </fileSet> </fileSets> </archetype-descriptor>
- 注意name的更改
提交maven
shell# 进入activiti-archetype-unittest2 $ cd activiti-archetype-unittest2 # 执行安装命令 $ mvn clear install
根据pom.xml文件配置脚手架