学习Activiti 6.0.0 (三)

如何debug?

对于debug应该都会熟悉,但是如果让你在mvn clean install的过程中debug,你还会吗?会的请跳过,不会的向下看。

项目结构

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
- jca
- jca-core
- src
- main
- java
- com.github.ofofs.jca.processor
- JcaProcessor.java
- resources
- META-INF
- services
- javax.annotation.processing.Processor
- pom.xml
- jca-test
- src
- main
- java
- com.github.ofofs.jca.serial
- SerialTest.java
- pom.xml
- pom.xml

上篇文章贴出了jca-core模块下的代码。下面贴出其余代码。

jca/pom.xml:

1
没啥特殊的,正常的父模块代码。

jca-test/pom.xml:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<build>
<plugins>
<!--Compiler Plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.5.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
</plugins>
</build>

<dependencies>
<dependency>
<groupId>com.github.ofofs</groupId>
<artifactId>jca-core</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
</dependencies>

SerialTest,java:

1
2
3
4
5
6
7
8
9
10
11
12
package com.github.ofofs.jca.serial;

import com.github.ofofs.jca.annotation.Serial;

/**
* @author kangyonggan
* @since 6/22/18
*/
@Serial
public class SerialTest {

}

debug

先在JcaProcessor.java的某个地方打上断点。然后以debug的形式对jca项目进行clean install即可。

下篇文章将会逐个介绍编译时的一些语法。