diff --git a/cola-components/cola-component-ruleengine/src/test/java/com/alibaba/cola/ruleengine/CompositeRuleTest.java b/cola-components/cola-component-ruleengine/src/test/java/com/alibaba/cola/ruleengine/CompositeRuleTest.java
index e9631c54c..80305cd8c 100644
--- a/cola-components/cola-component-ruleengine/src/test/java/com/alibaba/cola/ruleengine/CompositeRuleTest.java
+++ b/cola-components/cola-component-ruleengine/src/test/java/com/alibaba/cola/ruleengine/CompositeRuleTest.java
@@ -18,6 +18,8 @@ public void setUp(){
fizzBuzzEngine = new DefaultRuleEngine();
}
+
+
@Test
public void test_fizz_first(){
Facts facts = new Facts();
diff --git a/cola-components/cola-component-ruleengine/src/test/java/com/alibaba/cola/ruleengine/PriorityTest.java b/cola-components/cola-component-ruleengine/src/test/java/com/alibaba/cola/ruleengine/PriorityTest.java
index 4f6c8790f..b73d4914f 100644
--- a/cola-components/cola-component-ruleengine/src/test/java/com/alibaba/cola/ruleengine/PriorityTest.java
+++ b/cola-components/cola-component-ruleengine/src/test/java/com/alibaba/cola/ruleengine/PriorityTest.java
@@ -1,59 +1,79 @@
package com.alibaba.cola.ruleengine;
+import com.alibaba.cola.ruleengine.api.Action;
import com.alibaba.cola.ruleengine.api.Facts;
import com.alibaba.cola.ruleengine.api.Rule;
-import com.alibaba.cola.ruleengine.core.AbstractRule;
+import com.alibaba.cola.ruleengine.api.RuleEngine;
+import com.alibaba.cola.ruleengine.core.*;
+import org.junit.Before;
import org.junit.Test;
+import java.util.ArrayList;
+
import static org.assertj.core.api.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.extractProperty;
public class PriorityTest {
+ RuleEngine ruleEngine;
+
+ @Before
+ public void setUp() {
+ ruleEngine = new DefaultRuleEngine();
+ }
+
+
@Test
public void testNoPriority() {
- DummyRule r1 = new DummyRule();
- DummyRule r2 = new DummyRule();
- DummyRule r3 = new DummyRule();
+ DummyRule r1 = new DummyRule(1);
+ DummyRule r2 = new DummyRule(2);
+ DummyRule r3 = new DummyRule(3);
// assertThat(rules).startsWith(r1).endsWith(r3);
}
@Test
- public void testPriority(){
+ public void testPriority() {
DummyRule r1 = new DummyRule(10);
DummyRule r2 = new DummyRule(3);
DummyRule r3 = new DummyRule(1);
-
-
// assertThat(rules).startsWith(r3).endsWith(r1);
}
+ @Test
+ public void test_natural_rule() {
+ DummyRule r1 = new DummyRule(10);
+ DummyRule r2 = new DummyRule(3);
+ DummyRule r3 = new DummyRule(1);
+ Facts facts = new Facts();
+ facts.put("number", 15);
+ Rule naturalRules = NaturalRules.of(r1, r2, r3);
+ ruleEngine.fire(naturalRules, facts);
+ }
- static class DummyRule extends AbstractRule {
-
- public DummyRule(){
+ static class DummyRule extends DefaultRule {
- }
- public DummyRule(int priority){
- super(priority);
+ public DummyRule(int priority) {
+ super("rule" + priority, null, priority, facts -> true, new ArrayList<>());
}
@Override
public boolean evaluate(Facts facts) {
- return false;
+ return true;
}
@Override
public void execute(Facts facts) {
-
+ System.out.println(facts.getFact("number").getValue());
}
@Override
public boolean apply(Facts facts) {
- return false;
+ System.out.println(name + ": " + facts.getFact("number").getValue());
+ return true;
}
}
}
diff --git a/cola-components/cola-component-test-container/pom.xml b/cola-components/cola-component-test-container/pom.xml
index f0d8b4d3f..d91fddc4b 100644
--- a/cola-components/cola-component-test-container/pom.xml
+++ b/cola-components/cola-component-test-container/pom.xml
@@ -56,50 +56,33 @@
- org.springframework
- spring-context
- provided
+ org.springframework.boot
+ spring-boot-starter
+
- org.springframework
- spring-core
- provided
-
-
-
-
- javax.annotation
- javax.annotation-api
- provided
+ org.springframework.boot
+ spring-boot-starter-test
+
+
+
+ junit
+ junit
+
+
commons-cli
commons-cli
-
- org.slf4j
- slf4j-api
+ org.junit.platform
+ junit-platform-launcher
+ 1.9.3
- ch.qos.logback
- logback-classic
- provided
-
-
- ch.qos.logback
- logback-core
- provided
-
-
-
-
- junit
- junit
- compile
+ org.junit.jupiter
+ junit-jupiter-engine
diff --git a/cola-components/cola-component-test-container/src/main/java/com/alibaba/cola/test/TestExecutor.java b/cola-components/cola-component-test-container/src/main/java/com/alibaba/cola/test/TestExecutor.java
index 08a214964..8ff1dc737 100644
--- a/cola-components/cola-component-test-container/src/main/java/com/alibaba/cola/test/TestExecutor.java
+++ b/cola-components/cola-component-test-container/src/main/java/com/alibaba/cola/test/TestExecutor.java
@@ -2,22 +2,15 @@
import com.alibaba.cola.test.command.TestClassRunCmd;
import com.alibaba.cola.test.command.TestMethodRunCmd;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.springframework.beans.BeansException;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.context.ApplicationContext;
-import org.springframework.util.StringUtils;
+import org.junit.platform.engine.TestExecutionResult;
+import org.junit.platform.launcher.Launcher;
+import org.junit.platform.launcher.LauncherDiscoveryRequest;
+import org.junit.platform.launcher.TestExecutionListener;
+import org.junit.platform.launcher.TestIdentifier;
+import org.junit.platform.launcher.core.LauncherDiscoveryRequestBuilder;
-import javax.annotation.Resource;
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import static org.junit.platform.engine.discovery.DiscoverySelectors.selectClass;
+import static org.junit.platform.engine.discovery.DiscoverySelectors.selectMethod;
/**
* TestExecutor
@@ -26,170 +19,55 @@
* @date 2020-11-17 3:42 PM
*/
public class TestExecutor {
- private String className;
- private String methodName;
- private Map testInstanceCache = new HashMap();
- private ApplicationContext context;
+ private Launcher launcher;
- public TestExecutor(ApplicationContext context){
- this.context = context;
+ public TestExecutor(Launcher launcher) {
+ this.launcher = launcher;
}
public void execute(TestClassRunCmd cmd) throws Exception {
- setClassName(cmd.getClassName());
-
- Class> testClz = Class.forName(className);
- Object testInstance = getTestInstance(testClz);
- runClassTest(cmd, testClz, testInstance);
+ Class> testClz = Class.forName(cmd.getClassName());
+ runClassTest(cmd, testClz);
}
public void execute(TestMethodRunCmd cmd) throws Exception {
- setClassName(cmd.getClassName());
- setMethodName(cmd.getMethodName());
-
- Class> testClz = Class.forName(className);
- Object testInstance = getTestInstance(testClz);
- runMethodTest(cmd, testClz, testInstance);
+ Class> testClz = Class.forName(cmd.getClassName());
+ runMethodTest(cmd, testClz, cmd.getMethodName());
}
- private void runMethodTest(TestMethodRunCmd cmd, Class> testClz, Object testInstance) throws Exception{
- Method beforeMethod = BeanMetaUtils.findMethod(testClz, Before.class);
- Method afterMethod = BeanMetaUtils.findMethod(testClz, After.class);
- Method method = testClz.getMethod(methodName);
-
- //invoke before method
- invokeMethod(testInstance, beforeMethod);
- //notifier.fireTestStarted(method, colaDes.getDescription());
+ private void runMethodTest(TestMethodRunCmd cmd, Class> testClz, String methodName) throws Exception {
+ // 创建测试方法
+ LauncherDiscoveryRequest request = LauncherDiscoveryRequestBuilder
+ .request()
+ .selectors(selectMethod(testClz, methodName))
+ .build();
- //invoke test method
- invokeMethod(testInstance, method);
- //notifier.fireTestFinished(method, colaDes.getDescription());
-
- //invoke after method
- invokeMethod(testInstance, afterMethod);
- //notifier.fireTestRunFinished(colaDes.getDescription());
+ // 运行测试方法
+ launcher.execute(request, new MyTestExecutionListener());
}
- private Object getTestInstance(Class> testClz) throws Exception{
- if(testInstanceCache.get(className) != null) {
- return testInstanceCache.get(className);
- }
- Object testInstance = testClz.newInstance();
- injectWiredBean(testClz, testInstance);
- return testInstance;
- }
-
- private void runClassTest(TestClassRunCmd cmd, Class> testClz, Object testInstance)throws Exception{
- Method[] allMethods = testClz.getMethods();
- Method beforeMethod = null;
- Method afterMethod = null;
- List testMethods = new ArrayList();
- for (Method method : allMethods){
- Annotation[] annotations = method.getAnnotations();
- for(Annotation annotation : annotations){
- if(annotation instanceof Before){
- beforeMethod = method;
- break;
- }
- if(annotation instanceof After){
- afterMethod = method;
- break;
- }
- if(annotation instanceof Test || method.getName().startsWith("test")){
- testMethods.add(method);
- break;
- }
- }
- }
- //invoke before method
- invokeMethod(testInstance, beforeMethod);
- //invoke test methods
- for(Method testMethod: testMethods){
+ private void runClassTest(TestClassRunCmd cmd, Class> testClz) {
+ // 创建测试类
+ LauncherDiscoveryRequest request = LauncherDiscoveryRequestBuilder
+ .request()
+ .selectors(selectClass(testClz))
+ .build();
- invokeMethod(testInstance, testMethod);
-
- }
- //invoke after method
- invokeMethod(testInstance, afterMethod);
- }
-
- private static void invokeMethod(Object obj, Method method) throws Exception{
- if (method == null) {
- return;
- }
- method.invoke(obj);
+ // 运行测试方法
+ launcher.execute(request, new MyTestExecutionListener());
}
- private void injectWiredBean(Class> testClz, Object testInstance) {
- Field[] fields = testClz.getDeclaredFields();
- if(fields == null) {
- return;
- }
- for(Field field : fields) {
- String beanName = field.getName();
- Annotation autowiredAnn = field.getDeclaredAnnotation(Autowired.class);
- Annotation resourceAnn = field.getDeclaredAnnotation(Resource.class);
- if (autowiredAnn == null && resourceAnn == null) {
- continue;
+ static class MyTestExecutionListener implements TestExecutionListener {
+ @Override
+ public void executionFinished(TestIdentifier testIdentifier, TestExecutionResult testExecutionResult) {
+ if (testExecutionResult.getStatus() == TestExecutionResult.Status.FAILED) {
+ // 处理测试失败的情况,例如记录日志或发送通知
+ System.err.println("Test failed: " + testIdentifier.getDisplayName());
+ testExecutionResult.getThrowable().get().printStackTrace();
}
- trySetFieldValue(field, testInstance, beanName);
}
}
-
- private void trySetFieldValue(Field field, Object testInstance, String beanName){
- try {
- field.setAccessible(true);
- field.set(testInstance, context.getBean(beanName));
- return;
- } catch (IllegalArgumentException e){
- if(!StringUtils.isEmpty(e.getMessage()) && e.getMessage().indexOf("\\$Proxy") > 0){
- System.err.println("此错误一般是实际类被代理导致,请尝试把字段类型改为接口!");
- throw e;
- }
- }catch (BeansException | IllegalAccessException e) {
- System.err.println("根据beanName查找失败,尝试byType查找");
- }
-
- try {
- field.set(testInstance, context.getBean(field.getType()));
- } catch (Exception innerE) {
- innerE.printStackTrace();
- System.err.println("oops!!! "+beanName + " can not be injected to "+ className);
- }
- }
-
- /**
- * @return the className
- */
- public String getClassName() {
- return className;
- }
-
-
- /**
- * @param className the className to set
- */
- public void setClassName(String className) {
- this.className = className;
- }
-
-
- /**
- * @return the methodName
- */
- public String getMethodName() {
- return methodName;
- }
-
-
- /**
- * @param methodName the methodName to set
- */
- public void setMethodName(String methodName) {
- this.methodName = methodName;
- }
-
-}
\ No newline at end of file
+}
diff --git a/cola-components/cola-component-test-container/src/main/java/com/alibaba/cola/test/TestsContainer.java b/cola-components/cola-component-test-container/src/main/java/com/alibaba/cola/test/TestsContainer.java
index e924e0a8f..d09b83be2 100644
--- a/cola-components/cola-component-test-container/src/main/java/com/alibaba/cola/test/TestsContainer.java
+++ b/cola-components/cola-component-test-container/src/main/java/com/alibaba/cola/test/TestsContainer.java
@@ -2,11 +2,10 @@
import com.alibaba.cola.test.command.AbstractCommand;
import com.alibaba.cola.test.command.GuideCmd;
-import org.springframework.beans.BeansException;
+import org.junit.platform.launcher.Launcher;
+import org.junit.platform.launcher.core.LauncherFactory;
import org.springframework.context.ApplicationContext;
-import org.springframework.context.ApplicationContextAware;
-import org.springframework.stereotype.Component;
-import org.springframework.util.StringUtils;
+import org.springframework.util.ObjectUtils;
import java.io.BufferedReader;
import java.io.IOException;
@@ -26,49 +25,63 @@
* @author Frank Zhang
* @date 2020-11-17 3:35 PM
*/
-@Component
-public class TestsContainer implements ApplicationContextAware {
+public class TestsContainer {
private static ApplicationContext context;
+ private static Launcher launcher;
private static TestExecutor testExecutor;
private static AtomicBoolean initFlag = new AtomicBoolean(false);
- public static void init(ApplicationContext context){
- if(!initFlag.compareAndSet(false, true)) {
- return;
- }
- if(context == null){
- testExecutor = new TestExecutor(TestsContainer.context);
- }else {
- testExecutor = new TestExecutor(context);
+
+ /**
+ * 如果要用到Junit5的Extension功能,需要显示的提供Launcher
+ *
+ * @param context ApplicationContext to be provided
+ * @param launcher 运行Junit5测试用例的Launcher, 如果不提供,默认会自己创建一个
+ */
+ public static void start(ApplicationContext context, Launcher launcher) {
+ TestsContainer.context = context;
+ if (launcher != null) {
+ TestsContainer.launcher = launcher;
+ } else {
+ TestsContainer.launcher = LauncherFactory.create();
}
+ testExecutor = new TestExecutor(TestsContainer.launcher);
+ monitorConsole();
+ }
+
+ /**
+ * 使用Junit5的launcher之后,不再需要ApplicationContext,框架会自己处理Spring的依赖关系
+ * @param launcher
+ */
+ public static void start(Launcher launcher) {
+ start(null, launcher);
}
/**
* TestsContainer is optional to be in Spring Container
+ *
* @param context ApplicationContext to be provided
*/
public static void start(ApplicationContext context) {
- TestsContainer.context = context;
- start();
+ start(context, null);
}
/**
- * TestsContainer must be within Spring Container
+ * TestsContainer without Spring Container
*/
- public static void start(){
- init(TestsContainer.context);
- monitorConsole();
+ public static void start() {
+ start(null, null);
}
- public static void execute(String input){
- if(StringUtils.isEmpty(input)){
+ public static void execute(String input) {
+ if (ObjectUtils.isEmpty(input)) {
return;
}
input = input.trim();
AbstractCommand command = AbstractCommand.createCmd(input);
- if (command == null){
+ if (command == null) {
System.err.println("Your input is not a valid qualified name");
return;
}
@@ -80,12 +93,7 @@ public static TestExecutor getTestExecutor() {
return testExecutor;
}
- @Override
- public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
- context = applicationContext;
- }
-
- private static void monitorConsole(){
+ private static void monitorConsole() {
BufferedReader bufferRead = new BufferedReader(new InputStreamReader(
System.in));
String input = GuideCmd.GUIDE_HELP;
@@ -94,7 +102,7 @@ private static void monitorConsole(){
execute(input);
} catch (Exception e) {
e.printStackTrace();
- } catch (Error e){
+ } catch (Error e) {
e.printStackTrace();
break;
}
@@ -106,4 +114,4 @@ private static void monitorConsole(){
}
}
}
-}
\ No newline at end of file
+}
diff --git a/cola-components/cola-component-test-container/src/main/java/com/alibaba/cola/test/command/AbstractCommand.java b/cola-components/cola-component-test-container/src/main/java/com/alibaba/cola/test/command/AbstractCommand.java
index 1a70d68f8..bee53fde1 100644
--- a/cola-components/cola-component-test-container/src/main/java/com/alibaba/cola/test/command/AbstractCommand.java
+++ b/cola-components/cola-component-test-container/src/main/java/com/alibaba/cola/test/command/AbstractCommand.java
@@ -1,7 +1,7 @@
package com.alibaba.cola.test.command;
import org.apache.commons.cli.*;
-import org.springframework.util.StringUtils;
+import org.springframework.util.ObjectUtils;
import java.util.HashMap;
import java.util.Map;
@@ -13,7 +13,7 @@
* @date 2020-11-17 4:33 PM
*/
public abstract class AbstractCommand {
- private static CommandLineParser parser = new DefaultParser();
+ private static final CommandLineParser parser = new DefaultParser();
protected static AbstractCommand curCmd;
protected static AbstractCommand preCmd;
@@ -57,22 +57,6 @@ public CommandLine parse(){
return null;
}
- public Object getParam(String key){
- return params.get(key);
- }
-
- public void putParam(String key, Object value){
- params.put(key, value);
- }
-
- public String getStringParam(String key){
- Object value = params.get(key);
- if(value == null){
- return EMPTY;
- }
- return value.toString();
- }
-
public boolean isEclipseMethod(String input) {
return input.indexOf("(") > 0 ;
}
@@ -86,7 +70,7 @@ public CommandLine getCommandLine() {
}
public static AbstractCommand createCmd(String cmdRaw){
- if(StringUtils.isEmpty(cmdRaw)){
+ if(ObjectUtils.isEmpty(cmdRaw)){
return null;
}
@@ -111,4 +95,4 @@ public static AbstractCommand createCmd(String cmdRaw){
return command;
}
-}
\ No newline at end of file
+}
diff --git a/cola-components/cola-component-test-container/src/test/java/com/alibaba/cola/test/Demo.java b/cola-components/cola-component-test-container/src/test/java/com/alibaba/cola/test/Demo.java
index 90f12a9e2..93a304014 100644
--- a/cola-components/cola-component-test-container/src/test/java/com/alibaba/cola/test/Demo.java
+++ b/cola-components/cola-component-test-container/src/test/java/com/alibaba/cola/test/Demo.java
@@ -1,12 +1,16 @@
package com.alibaba.cola.test;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
+import lombok.extern.slf4j.Slf4j;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+
+@Slf4j
public class Demo {
- @Before
+ @BeforeEach
public void before(){
System.out.println("before action");
}
@@ -14,6 +18,8 @@ public void before(){
@Test
public void testOne(){
System.out.println("test one");
+ Assertions.assertEquals(1,1);
+ System.out.println("test one end");
}
@Test
@@ -21,7 +27,12 @@ public void testTwo(){
System.out.println("test two");
}
- @After
+ @Test
+ void testThree(){
+ System.out.println("test three");
+ }
+
+ @AfterEach
public void after(){
System.out.println("after action");
}
diff --git a/cola-components/cola-component-test-container/src/test/java/com/alibaba/cola/test/DemoWithExtension.java b/cola-components/cola-component-test-container/src/test/java/com/alibaba/cola/test/DemoWithExtension.java
new file mode 100644
index 000000000..f8f22984b
--- /dev/null
+++ b/cola-components/cola-component-test-container/src/test/java/com/alibaba/cola/test/DemoWithExtension.java
@@ -0,0 +1,59 @@
+package com.alibaba.cola.test;
+
+import jakarta.annotation.Resource;
+import lombok.extern.slf4j.Slf4j;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.AfterEachCallback;
+import org.junit.jupiter.api.extension.BeforeEachCallback;
+import org.junit.jupiter.api.extension.ExtendWith;
+import org.junit.jupiter.api.extension.ExtensionContext;
+import org.springframework.boot.test.context.SpringBootTest;
+
+
+@Slf4j
+@SpringBootTest(classes = SpringBootConfig.class)
+@ExtendWith(LoggingExtension.class)
+public class DemoWithExtension{
+
+ @Resource
+ private Demo demo;
+
+ @BeforeEach
+ public void before(){
+ System.out.println("=====before");
+ }
+
+ @Test
+ public void testMethod1() {
+ System.out.println("Begin testMethod1");
+ demo.testOne();
+ System.out.println("End testMethod1");
+ }
+
+ @Test
+ public void testMethod2(){
+ System.out.println("Begin testMethod2");
+ demo.testTwo();
+ System.out.println("End testMethod2");
+ }
+
+ @AfterEach
+ public void after(){
+ System.out.println("=====after");
+ }
+}
+
+
+class LoggingExtension implements BeforeEachCallback, AfterEachCallback {
+ @Override
+ public void beforeEach(ExtensionContext context) throws Exception {
+ System.out.println("Before Executing test method: " + context.getRequiredTestMethod().getName());
+ }
+
+ @Override
+ public void afterEach(ExtensionContext context) throws Exception {
+ System.out.println("After Executed test method: " + context.getRequiredTestMethod().getName());
+ }
+}
diff --git a/cola-components/cola-component-test-container/src/test/java/com/alibaba/cola/test/SpringBootConfig.java b/cola-components/cola-component-test-container/src/test/java/com/alibaba/cola/test/SpringBootConfig.java
new file mode 100644
index 000000000..27291b9d0
--- /dev/null
+++ b/cola-components/cola-component-test-container/src/test/java/com/alibaba/cola/test/SpringBootConfig.java
@@ -0,0 +1,7 @@
+package com.alibaba.cola.test;
+
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+@SpringBootApplication
+public class SpringBootConfig {
+}
diff --git a/cola-components/cola-component-test-container/src/test/java/com/alibaba/cola/test/SpringConfig.java b/cola-components/cola-component-test-container/src/test/java/com/alibaba/cola/test/SpringConfig.java
index 5f74f8f1f..9b7783e58 100644
--- a/cola-components/cola-component-test-container/src/test/java/com/alibaba/cola/test/SpringConfig.java
+++ b/cola-components/cola-component-test-container/src/test/java/com/alibaba/cola/test/SpringConfig.java
@@ -1,5 +1,6 @@
package com.alibaba.cola.test;
+import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
@@ -13,4 +14,8 @@
@ComponentScan
public class SpringConfig {
+ @Bean("demo")
+ public Demo generateDemo(){
+ return new Demo();
+ }
}
diff --git a/cola-components/cola-component-test-container/src/test/java/com/alibaba/cola/test/TestsContainerTest.java b/cola-components/cola-component-test-container/src/test/java/com/alibaba/cola/test/TestsContainerTest.java
index bf500cc3c..d4d53aff6 100644
--- a/cola-components/cola-component-test-container/src/test/java/com/alibaba/cola/test/TestsContainerTest.java
+++ b/cola-components/cola-component-test-container/src/test/java/com/alibaba/cola/test/TestsContainerTest.java
@@ -11,8 +11,6 @@
*/
public class TestsContainerTest {
public static void main(String[] args) {
- ApplicationContext applicationContext = new AnnotationConfigApplicationContext(SpringConfig.class);
-
TestsContainer.start();
}
}
diff --git a/cola-components/pom.xml b/cola-components/pom.xml
index d5dae877d..d4777df44 100644
--- a/cola-components/pom.xml
+++ b/cola-components/pom.xml
@@ -1,831 +1,830 @@
-
-
- 4.0.0
-
- com.alibaba.cola
-
- cola-components-parent
-
- 4.4.0-SNAPSHOT
-
- pom
-
- ${project.artifactId}
-
- ${project.artifactId}
-
- https://github.com/alibaba/COLA
-
-
-
-
-
- GNU Lesser General Public License v2.1
-
- https://github.com/alibaba/COLA/blob/master/LICENSE
-
- repo
-
-
-
-
-
-
-
- scm:git:https://github.com/alibaba/COLA.git
-
- scm:git:https://github.com/alibaba/COLA.git
-
+
+
+ 4.0.0
+
+ com.alibaba.cola
+
+ cola-components-parent
+
+ 4.4.0-SNAPSHOT
+
+ pom
+
+ ${project.artifactId}
+
+ ${project.artifactId}
+
https://github.com/alibaba/COLA
-
-
-
-
-
- https://github.com/alibaba/COLA/issues
-
- GitHub Issues
-
-
-
-
-
-
-
- significantfrank
-
- Frank Zhang
-
- 25216348(at)qq.com
-
-
-
- Developer
-
- Architect
-
-
-
- +8
-
- https://github.com/significantfrank
-
-
-
-
-
- oldratlee
-
- Jerry Lee
-
- oldratlee(at)gmail.com
-
-
-
- Developer
-
- CI/SCM Engineer
-
-
-
- +8
-
- https://github.com/oldratlee
-
-
-
-
-
-
-
- cola-component-dto
-
- cola-component-exception
-
- cola-component-statemachine
-
- cola-component-domain-starter
-
- cola-component-extension-starter
-
- cola-component-catchlog-starter
-
- cola-component-test-container
-
- cola-components-bom
-
- cola-component-ruleengine
-
-
-
-
-
- 1.8
-
- ${maven.compiler.source}
-
- UTF-8
-
- 2.7.5
-
-
-
-
-
-
-
- org.projectlombok
-
- lombok
-
- provided
-
-
-
-
-
-
-
- junit
-
- junit
-
- test
-
-
-
-
-
-
-
+
+
+
+
+
+ GNU Lesser General Public License v2.1
+
+ https://github.com/alibaba/COLA/blob/master/LICENSE
+
+ repo
+
+
+
+
+
+
+
+ scm:git:https://github.com/alibaba/COLA.git
+
+ scm:git:https://github.com/alibaba/COLA.git
+
+ https://github.com/alibaba/COLA
+
+
+
+
+
+ https://github.com/alibaba/COLA/issues
+
+ GitHub Issues
+
+
+
+
+
+
+
+ significantfrank
+
+ Frank Zhang
+
+ 25216348(at)qq.com
+
+
+
+ Developer
+
+ Architect
+
+
+
+ +8
+
+ https://github.com/significantfrank
+
+
+
+
+
+ oldratlee
+
+ Jerry Lee
+
+ oldratlee(at)gmail.com
+
+
+
+ Developer
+
+ CI/SCM Engineer
+
+
+
+ +8
+
+ https://github.com/oldratlee
+
+
+
+
+
+
+
+ cola-component-dto
+
+ cola-component-exception
+
+ cola-component-statemachine
+
+ cola-component-domain-starter
+
+ cola-component-extension-starter
+
+ cola-component-catchlog-starter
+
+ cola-component-test-container
+
+ cola-components-bom
+
+ cola-component-ruleengine
+
+
+
+
+ 17
+ 17
+ 17
+ UTF-8
+ 3.1.0
+
+
-
-
-
- org.springframework.boot
-
- spring-boot-dependencies
-
- ${spring.boot.version}
-
- pom
-
- import
-
-
-
-
-
-
-
- com.alibaba
-
- fastjson
-
- 1.2.83
-
- provided
-
-
-
-
-
- commons-cli
-
- commons-cli
-
- 1.5.0
-
-
-
+
+
+
+ org.projectlombok
+
+ lombok
+
+ provided
+
+
+
+
+
+
+
+ junit
+
+ junit
+
+ test
+
+
+
-
-
-
-
-
-
-
-
-
-
-
- maven-enforcer-plugin
-
-
-
-
-
-
-
- enforce
-
-
-
-
-
-
-
-
-
- 3.3.9
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- maven-resources-plugin
-
- 3.3.1
-
-
-
-
-
- maven-compiler-plugin
-
- 3.11.0
-
-
-
-
-
- maven-source-plugin
-
- 3.2.1
-
-
-
-
-
- maven-javadoc-plugin
-
- 3.6.0
-
-
-
-
-
- maven-gpg-plugin
-
- 3.1.0
-
-
-
-
-
- maven-enforcer-plugin
-
- 3.4.1
-
-
-
-
-
- maven-deploy-plugin
-
- 3.1.1
-
-
-
-
-
- org.sonatype.plugins
-
- nexus-staging-maven-plugin
-
- 1.6.13
-
-
-
-
-
- org.jacoco
-
- jacoco-maven-plugin
-
- 0.8.10
-
-
-
-
-
- pl.project13.maven
-
- git-commit-id-plugin
-
- 4.9.10
-
-
-
-
-
-
-
- org.codehaus.mojo
-
- versions-maven-plugin
-
- 2.16.0
-
-
-
- file://${maven.multiModuleProjectDirectory}/cola-component-dto/src/versions-rules.xml
-
- false
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ossrh
-
- https://oss.sonatype.org/content/repositories/snapshots
-
-
-
-
-
-
-
-
-
- gen-java-src
-
-
-
-
-
- performRelease
-
- true
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+ org.springframework.boot
+
+ spring-boot-dependencies
+
+ ${spring.boot.version}
+
+ pom
+
+ import
+
+
+
+
+
+
+
+ com.alibaba
+
+ fastjson
+
+ 1.2.83
+
+ provided
+
+
+
+
+
+ commons-cli
+
+ commons-cli
+
+ 1.5.0
+
+
+
+
+
+
+
+
+
-
-
-
- maven-source-plugin
-
-
-
-
-
- attach-sources
-
-
-
- jar
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- gen-java-doc
-
-
-
-
-
- performRelease
-
- true
-
-
-
-
-
-
-
-
-
-
-
- maven-javadoc-plugin
-
-
-
-
-
- attach-javadoc
-
-
-
- jar
-
-
-
-
-
-
-
-
-
-
-
- protected
-
- UTF-8
-
- UTF-8
-
- UTF-8
-
-
-
- --no-module-directories
-
- -quiet
-
- -J-Duser.language=en
-
- -J-Duser.country=US
-
- -Xdoclint:none
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- gen-code-cov
-
-
-
-
-
- env.TRAVIS
-
- true
-
-
-
-
-
-
-
-
-
-
-
+
-
- org.jacoco
-
- jacoco-maven-plugin
-
-
-
-
-
-
-
- prepare-agent
-
-
-
-
-
-
-
- report
-
- test
-
-
-
- report
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- gen-sign
-
-
-
-
-
- performRelease
-
- true
-
-
-
-
-
-
-
-
-
-
-
- maven-gpg-plugin
-
-
-
-
-
- sign-artifacts
-
- verify
-
-
-
- sign
-
-
-
-
-
-
-
-
-
+ add maven-enforce-plugin to make sure the right jdk is used
+ https://stackoverflow.com/a/18420462/922688
+ -->
+
+
+
+ maven-enforcer-plugin
+
+
+
+
+
+
+
+ enforce
+
+
+
+
+
+
+
+
+
+ 3.3.9
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
- gen-git-properties
-
-
-
-
-
- performRelease
-
- true
-
-
-
-
-
-
-
-
-
-
-
-
-
- pl.project13.maven
-
- git-commit-id-plugin
-
-
-
-
-
- get-the-git-infos
-
-
-
- revision
-
-
-
-
-
-
-
- validate-the-git-infos
-
-
-
- validateRevision
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- validating git dirty
-
- ${git.dirty}
-
- false
-
-
-
-
-
- true
-
-
+
+
+
+
+
+
+
+ maven-resources-plugin
+
+ 3.3.1
+
+
+
+
+
+ maven-compiler-plugin
+
+ 3.11.0
+
+
+
+
+
+ maven-source-plugin
+
+ 3.2.1
+
+
+
+
+
+ maven-javadoc-plugin
+
+ 3.6.0
+
+
+
+
+
+ maven-gpg-plugin
+
+ 3.1.0
+
+
+
+
+
+ maven-enforcer-plugin
+
+ 3.4.1
+
+
+
+
+
+ maven-deploy-plugin
+
+ 3.1.1
+
+
+
+
+
+ org.sonatype.plugins
+
+ nexus-staging-maven-plugin
+
+ 1.6.13
+
+
+
+
+
+ org.jacoco
+
+ jacoco-maven-plugin
+
+ 0.8.10
+
+
+
+
+
+ pl.project13.maven
+
+ git-commit-id-plugin
+
+ 4.9.10
+
+
+
+
+
+
+
+ org.codehaus.mojo
+
+ versions-maven-plugin
+
+ 2.16.0
+
+
+
+
+ file://${maven.multiModuleProjectDirectory}/cola-component-dto/src/versions-rules.xml
+
+
+ false
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ossrh
+
+ https://oss.sonatype.org/content/repositories/snapshots
+
+
+
+
+
+
+
+
+
+ gen-java-src
+
+
+
+
+
+ performRelease
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+ maven-source-plugin
+
+
+
+
+
+ attach-sources
+
+
+
+ jar
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ gen-java-doc
+
+
+
+
+
+ performRelease
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+ maven-javadoc-plugin
+
+
+
+
+
+ attach-javadoc
+
+
+
+ jar
+
+
+
+
+
+
+
+
+
+
+
+ protected
+
+ UTF-8
+
+ UTF-8
+
+ UTF-8
+
+
+
+ --no-module-directories
+
+ -quiet
+
+ -J-Duser.language=en
+
+ -J-Duser.country=US
+
+ -Xdoclint:none
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ gen-code-cov
+
+
+
+
+
+ env.TRAVIS
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+ org.jacoco
+
+ jacoco-maven-plugin
+
+
+
+
+
+
+
+ prepare-agent
+
+
+
+
+
+
+
+ report
+
+ test
+
+
+
+ report
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ gen-sign
+
+
+
+
+
+ performRelease
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+ maven-gpg-plugin
+
+
+
+
+
+ sign-artifacts
+
+ verify
+
+
+
+ sign
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ gen-git-properties
+
+
+
+
+
+ performRelease
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+ pl.project13.maven
+
+ git-commit-id-plugin
+
+
+
+
+
+ get-the-git-infos
+
+
+
+ revision
+
+
+
+
+
+
+
+ validate-the-git-infos
+
+
+
+ validateRevision
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ validating git dirty
+
+ ${git.dirty}
+
+ false
+
+
+
+
+
+ true
+
+
${project.build.outputDirectory}/META-INF/scm/${project.groupId}/${project.artifactId}/git.properties
-
-
-
-
-
-
-
-
-
-
-
-
-
- force-jdk11-when-release
-
-
-
-
-
- performRelease
-
- true
-
-
-
-
-
-
-
-
-
-
-
-
-
- maven-enforcer-plugin
-
-
-
-
-
-
-
- enforce
-
-
-
-
-
-
-
-
-
- 11
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- deploy-settings
-
-
-
-
-
- performRelease
-
- true
-
-
-
-
-
-
-
-
-
-
-
- org.sonatype.plugins
-
- nexus-staging-maven-plugin
-
- true
-
-
-
- ossrh
-
- https://oss.sonatype.org/
-
- true
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+ force-jdk11-when-release
+
+
+
+
+
+ performRelease
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+ maven-enforcer-plugin
+
+
+
+
+
+
+
+ enforce
+
+
+
+
+
+
+
+
+
+ 11
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ deploy-settings
+
+
+
+
+
+ performRelease
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+ org.sonatype.plugins
+
+ nexus-staging-maven-plugin
+
+ true
+
+
+
+ ossrh
+
+ https://oss.sonatype.org/
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+