Fixes Move org.asciidoctor.spi.ProcessorFactory to org.asciidoctor.extension to avoid cyclic dependencies between these 2 packages.
MODIFY
asciidoctorj-api/src/main/java/org/asciidoctor/extension/BaseProcessor.java
asciidoctorj-api/src/main/java/org/asciidoctor/extension/BaseProcessor.java
@@ -14,7 +14,6 @@ import org.asciidoctor.ast.Section;
import org.asciidoctor.ast.StructuralNode;
import org.asciidoctor.ast.Table;
import org.asciidoctor.log.LogRecord;
-import org.asciidoctor.spi.ProcessorFactory;
import java.util.HashMap;
import java.util.Iterator;

ADD
asciidoctorj-api/src/main/java/org/asciidoctor/extension/ProcessorFactory.java
+package org.asciidoctor.extension;
+
+/**
+ * An implementation of the AsciidoctorJ API has to implement this interface.
+ * Every instance of a Processor will call this method to get a delegate of the {@link Processor}
+ * interface that has to implement functionalities like creating AST nodes etc.
+ */
+public interface ProcessorFactory {
+
+ Processor createProcessorDelegate();
+
+}

DELETE
asciidoctorj-api/src/main/java/org/asciidoctor/spi/ProcessorFactory.java
-package org.asciidoctor.spi;
-
-import org.asciidoctor.extension.Processor;
-
-public interface ProcessorFactory {
-
- Processor createProcessorDelegate();
-
-}

MODIFY
asciidoctorj-core/src/main/java/org/asciidoctor/jruby/internal/ProcessorFactoryImpl.java
asciidoctorj-core/src/main/java/org/asciidoctor/jruby/internal/ProcessorFactoryImpl.java
@@ -2,7 +2,7 @@ package org.asciidoctor.jruby.internal;
import org.asciidoctor.extension.Processor;
import org.asciidoctor.jruby.extension.internal.JRubyProcessor;
-import org.asciidoctor.spi.ProcessorFactory;
+import org.asciidoctor.extension.ProcessorFactory;
public class ProcessorFactoryImpl implements ProcessorFactory {

RENAME
asciidoctorj-core/src/main/resources/META-INF/services/org.asciidoctor.spi.ProcessorFactory
asciidoctorj-core/src/main/resources/META-INF/services/org.asciidoctor.extension.ProcessorFactory
Fixes #762. Move org.asciidoctor.spi.ProcessorFactory to org.asciidoctor.extension to avoid cyclic dependencies between these 2 packages.