Create a new module for error-handler (#1469) (#1470)
diff --git a/elasticjob-error-handler/elasticjob-error-handler-email/pom.xml b/elasticjob-error-handler/elasticjob-error-handler-email/pom.xml
new file mode 100644
index 0000000..dc65635
--- /dev/null
+++ b/elasticjob-error-handler/elasticjob-error-handler-email/pom.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one or more
+ ~ contributor license agreements. See the NOTICE file distributed with
+ ~ this work for additional information regarding copyright ownership.
+ ~ The ASF licenses this file to You under the Apache License, Version 2.0
+ ~ (the "License"); you may not use this file except in compliance with
+ ~ the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<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/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.shardingsphere.elasticjob</groupId>
+ <artifactId>elasticjob-error-handler</artifactId>
+ <version>3.0.0-beta-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>elasticjob-error-handler-email</artifactId>
+</project>
diff --git a/elasticjob-error-handler/elasticjob-error-handler-general/pom.xml b/elasticjob-error-handler/elasticjob-error-handler-general/pom.xml
new file mode 100644
index 0000000..1093a8c
--- /dev/null
+++ b/elasticjob-error-handler/elasticjob-error-handler-general/pom.xml
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one or more
+ ~ contributor license agreements. See the NOTICE file distributed with
+ ~ this work for additional information regarding copyright ownership.
+ ~ The ASF licenses this file to You under the Apache License, Version 2.0
+ ~ (the "License"); you may not use this file except in compliance with
+ ~ the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<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/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.shardingsphere.elasticjob</groupId>
+ <artifactId>elasticjob-error-handler</artifactId>
+ <version>3.0.0-beta-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>elasticjob-error-handler-general</artifactId>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.shardingsphere.elasticjob</groupId>
+ <artifactId>elasticjob-infra-common</artifactId>
+ <version>${project.parent.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.projectlombok</groupId>
+ <artifactId>lombok</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.mockito</groupId>
+ <artifactId>mockito-core</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.mockito</groupId>
+ <artifactId>mockito-inline</artifactId>
+ </dependency>
+ </dependencies>
+</project>
diff --git a/elasticjob-infra/elasticjob-infra-common/src/main/java/org/apache/shardingsphere/elasticjob/infra/handler/error/JobErrorHandler.java b/elasticjob-error-handler/elasticjob-error-handler-general/src/main/java/org/apache/shardingsphere/elasticjob/error/handler/JobErrorHandler.java
similarity index 94%
rename from elasticjob-infra/elasticjob-infra-common/src/main/java/org/apache/shardingsphere/elasticjob/infra/handler/error/JobErrorHandler.java
rename to elasticjob-error-handler/elasticjob-error-handler-general/src/main/java/org/apache/shardingsphere/elasticjob/error/handler/JobErrorHandler.java
index f438f1e..934b265 100644
--- a/elasticjob-infra/elasticjob-infra-common/src/main/java/org/apache/shardingsphere/elasticjob/infra/handler/error/JobErrorHandler.java
+++ b/elasticjob-error-handler/elasticjob-error-handler-general/src/main/java/org/apache/shardingsphere/elasticjob/error/handler/JobErrorHandler.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.elasticjob.infra.handler.error;
+package org.apache.shardingsphere.elasticjob.error.handler;
import org.apache.shardingsphere.elasticjob.infra.spi.TypedSPI;
diff --git a/elasticjob-infra/elasticjob-infra-common/src/main/java/org/apache/shardingsphere/elasticjob/infra/handler/error/JobErrorHandlerFactory.java b/elasticjob-error-handler/elasticjob-error-handler-general/src/main/java/org/apache/shardingsphere/elasticjob/error/handler/JobErrorHandlerFactory.java
similarity index 96%
rename from elasticjob-infra/elasticjob-infra-common/src/main/java/org/apache/shardingsphere/elasticjob/infra/handler/error/JobErrorHandlerFactory.java
rename to elasticjob-error-handler/elasticjob-error-handler-general/src/main/java/org/apache/shardingsphere/elasticjob/error/handler/JobErrorHandlerFactory.java
index d97b79f..e401d5b 100644
--- a/elasticjob-infra/elasticjob-infra-common/src/main/java/org/apache/shardingsphere/elasticjob/infra/handler/error/JobErrorHandlerFactory.java
+++ b/elasticjob-error-handler/elasticjob-error-handler-general/src/main/java/org/apache/shardingsphere/elasticjob/error/handler/JobErrorHandlerFactory.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.elasticjob.infra.handler.error;
+package org.apache.shardingsphere.elasticjob.error.handler;
import com.google.common.base.Strings;
import lombok.AccessLevel;
diff --git a/elasticjob-infra/elasticjob-infra-common/src/main/java/org/apache/shardingsphere/elasticjob/infra/handler/error/impl/IgnoreJobErrorHandler.java b/elasticjob-error-handler/elasticjob-error-handler-general/src/main/java/org/apache/shardingsphere/elasticjob/error/handler/impl/IgnoreJobErrorHandler.java
similarity index 87%
rename from elasticjob-infra/elasticjob-infra-common/src/main/java/org/apache/shardingsphere/elasticjob/infra/handler/error/impl/IgnoreJobErrorHandler.java
rename to elasticjob-error-handler/elasticjob-error-handler-general/src/main/java/org/apache/shardingsphere/elasticjob/error/handler/impl/IgnoreJobErrorHandler.java
index 70d82cd..87634c7 100644
--- a/elasticjob-infra/elasticjob-infra-common/src/main/java/org/apache/shardingsphere/elasticjob/infra/handler/error/impl/IgnoreJobErrorHandler.java
+++ b/elasticjob-error-handler/elasticjob-error-handler-general/src/main/java/org/apache/shardingsphere/elasticjob/error/handler/impl/IgnoreJobErrorHandler.java
@@ -15,9 +15,9 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.elasticjob.infra.handler.error.impl;
+package org.apache.shardingsphere.elasticjob.error.handler.impl;
-import org.apache.shardingsphere.elasticjob.infra.handler.error.JobErrorHandler;
+import org.apache.shardingsphere.elasticjob.error.handler.JobErrorHandler;
/**
* Job error handler for ignore exception.
diff --git a/elasticjob-infra/elasticjob-infra-common/src/main/java/org/apache/shardingsphere/elasticjob/infra/handler/error/impl/LogJobErrorHandler.java b/elasticjob-error-handler/elasticjob-error-handler-general/src/main/java/org/apache/shardingsphere/elasticjob/error/handler/impl/LogJobErrorHandler.java
similarity index 88%
rename from elasticjob-infra/elasticjob-infra-common/src/main/java/org/apache/shardingsphere/elasticjob/infra/handler/error/impl/LogJobErrorHandler.java
rename to elasticjob-error-handler/elasticjob-error-handler-general/src/main/java/org/apache/shardingsphere/elasticjob/error/handler/impl/LogJobErrorHandler.java
index 6daab69..e0e8abc 100644
--- a/elasticjob-infra/elasticjob-infra-common/src/main/java/org/apache/shardingsphere/elasticjob/infra/handler/error/impl/LogJobErrorHandler.java
+++ b/elasticjob-error-handler/elasticjob-error-handler-general/src/main/java/org/apache/shardingsphere/elasticjob/error/handler/impl/LogJobErrorHandler.java
@@ -15,10 +15,10 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.elasticjob.infra.handler.error.impl;
+package org.apache.shardingsphere.elasticjob.error.handler.impl;
-import org.apache.shardingsphere.elasticjob.infra.handler.error.JobErrorHandler;
import lombok.extern.slf4j.Slf4j;
+import org.apache.shardingsphere.elasticjob.error.handler.JobErrorHandler;
/**
* Job error handler for log error message.
diff --git a/elasticjob-infra/elasticjob-infra-common/src/main/java/org/apache/shardingsphere/elasticjob/infra/handler/error/impl/ThrowJobErrorHandler.java b/elasticjob-error-handler/elasticjob-error-handler-general/src/main/java/org/apache/shardingsphere/elasticjob/error/handler/impl/ThrowJobErrorHandler.java
similarity index 88%
rename from elasticjob-infra/elasticjob-infra-common/src/main/java/org/apache/shardingsphere/elasticjob/infra/handler/error/impl/ThrowJobErrorHandler.java
rename to elasticjob-error-handler/elasticjob-error-handler-general/src/main/java/org/apache/shardingsphere/elasticjob/error/handler/impl/ThrowJobErrorHandler.java
index 29c8d7d..e5607e6 100644
--- a/elasticjob-infra/elasticjob-infra-common/src/main/java/org/apache/shardingsphere/elasticjob/infra/handler/error/impl/ThrowJobErrorHandler.java
+++ b/elasticjob-error-handler/elasticjob-error-handler-general/src/main/java/org/apache/shardingsphere/elasticjob/error/handler/impl/ThrowJobErrorHandler.java
@@ -15,10 +15,10 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.elasticjob.infra.handler.error.impl;
+package org.apache.shardingsphere.elasticjob.error.handler.impl;
+import org.apache.shardingsphere.elasticjob.error.handler.JobErrorHandler;
import org.apache.shardingsphere.elasticjob.infra.exception.JobSystemException;
-import org.apache.shardingsphere.elasticjob.infra.handler.error.JobErrorHandler;
/**
* Job error handler for throw exception.
diff --git a/elasticjob-error-handler/elasticjob-error-handler-general/src/main/resources/META-INF/services/org.apache.shardingsphere.elasticjob.error.handler.JobErrorHandler b/elasticjob-error-handler/elasticjob-error-handler-general/src/main/resources/META-INF/services/org.apache.shardingsphere.elasticjob.error.handler.JobErrorHandler
new file mode 100644
index 0000000..76db4ce
--- /dev/null
+++ b/elasticjob-error-handler/elasticjob-error-handler-general/src/main/resources/META-INF/services/org.apache.shardingsphere.elasticjob.error.handler.JobErrorHandler
@@ -0,0 +1,20 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+org.apache.shardingsphere.elasticjob.error.handler.impl.LogJobErrorHandler
+org.apache.shardingsphere.elasticjob.error.handler.impl.IgnoreJobErrorHandler
+org.apache.shardingsphere.elasticjob.error.handler.impl.ThrowJobErrorHandler
diff --git a/elasticjob-infra/elasticjob-infra-common/src/test/java/org/apache/shardingsphere/elasticjob/infra/handler/error/JobErrorHandlerFactoryTest.java b/elasticjob-error-handler/elasticjob-error-handler-general/src/test/java/org/apache/shardingsphere/elasticjob/error/handler/JobErrorHandlerFactoryTest.java
similarity index 85%
rename from elasticjob-infra/elasticjob-infra-common/src/test/java/org/apache/shardingsphere/elasticjob/infra/handler/error/JobErrorHandlerFactoryTest.java
rename to elasticjob-error-handler/elasticjob-error-handler-general/src/test/java/org/apache/shardingsphere/elasticjob/error/handler/JobErrorHandlerFactoryTest.java
index db19406..f9e5ec1 100644
--- a/elasticjob-infra/elasticjob-infra-common/src/test/java/org/apache/shardingsphere/elasticjob/infra/handler/error/JobErrorHandlerFactoryTest.java
+++ b/elasticjob-error-handler/elasticjob-error-handler-general/src/test/java/org/apache/shardingsphere/elasticjob/error/handler/JobErrorHandlerFactoryTest.java
@@ -15,11 +15,11 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.elasticjob.infra.handler.error;
+package org.apache.shardingsphere.elasticjob.error.handler;
+import org.apache.shardingsphere.elasticjob.error.handler.impl.LogJobErrorHandler;
+import org.apache.shardingsphere.elasticjob.error.handler.impl.ThrowJobErrorHandler;
import org.apache.shardingsphere.elasticjob.infra.exception.JobConfigurationException;
-import org.apache.shardingsphere.elasticjob.infra.handler.error.impl.LogJobErrorHandler;
-import org.apache.shardingsphere.elasticjob.infra.handler.error.impl.ThrowJobErrorHandler;
import org.junit.Test;
import static org.hamcrest.CoreMatchers.instanceOf;
diff --git a/elasticjob-infra/elasticjob-infra-common/src/test/java/org/apache/shardingsphere/elasticjob/infra/handler/error/impl/IgnoreJobErrorHandlerTest.java b/elasticjob-error-handler/elasticjob-error-handler-general/src/test/java/org/apache/shardingsphere/elasticjob/error/handler/impl/IgnoreJobErrorHandlerTest.java
similarity index 93%
rename from elasticjob-infra/elasticjob-infra-common/src/test/java/org/apache/shardingsphere/elasticjob/infra/handler/error/impl/IgnoreJobErrorHandlerTest.java
rename to elasticjob-error-handler/elasticjob-error-handler-general/src/test/java/org/apache/shardingsphere/elasticjob/error/handler/impl/IgnoreJobErrorHandlerTest.java
index 69c35e9..f868ca2 100644
--- a/elasticjob-infra/elasticjob-infra-common/src/test/java/org/apache/shardingsphere/elasticjob/infra/handler/error/impl/IgnoreJobErrorHandlerTest.java
+++ b/elasticjob-error-handler/elasticjob-error-handler-general/src/test/java/org/apache/shardingsphere/elasticjob/error/handler/impl/IgnoreJobErrorHandlerTest.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.elasticjob.infra.handler.error.impl;
+package org.apache.shardingsphere.elasticjob.error.handler.impl;
import org.junit.Test;
diff --git a/elasticjob-infra/elasticjob-infra-common/src/test/java/org/apache/shardingsphere/elasticjob/infra/handler/error/impl/LogJobErrorHandlerTest.java b/elasticjob-error-handler/elasticjob-error-handler-general/src/test/java/org/apache/shardingsphere/elasticjob/error/handler/impl/LogJobErrorHandlerTest.java
similarity index 96%
rename from elasticjob-infra/elasticjob-infra-common/src/test/java/org/apache/shardingsphere/elasticjob/infra/handler/error/impl/LogJobErrorHandlerTest.java
rename to elasticjob-error-handler/elasticjob-error-handler-general/src/test/java/org/apache/shardingsphere/elasticjob/error/handler/impl/LogJobErrorHandlerTest.java
index cf49563..3307881 100644
--- a/elasticjob-infra/elasticjob-infra-common/src/test/java/org/apache/shardingsphere/elasticjob/infra/handler/error/impl/LogJobErrorHandlerTest.java
+++ b/elasticjob-error-handler/elasticjob-error-handler-general/src/test/java/org/apache/shardingsphere/elasticjob/error/handler/impl/LogJobErrorHandlerTest.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.elasticjob.infra.handler.error.impl;
+package org.apache.shardingsphere.elasticjob.error.handler.impl;
import lombok.SneakyThrows;
import org.junit.Test;
diff --git a/elasticjob-infra/elasticjob-infra-common/src/test/java/org/apache/shardingsphere/elasticjob/infra/handler/error/impl/ThrowJobErrorHandlerTest.java b/elasticjob-error-handler/elasticjob-error-handler-general/src/test/java/org/apache/shardingsphere/elasticjob/error/handler/impl/ThrowJobErrorHandlerTest.java
similarity index 93%
rename from elasticjob-infra/elasticjob-infra-common/src/test/java/org/apache/shardingsphere/elasticjob/infra/handler/error/impl/ThrowJobErrorHandlerTest.java
rename to elasticjob-error-handler/elasticjob-error-handler-general/src/test/java/org/apache/shardingsphere/elasticjob/error/handler/impl/ThrowJobErrorHandlerTest.java
index e23725d..1653900 100644
--- a/elasticjob-infra/elasticjob-infra-common/src/test/java/org/apache/shardingsphere/elasticjob/infra/handler/error/impl/ThrowJobErrorHandlerTest.java
+++ b/elasticjob-error-handler/elasticjob-error-handler-general/src/test/java/org/apache/shardingsphere/elasticjob/error/handler/impl/ThrowJobErrorHandlerTest.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.elasticjob.infra.handler.error.impl;
+package org.apache.shardingsphere.elasticjob.error.handler.impl;
import org.apache.shardingsphere.elasticjob.infra.exception.JobSystemException;
import org.junit.Test;
diff --git a/elasticjob-error-handler/elasticjob-error-handler-sms/pom.xml b/elasticjob-error-handler/elasticjob-error-handler-sms/pom.xml
new file mode 100644
index 0000000..32bf986
--- /dev/null
+++ b/elasticjob-error-handler/elasticjob-error-handler-sms/pom.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one or more
+ ~ contributor license agreements. See the NOTICE file distributed with
+ ~ this work for additional information regarding copyright ownership.
+ ~ The ASF licenses this file to You under the Apache License, Version 2.0
+ ~ (the "License"); you may not use this file except in compliance with
+ ~ the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<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/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.shardingsphere.elasticjob</groupId>
+ <artifactId>elasticjob-error-handler</artifactId>
+ <version>3.0.0-beta-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>elasticjob-error-handler-sms</artifactId>
+</project>
diff --git a/elasticjob-error-handler/pom.xml b/elasticjob-error-handler/pom.xml
new file mode 100644
index 0000000..4c93759
--- /dev/null
+++ b/elasticjob-error-handler/pom.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one or more
+ ~ contributor license agreements. See the NOTICE file distributed with
+ ~ this work for additional information regarding copyright ownership.
+ ~ The ASF licenses this file to You under the Apache License, Version 2.0
+ ~ (the "License"); you may not use this file except in compliance with
+ ~ the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<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/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.shardingsphere.elasticjob</groupId>
+ <artifactId>elasticjob</artifactId>
+ <version>3.0.0-beta-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>elasticjob-error-handler</artifactId>
+ <packaging>pom</packaging>
+
+ <modules>
+ <module>elasticjob-error-handler-general</module>
+ <module>elasticjob-error-handler-email</module>
+ <module>elasticjob-error-handler-sms</module>
+ </modules>
+</project>
diff --git a/elasticjob-executor/elasticjob-executor-kernel/pom.xml b/elasticjob-executor/elasticjob-executor-kernel/pom.xml
index cf404e4..3681ee3 100644
--- a/elasticjob-executor/elasticjob-executor-kernel/pom.xml
+++ b/elasticjob-executor/elasticjob-executor-kernel/pom.xml
@@ -42,6 +42,11 @@
<artifactId>elasticjob-tracing-api</artifactId>
<version>${project.parent.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.apache.shardingsphere.elasticjob</groupId>
+ <artifactId>elasticjob-error-handler-general</artifactId>
+ <version>${project.parent.version}</version>
+ </dependency>
<dependency>
<groupId>org.projectlombok</groupId>
diff --git a/elasticjob-executor/elasticjob-executor-kernel/src/main/java/org/apache/shardingsphere/elasticjob/executor/ElasticJobExecutor.java b/elasticjob-executor/elasticjob-executor-kernel/src/main/java/org/apache/shardingsphere/elasticjob/executor/ElasticJobExecutor.java
index a21428e..8e7dcf6 100644
--- a/elasticjob-executor/elasticjob-executor-kernel/src/main/java/org/apache/shardingsphere/elasticjob/executor/ElasticJobExecutor.java
+++ b/elasticjob-executor/elasticjob-executor-kernel/src/main/java/org/apache/shardingsphere/elasticjob/executor/ElasticJobExecutor.java
@@ -21,11 +21,11 @@
import org.apache.shardingsphere.elasticjob.api.ElasticJob;
import org.apache.shardingsphere.elasticjob.api.JobConfiguration;
import org.apache.shardingsphere.elasticjob.api.listener.ShardingContexts;
+import org.apache.shardingsphere.elasticjob.error.handler.JobErrorHandler;
+import org.apache.shardingsphere.elasticjob.error.handler.JobErrorHandlerFactory;
import org.apache.shardingsphere.elasticjob.infra.env.IpUtils;
import org.apache.shardingsphere.elasticjob.infra.exception.ExceptionUtils;
import org.apache.shardingsphere.elasticjob.infra.exception.JobExecutionEnvironmentException;
-import org.apache.shardingsphere.elasticjob.infra.handler.error.JobErrorHandler;
-import org.apache.shardingsphere.elasticjob.infra.handler.error.JobErrorHandlerFactory;
import org.apache.shardingsphere.elasticjob.infra.handler.threadpool.JobExecutorServiceHandlerFactory;
import org.apache.shardingsphere.elasticjob.executor.item.JobItemExecutor;
import org.apache.shardingsphere.elasticjob.executor.item.JobItemExecutorFactory;
diff --git a/pom.xml b/pom.xml
index e43cced..0d40804 100644
--- a/pom.xml
+++ b/pom.xml
@@ -33,6 +33,7 @@
<module>elasticjob-api</module>
<module>elasticjob-infra</module>
<module>elasticjob-executor</module>
+ <module>elasticjob-error-handler</module>
<module>elasticjob-lite</module>
<module>elasticjob-cloud</module>
<module>elasticjob-distribution</module>