asciidoctor / asciidoctorj

:coffee: Java bindings for Asciidoctor. Asciidoctor on the JVM!
http://asciidoctor.org
Apache License 2.0
625 stars 173 forks source link

Extensions not being registered #947

Closed rmpestano closed 4 years ago

rmpestano commented 4 years ago

Hi folks,

I'm trying to update a Jenkins plugin that uses Asciidoctor from v1.5.x to 2.x and I cannot make the extensions to get registered.

Here's how I instantiate Asciidoctor and register the extensions. The extensions I'm trying to register come from this project.

I also tried passing the plugin classloader to Asciidoctor:

         asciidoctor = org.asciidoctor.jruby.AsciidoctorJRuby.Factory.create(CukedoctorPublisher.class.getClassLoader());

And used this @robertpanzer branch which should fix some issues related to loading extensions but also didn't help.

Any hints to find out what's causing this issue? any logs I can enable?

Thanks in advance!

rmpestano commented 4 years ago

When I run integration tests with older version of the jenkins plugin (tag 2.2.2) I can see the themes folder, it's created by one of the extensions:

Screenshot 2020-09-06 at 19 31 18

Following is the previous dependency tree (the working one):

[INFO] Building Cucumber Living Documentation Plugin 2.2.2
[INFO] --------------------------------[ hpi ]---------------------------------
[INFO] 
[INFO] --- maven-dependency-plugin:3.0.0:tree (default-cli) @ cucumber-living-documentation ---
[INFO] org.jenkins-ci.plugins:cucumber-living-documentation:hpi:2.2.2
[INFO] +- com.github.cukedoctor:cukedoctor-converter:jar:1.2.1:compile
[INFO] |  +- com.fasterxml.jackson.core:jackson-core:jar:2.7.3:compile
[INFO] |  +- com.fasterxml.jackson.core:jackson-databind:jar:2.7.3:compile
[INFO] |  |  \- com.fasterxml.jackson.core:jackson-annotations:jar:2.7.0:compile
[INFO] |  +- joda-time:joda-time:jar:2.9.2:compile
[INFO] |  +- org.yaml:snakeyaml:jar:1.17:compile
[INFO] |  +- org.asciidoctor:asciidoctorj:jar:1.6.0-alpha.6:compile
[INFO] |  |  \- com.beust:jcommander:jar:1.35:runtime
[INFO] |  +- com.github.cukedoctor:cukedoctor-extension:jar:1.2.1:compile
[INFO] |  |  \- org.jsoup:jsoup:jar:1.8.3:compile
[INFO] |  +- io.github.robwin:markup-document-builder:jar:0.1.5:compile
[INFO] |  \- org.openjdk.jmh:jmh-core:jar:1.11.3:compile
[INFO] |     +- net.sf.jopt-simple:jopt-simple:jar:4.6:compile
[INFO] |     \- org.apache.commons:commons-math3:jar:3.2:compile
[INFO] +- org.asciidoctor:asciidoctorj-pdf:jar:1.5.0-alpha.16:compile
[INFO] +- org.jruby:jruby-complete:jar:9.1.15.0:compile
[INFO] +- org.jenkins-ci:symbol-annotation:jar:1.1:compile
[INFO] |  \- org.jenkins-ci:annotation-indexer:jar:1.9:compile
[INFO] +- org.jenkins-ci.plugins.workflow:workflow-job:jar:2.8:compile (optional) 
[INFO] |  \- org.jenkins-ci.plugins.workflow:workflow-support:jar:2.2:compile
[INFO] |     \- org.jboss.marshalling:jboss-marshalling-river:jar:1.4.9.Final:compile
[INFO] |        \- org.jboss.marshalling:jboss-marshalling:jar:1.4.9.Final:compile
[INFO] +- org.jenkins-ci.plugins.workflow:workflow-step-api:jar:2.10:compile (optional) 
[INFO] +- org.jenkins-ci.plugins.workflow:workflow-cps:jar:2.13:compile (optional) 
[INFO] |  +- org.jenkins-ci.plugins:script-security:jar:1.21:compile
[INFO] |  |  \- org.kohsuke:groovy-sandbox:jar:1.10:compile
[INFO] |  +- com.cloudbees:groovy-cps:jar:1.9:compile (optional) 
[INFO] |  +- org.jenkins-ci.ui:jquery-detached:jar:1.2.1:compile
[INFO] |  +- org.jenkins-ci.ui:ace-editor:jar:1.0.1:compile (optional) 
[INFO] |  \- com.cloudbees:diff4j:jar:1.2:compile (optional) 
[INFO] +- org.hamcrest:hamcrest-library:jar:1.3:test
[INFO] |  \- org.hamcrest:hamcrest-core:jar:1.3:test
[INFO] +- org.jenkins-ci.plugins.workflow:workflow-aggregator:jar:2.2:test
[INFO] |  +- org.jenkins-ci.plugins.workflow:workflow-durable-task-step:jar:2.2:test
[INFO] |  |  \- org.jenkins-ci.plugins:durable-task:jar:1.5:test
[INFO] |  +- org.jenkins-ci.plugins.workflow:workflow-cps-global-lib:jar:2.0:test
[INFO] |  |  \- org.jenkins-ci.plugins:git-server:jar:1.5:test
[INFO] |  +- org.jenkins-ci.plugins.workflow:workflow-multibranch:jar:2.8:test
[INFO] |  |  +- org.jenkins-ci.plugins:branch-api:jar:1.10:test
[INFO] |  |  \- org.jenkins-ci.plugins:cloudbees-folder:jar:5.10:test
[INFO] |  +- org.jenkins-ci.plugins:pipeline-build-step:jar:2.1:test
[INFO] |  +- org.jenkins-ci.plugins:pipeline-input-step:jar:2.0:test
[INFO] |  +- org.jenkins-ci.plugins:pipeline-stage-step:jar:2.1:test
[INFO] |  \- org.jenkins-ci.plugins.pipeline-stage-view:pipeline-stage-view:jar:1.4:test
[INFO] |     +- org.jenkins-ci.plugins.pipeline-stage-view:pipeline-rest-api:jar:1.4:test
[INFO] |     +- org.jenkins-ci.ui:handlebars:jar:1.1:test
[INFO] |     \- org.jenkins-ci.ui:momentjs:jar:1.1:test
[INFO] +- org.jenkins-ci.plugins.workflow:workflow-api:jar:2.22:test
[INFO] +- org.jenkins-ci.plugins.workflow:workflow-basic-steps:jar:2.0:test
[INFO] |  \- org.jenkins-ci.plugins:mailer:jar:1.13:test
[INFO] +- org.jenkins-ci.plugins:subversion:jar:2.8:test
[INFO] |  +- org.tmatesoft.svnkit:svnkit:jar:1.8.14:test
[INFO] |  |  +- de.regnis.q.sequence:sequence-library:jar:1.0.3:test
[INFO] |  |  +- org.tmatesoft.sqljet:sqljet:jar:1.1.10:test
[INFO] |  |  |  \- org.antlr:antlr-runtime:jar:3.4:test
[INFO] |  |  +- net.java.dev.jna:jna-platform:jar:4.1.0:test
[INFO] |  |  +- com.trilead:trilead-ssh2:jar:1.0.0-build221:test
[INFO] |  |  +- com.jcraft:jsch.agentproxy.connector-factory:jar:0.0.7:test
[INFO] |  |  |  +- com.jcraft:jsch.agentproxy.core:jar:0.0.7:test
[INFO] |  |  |  +- com.jcraft:jsch.agentproxy.usocket-jna:jar:0.0.7:test
[INFO] |  |  |  |  \- net.java.dev.jna:platform:jar:3.4.0:test
[INFO] |  |  |  +- com.jcraft:jsch.agentproxy.usocket-nc:jar:0.0.7:test
[INFO] |  |  |  +- com.jcraft:jsch.agentproxy.sshagent:jar:0.0.7:test
[INFO] |  |  |  \- com.jcraft:jsch.agentproxy.pageant:jar:0.0.7:test
[INFO] |  |  \- com.jcraft:jsch.agentproxy.svnkit-trilead-ssh2:jar:0.0.7:test
[INFO] |  +- org.jenkins-ci.plugins:mapdb-api:jar:1.0.1.0:test
[INFO] |  |  \- org.mapdb:mapdb:jar:1.0.1:test
[INFO] |  \- org.jenkins-ci.plugins:credentials:jar:2.1.4:test
[INFO] |     \- org.antlr:antlr4-runtime:jar:4.5:test
[INFO] |        \- org.abego.treelayout:org.abego.treelayout.core:jar:1.0.1:test
[INFO] +- org.jenkins-ci.plugins:scm-api:jar:2.0.8:test
[INFO] +- org.jenkins-ci.plugins.workflow:workflow-scm-step:jar:2.1:test
[INFO] +- org.jenkins-ci.plugins:git:jar:2.3.5:test
[INFO] |  +- com.infradna.tool:bridge-method-annotation:jar:1.14:provided
[INFO] |  \- org.jenkins-ci.plugins:matrix-project:jar:1.4:test
[INFO] +- org.jenkins-ci.plugins:git-client:jar:1.19.0:test
[INFO] |  +- org.eclipse.jgit:org.eclipse.jgit:jar:3.7.1.201504261725-r:test
[INFO] |  |  +- com.jcraft:jsch:jar:0.1.50:test
[INFO] |  |  \- com.googlecode.javaewah:JavaEWAH:jar:0.7.9:test
[INFO] |  +- org.eclipse.jgit:org.eclipse.jgit.http.server:jar:3.7.1.201504261725-r:test
[INFO] |  \- org.apache.httpcomponents:httpclient:jar:4.4.1:test
[INFO] |     +- org.apache.httpcomponents:httpcore:jar:4.4.1:test
[INFO] |     \- commons-logging:commons-logging:jar:1.2:provided
[INFO] +- org.jenkins-ci.plugins:ssh-credentials:jar:1.13:test
[INFO] +- org.jenkins-ci.plugins:structs:jar:1.9:test
[INFO] +- com.google.code.findbugs:annotations:jar:3.0.0:provided (optional) 
[INFO] +- net.jcip:jcip-annotations:jar:1.0:provided (optional) 
[INFO] +- org.codehaus.mojo:animal-sniffer-annotations:jar:1.16:provided (optional) 
[INFO] +- javax.servlet:javax.servlet-api:jar:3.1.0:provided
[INFO] +- org.jenkins-ci.main:jenkins-core:jar:2.73.3:provided
[INFO] |  +- org.jenkins-ci.plugins.icon-shim:icon-set:jar:1.0.5:provided
[INFO] |  +- org.jenkins-ci.main:remoting:jar:3.10.2:provided
[INFO] |  |  \- org.jenkins-ci:constant-pool-scanner:jar:1.2:provided
[INFO] |  +- org.jenkins-ci.main:cli:jar:2.73.3:provided
[INFO] |  +- org.jenkins-ci:version-number:jar:1.4:provided
[INFO] |  +- org.jenkins-ci:crypto-util:jar:1.1:provided
[INFO] |  +- org.jvnet.hudson:jtidy:jar:4aug2000r7-dev-hudson-1:provided
[INFO] |  +- com.google.inject:guice:jar:4.0:provided
[INFO] |  |  +- javax.inject:javax.inject:jar:1:provided
[INFO] |  |  \- aopalliance:aopalliance:jar:1.0:provided
[INFO] |  +- org.jruby.ext.posix:jna-posix:jar:1.0.3-jenkins-1:provided
[INFO] |  +- com.github.jnr:jnr-posix:jar:3.0.41:provided
[INFO] |  |  +- com.github.jnr:jnr-ffi:jar:2.1.4:provided
[INFO] |  |  |  +- com.github.jnr:jffi:jar:1.2.15:provided
[INFO] |  |  |  +- com.github.jnr:jffi:jar:native:1.2.15:provided
[INFO] |  |  |  +- org.ow2.asm:asm:jar:5.0.3:provided
[INFO] |  |  |  +- org.ow2.asm:asm-commons:jar:5.0.3:provided
[INFO] |  |  |  +- org.ow2.asm:asm-analysis:jar:5.0.3:provided
[INFO] |  |  |  +- org.ow2.asm:asm-tree:jar:5.0.3:provided
[INFO] |  |  |  +- org.ow2.asm:asm-util:jar:5.0.3:provided
[INFO] |  |  |  \- com.github.jnr:jnr-x86asm:jar:1.0.2:provided
[INFO] |  |  \- com.github.jnr:jnr-constants:jar:0.9.9:provided
[INFO] |  +- org.kohsuke:trilead-putty-extension:jar:1.2:provided
[INFO] |  +- org.jenkins-ci:trilead-ssh2:jar:build-217-jenkins-11:provided
[INFO] |  |  +- net.i2p.crypto:eddsa:jar:0.2.0:provided
[INFO] |  |  \- org.connectbot.jbcrypt:jbcrypt:jar:1.0.0:provided
[INFO] |  +- org.kohsuke.stapler:stapler-groovy:jar:1.250:provided
[INFO] |  |  \- org.kohsuke.stapler:stapler-jelly:jar:1.250:provided
[INFO] |  |     +- org.jenkins-ci:commons-jelly:jar:1.1-jenkins-20120928:provided
[INFO] |  |     \- org.jenkins-ci.dom4j:dom4j:jar:1.6.1-jenkins-4:provided
[INFO] |  +- org.kohsuke.stapler:stapler-jrebel:jar:1.250:provided
[INFO] |  |  \- org.kohsuke.stapler:stapler:jar:1.250:provided
[INFO] |  |     +- javax.annotation:javax.annotation-api:jar:1.2:provided
[INFO] |  |     +- commons-discovery:commons-discovery:jar:0.4:provided
[INFO] |  |     \- org.jvnet:tiger-types:jar:2.2:provided
[INFO] |  +- org.kohsuke:windows-package-checker:jar:1.2:provided
[INFO] |  +- org.kohsuke.stapler:stapler-adjunct-zeroclipboard:jar:1.3.5-1:provided
[INFO] |  +- org.kohsuke.stapler:stapler-adjunct-timeline:jar:1.5:provided
[INFO] |  +- org.kohsuke.stapler:stapler-adjunct-codemirror:jar:1.3:provided
[INFO] |  +- org.kohsuke.stapler:json-lib:jar:2.4-jenkins-2:provided
[INFO] |  |  \- net.sf.ezmorph:ezmorph:jar:1.0.6:provided
[INFO] |  +- commons-httpclient:commons-httpclient:jar:3.1-jenkins-1:provided
[INFO] |  +- args4j:args4j:jar:2.0.31:provided
[INFO] |  +- org.jenkins-ci:bytecode-compatibility-transformer:jar:1.8:provided
[INFO] |  |  \- org.kohsuke:asm5:jar:5.0.1:provided
[INFO] |  +- org.jenkins-ci:task-reactor:jar:1.4:provided
[INFO] |  +- org.jvnet.localizer:localizer:jar:1.24:compile
[INFO] |  +- antlr:antlr:jar:2.7.6:provided
[INFO] |  +- org.jvnet.hudson:xstream:jar:1.4.7-jenkins-1:provided
[INFO] |  +- jfree:jfreechart:jar:1.0.9:provided
[INFO] |  |  \- jfree:jcommon:jar:1.0.12:provided
[INFO] |  +- org.apache.ant:ant:jar:1.8.4:provided
[INFO] |  |  \- org.apache.ant:ant-launcher:jar:1.8.4:provided
[INFO] |  +- commons-io:commons-io:jar:2.4:compile
[INFO] |  +- commons-lang:commons-lang:jar:2.6:provided
[INFO] |  +- commons-digester:commons-digester:jar:2.1:provided
[INFO] |  +- commons-beanutils:commons-beanutils:jar:1.8.3:provided
[INFO] |  +- org.apache.commons:commons-compress:jar:1.10:provided
[INFO] |  +- javax.mail:mail:jar:1.4.4:provided
[INFO] |  +- org.jvnet.hudson:activation:jar:1.1.1-hudson-1:provided
[INFO] |  +- jaxen:jaxen:jar:1.1-beta-11:provided
[INFO] |  +- commons-jelly:commons-jelly-tags-fmt:jar:1.0:provided
[INFO] |  +- commons-jelly:commons-jelly-tags-xml:jar:1.1:provided
[INFO] |  +- org.jvnet.hudson:commons-jelly-tags-define:jar:1.0.1-hudson-20071021:provided
[INFO] |  +- org.jenkins-ci:commons-jexl:jar:1.1-jenkins-20111212:provided
[INFO] |  +- org.acegisecurity:acegi-security:jar:1.0.7:provided
[INFO] |  |  +- org.springframework:spring-jdbc:jar:1.2.9:provided
[INFO] |  |  |  \- org.springframework:spring-dao:jar:1.2.9:provided
[INFO] |  |  +- oro:oro:jar:2.0.8:provided
[INFO] |  |  \- log4j:log4j:jar:1.2.17:provided
[INFO] |  +- org.codehaus.groovy:groovy-all:jar:2.4.11:provided
[INFO] |  +- jline:jline:jar:2.12:provided
[INFO] |  +- org.fusesource.jansi:jansi:jar:1.11:provided
[INFO] |  +- org.springframework:spring-webmvc:jar:2.5.6.SEC03:provided
[INFO] |  |  +- org.springframework:spring-beans:jar:2.5.6.SEC03:provided
[INFO] |  |  +- org.springframework:spring-context:jar:2.5.6.SEC03:provided
[INFO] |  |  +- org.springframework:spring-context-support:jar:2.5.6.SEC03:provided
[INFO] |  |  \- org.springframework:spring-web:jar:2.5.6.SEC03:provided
[INFO] |  +- org.springframework:spring-core:jar:2.5.6.SEC03:provided
[INFO] |  +- org.springframework:spring-aop:jar:2.5.6.SEC03:provided
[INFO] |  +- xpp3:xpp3:jar:1.1.4c:provided
[INFO] |  +- javax.servlet:jstl:jar:1.1.0:provided
[INFO] |  +- com.sun.xml.txw2:txw2:jar:20110809:provided
[INFO] |  |  +- javax.xml.stream:stax-api:jar:1.0-2:provided
[INFO] |  |  \- relaxngDatatype:relaxngDatatype:jar:20020414:provided
[INFO] |  +- commons-collections:commons-collections:jar:3.2.2:provided
[INFO] |  +- org.jvnet.winp:winp:jar:1.25:provided
[INFO] |  +- org.jenkins-ci:memory-monitor:jar:1.9:provided
[INFO] |  +- org.codehaus.woodstox:wstx-asl:jar:3.2.9:provided
[INFO] |  |  \- stax:stax-api:jar:1.0.1:provided
[INFO] |  +- org.jenkins-ci:jmdns:jar:3.4.0-jenkins-3:provided
[INFO] |  +- net.java.dev.jna:jna:jar:4.2.1:provided
[INFO] |  +- org.kohsuke:akuma:jar:1.10:provided
[INFO] |  +- org.kohsuke:libpam4j:jar:1.8:provided
[INFO] |  +- org.kohsuke:libzfs:jar:0.8:provided
[INFO] |  +- com.sun.solaris:embedded_su4j:jar:1.1:provided
[INFO] |  +- net.java.sezpoz:sezpoz:jar:1.12:provided
[INFO] |  +- org.kohsuke.jinterop:j-interop:jar:2.0.6-kohsuke-1:provided
[INFO] |  |  \- org.kohsuke.jinterop:j-interopdeps:jar:2.0.6-kohsuke-1:provided
[INFO] |  |     \- org.samba.jcifs:jcifs:jar:1.2.19:provided
[INFO] |  +- org.jvnet.robust-http-client:robust-http-client:jar:1.2:provided
[INFO] |  +- commons-codec:commons-codec:jar:1.8:provided
[INFO] |  +- org.kohsuke:access-modifier-annotation:jar:1.11:provided
[INFO] |  +- commons-fileupload:commons-fileupload:jar:1.3.1-jenkins-2:provided
[INFO] |  +- com.google.guava:guava:jar:11.0.1:compile
[INFO] |  |  \- com.google.code.findbugs:jsr305:jar:1.3.9:compile
[INFO] |  \- com.jcraft:jzlib:jar:1.1.3-kohsuke-1:provided
[INFO] +- org.jenkins-ci.main:jenkins-war:executable-war:2.73.3:test
[INFO] |  +- org.jenkins-ci.modules:instance-identity:jar:2.1:test
[INFO] |  |  \- io.github.stephenc.crypto:self-signed-cert-generator:jar:1.0.0:test
[INFO] |  +- org.jenkins-ci.modules:ssh-cli-auth:jar:1.4:test
[INFO] |  +- org.jenkins-ci.modules:slave-installer:jar:1.5:test
[INFO] |  +- org.jenkins-ci.modules:windows-slave-installer:jar:1.9.1:test
[INFO] |  +- org.jenkins-ci.modules:launchd-slave-installer:jar:1.2:test
[INFO] |  +- org.jenkins-ci.modules:upstart-slave-installer:jar:1.1:test
[INFO] |  +- org.jenkins-ci.modules:systemd-slave-installer:jar:1.1:test
[INFO] |  +- org.jenkins-ci.modules:sshd:jar:2.0:test
[INFO] |  |  \- org.apache.sshd:sshd-core:jar:1.6.0:test
[INFO] |  +- org.jenkins-ci.ui:jquery-detached:jar:core-assets:1.2.1:test
[INFO] |  +- org.jenkins-ci.ui:bootstrap:jar:core-assets:1.3.2:test
[INFO] |  \- org.jenkins-ci.ui:handlebars:jar:core-assets:1.1.1:test
[INFO] +- org.jenkins-ci.main:jenkins-test-harness:jar:2.34:test
[INFO] |  +- org.eclipse.jetty:jetty-webapp:jar:9.4.5.v20170502:test
[INFO] |  |  +- org.eclipse.jetty:jetty-xml:jar:9.4.5.v20170502:test
[INFO] |  |  |  \- org.eclipse.jetty:jetty-util:jar:9.4.5.v20170502:test
[INFO] |  |  \- org.eclipse.jetty:jetty-servlet:jar:9.4.5.v20170502:test
[INFO] |  +- org.eclipse.jetty:jetty-security:jar:9.4.5.v20170502:test
[INFO] |  |  \- org.eclipse.jetty:jetty-server:jar:9.4.5.v20170502:test
[INFO] |  |     +- org.eclipse.jetty:jetty-http:jar:9.4.5.v20170502:test
[INFO] |  |     \- org.eclipse.jetty:jetty-io:jar:9.4.5.v20170502:test
[INFO] |  +- org.jenkins-ci.main:jenkins-test-harness-htmlunit:jar:2.18-1:test
[INFO] |  |  +- xalan:xalan:jar:2.7.2:test
[INFO] |  |  +- xalan:serializer:jar:2.7.2:test
[INFO] |  |  +- org.apache.commons:commons-lang3:jar:3.4:test
[INFO] |  |  +- xerces:xercesImpl:jar:2.11.0:test
[INFO] |  |  +- xml-apis:xml-apis:jar:1.4.01:test
[INFO] |  |  +- net.sourceforge.nekohtml:nekohtml:jar:1.9.22:test
[INFO] |  |  +- net.sourceforge.cssparser:cssparser:jar:0.9.16:test
[INFO] |  |  +- org.w3c.css:sac:jar:1.3:test
[INFO] |  |  +- org.eclipse.jetty.websocket:websocket-client:jar:9.2.12.v20150709:test
[INFO] |  |  +- org.eclipse.jetty.websocket:websocket-common:jar:9.2.12.v20150709:test
[INFO] |  |  \- org.eclipse.jetty.websocket:websocket-api:jar:9.2.12.v20150709:test
[INFO] |  +- org.jvnet.hudson:embedded-rhino-debugger:jar:1.2:test
[INFO] |  +- org.netbeans.modules:org-netbeans-insane:jar:RELEASE72:test
[INFO] |  \- com.github.stephenc.findbugs:findbugs-annotations:jar:1.3.9-1:test
[INFO] +- org.jenkins-ci:test-annotations:jar:1.2:test
[INFO] +- junit:junit:jar:4.12:test
[INFO] +- org.slf4j:slf4j-api:jar:1.7.25:compile (optional) 
[INFO] +- org.slf4j:log4j-over-slf4j:jar:1.7.25:test
[INFO] +- org.slf4j:jcl-over-slf4j:jar:1.7.25:test
[INFO] \- org.slf4j:slf4j-jdk14:jar:1.7.25:test

And here is the current one:

[INFO] Building Cucumber Living Documentation Plugin 2.2.3-SNAPSHOT
[INFO] --------------------------------[ hpi ]---------------------------------
[INFO] 
[INFO] --- maven-dependency-plugin:3.0.0:tree (default-cli) @ cucumber-living-documentation ---
[INFO] org.jenkins-ci.plugins:cucumber-living-documentation:hpi:2.2.3-SNAPSHOT
[INFO] +- com.github.cukedoctor:cukedoctor-converter:jar:3.2:compile
[INFO] |  +- com.fasterxml.jackson.core:jackson-core:jar:2.11.0:compile
[INFO] |  +- com.fasterxml.jackson.core:jackson-databind:jar:2.11.0:compile
[INFO] |  |  \- com.fasterxml.jackson.core:jackson-annotations:jar:2.11.0:compile
[INFO] |  +- joda-time:joda-time:jar:2.9.2:compile
[INFO] |  +- org.yaml:snakeyaml:jar:1.26:compile
[INFO] |  +- com.github.cukedoctor:cukedoctor-extension:jar:3.2:compile
[INFO] |  |  \- org.jsoup:jsoup:jar:1.8.3:compile
[INFO] |  +- io.github.robwin:markup-document-builder:jar:0.1.5:compile
[INFO] |  \- org.openjdk.jmh:jmh-core:jar:1.11.3:compile
[INFO] |     +- net.sf.jopt-simple:jopt-simple:jar:4.6:compile
[INFO] |     \- org.apache.commons:commons-math3:jar:3.2:compile
[INFO] +- org.asciidoctor:asciidoctorj-pdf:jar:1.5.3:compile
[INFO] +- org.asciidoctor:asciidoctorj:jar:2.4.0:compile
[INFO] |  +- org.asciidoctor:asciidoctorj-api:jar:2.4.0:compile
[INFO] |  +- org.jruby:jruby:jar:9.2.12.0:compile
[INFO] |  |  +- org.jruby:jruby-core:jar:9.2.12.0:compile
[INFO] |  |  |  +- com.github.jnr:jnr-netdb:jar:1.1.6:compile
[INFO] |  |  |  +- com.github.jnr:jnr-enxio:jar:0.25:compile
[INFO] |  |  |  +- com.github.jnr:jnr-unixsocket:jar:0.28:compile
[INFO] |  |  |  +- com.github.jnr:jffi:jar:1.2.23:compile
[INFO] |  |  |  +- com.github.jnr:jffi:jar:native:1.2.23:compile
[INFO] |  |  |  +- org.jruby.joni:joni:jar:2.1.31:compile
[INFO] |  |  |  +- org.jruby.jcodings:jcodings:jar:1.0.46:compile
[INFO] |  |  |  +- org.jruby:dirgra:jar:0.3:compile
[INFO] |  |  |  +- com.headius:invokebinder:jar:1.11:compile
[INFO] |  |  |  +- com.headius:options:jar:1.4:compile
[INFO] |  |  |  +- com.martiansoftware:nailgun-server:jar:0.9.1:compile
[INFO] |  |  |  +- com.headius:backport9:jar:1.8:compile
[INFO] |  |  |  \- javax.annotation:javax.annotation-api:jar:1.3.1:compile
[INFO] |  |  \- org.jruby:jruby-stdlib:jar:9.2.12.0:compile
[INFO] |  \- com.beust:jcommander:jar:1.72:compile
[INFO] +- org.jruby:jruby-complete:jar:9.2.11.1:compile
[INFO] +- org.jenkins-ci:symbol-annotation:jar:1.1:compile
[INFO] |  \- org.jenkins-ci:annotation-indexer:jar:1.9:compile
[INFO] +- org.jenkins-ci.plugins.workflow:workflow-job:jar:2.8:compile (optional) 
[INFO] |  \- org.jenkins-ci.plugins.workflow:workflow-support:jar:2.2:compile
[INFO] |     \- org.jboss.marshalling:jboss-marshalling-river:jar:1.4.9.Final:compile
[INFO] |        \- org.jboss.marshalling:jboss-marshalling:jar:1.4.9.Final:compile
[INFO] +- org.jenkins-ci.plugins.workflow:workflow-step-api:jar:2.10:compile (optional) 
[INFO] +- org.jenkins-ci.plugins.workflow:workflow-cps:jar:2.13:compile (optional) 
[INFO] |  +- org.jenkins-ci.plugins:script-security:jar:1.21:compile
[INFO] |  |  \- org.kohsuke:groovy-sandbox:jar:1.10:compile
[INFO] |  +- com.cloudbees:groovy-cps:jar:1.9:compile (optional) 
[INFO] |  +- org.jenkins-ci.ui:jquery-detached:jar:1.2.1:compile
[INFO] |  +- org.jenkins-ci.ui:ace-editor:jar:1.0.1:compile (optional) 
[INFO] |  \- com.cloudbees:diff4j:jar:1.2:compile (optional) 
[INFO] +- org.hamcrest:hamcrest-library:jar:1.3:test
[INFO] |  \- org.hamcrest:hamcrest-core:jar:1.3:test
[INFO] +- org.jenkins-ci.plugins.workflow:workflow-aggregator:jar:2.2:test
[INFO] |  +- org.jenkins-ci.plugins.workflow:workflow-durable-task-step:jar:2.2:test
[INFO] |  |  \- org.jenkins-ci.plugins:durable-task:jar:1.5:test
[INFO] |  +- org.jenkins-ci.plugins.workflow:workflow-cps-global-lib:jar:2.0:test
[INFO] |  |  \- org.jenkins-ci.plugins:git-server:jar:1.5:test
[INFO] |  +- org.jenkins-ci.plugins.workflow:workflow-multibranch:jar:2.8:test
[INFO] |  |  +- org.jenkins-ci.plugins:branch-api:jar:1.10:test
[INFO] |  |  \- org.jenkins-ci.plugins:cloudbees-folder:jar:5.10:test
[INFO] |  +- org.jenkins-ci.plugins:pipeline-build-step:jar:2.1:test
[INFO] |  +- org.jenkins-ci.plugins:pipeline-input-step:jar:2.0:test
[INFO] |  +- org.jenkins-ci.plugins:pipeline-stage-step:jar:2.1:test
[INFO] |  \- org.jenkins-ci.plugins.pipeline-stage-view:pipeline-stage-view:jar:1.4:test
[INFO] |     +- org.jenkins-ci.plugins.pipeline-stage-view:pipeline-rest-api:jar:1.4:test
[INFO] |     +- org.jenkins-ci.ui:handlebars:jar:1.1:test
[INFO] |     \- org.jenkins-ci.ui:momentjs:jar:1.1:test
[INFO] +- org.jenkins-ci.plugins.workflow:workflow-api:jar:2.22:test
[INFO] +- org.jenkins-ci.plugins.workflow:workflow-basic-steps:jar:2.0:test
[INFO] |  \- org.jenkins-ci.plugins:mailer:jar:1.13:test
[INFO] +- org.jenkins-ci.plugins:subversion:jar:2.8:test
[INFO] |  +- org.tmatesoft.svnkit:svnkit:jar:1.8.14:test
[INFO] |  |  +- de.regnis.q.sequence:sequence-library:jar:1.0.3:test
[INFO] |  |  +- org.tmatesoft.sqljet:sqljet:jar:1.1.10:test
[INFO] |  |  |  \- org.antlr:antlr-runtime:jar:3.4:test
[INFO] |  |  +- net.java.dev.jna:jna-platform:jar:4.1.0:test
[INFO] |  |  +- com.trilead:trilead-ssh2:jar:1.0.0-build221:test
[INFO] |  |  +- com.jcraft:jsch.agentproxy.connector-factory:jar:0.0.7:test
[INFO] |  |  |  +- com.jcraft:jsch.agentproxy.core:jar:0.0.7:test
[INFO] |  |  |  +- com.jcraft:jsch.agentproxy.usocket-jna:jar:0.0.7:test
[INFO] |  |  |  |  \- net.java.dev.jna:platform:jar:3.4.0:test
[INFO] |  |  |  +- com.jcraft:jsch.agentproxy.usocket-nc:jar:0.0.7:test
[INFO] |  |  |  +- com.jcraft:jsch.agentproxy.sshagent:jar:0.0.7:test
[INFO] |  |  |  \- com.jcraft:jsch.agentproxy.pageant:jar:0.0.7:test
[INFO] |  |  \- com.jcraft:jsch.agentproxy.svnkit-trilead-ssh2:jar:0.0.7:test
[INFO] |  +- org.jenkins-ci.plugins:mapdb-api:jar:1.0.1.0:test
[INFO] |  |  \- org.mapdb:mapdb:jar:1.0.1:test
[INFO] |  \- org.jenkins-ci.plugins:credentials:jar:2.1.4:test
[INFO] |     \- org.antlr:antlr4-runtime:jar:4.5:test
[INFO] |        \- org.abego.treelayout:org.abego.treelayout.core:jar:1.0.1:test
[INFO] +- org.jenkins-ci.plugins:scm-api:jar:2.0.8:test
[INFO] +- org.jenkins-ci.plugins.workflow:workflow-scm-step:jar:2.1:test
[INFO] +- org.jenkins-ci.plugins:git:jar:2.3.5:test
[INFO] |  +- com.infradna.tool:bridge-method-annotation:jar:1.14:provided
[INFO] |  \- org.jenkins-ci.plugins:matrix-project:jar:1.4:test
[INFO] +- org.jenkins-ci.plugins:git-client:jar:1.19.0:test
[INFO] |  +- org.eclipse.jgit:org.eclipse.jgit:jar:3.7.1.201504261725-r:test
[INFO] |  |  +- com.jcraft:jsch:jar:0.1.50:test
[INFO] |  |  \- com.googlecode.javaewah:JavaEWAH:jar:0.7.9:test
[INFO] |  +- org.eclipse.jgit:org.eclipse.jgit.http.server:jar:3.7.1.201504261725-r:test
[INFO] |  \- org.apache.httpcomponents:httpclient:jar:4.4.1:test
[INFO] |     +- org.apache.httpcomponents:httpcore:jar:4.4.1:test
[INFO] |     \- commons-logging:commons-logging:jar:1.2:provided
[INFO] +- org.jenkins-ci.plugins:ssh-credentials:jar:1.13:test
[INFO] +- org.jenkins-ci.plugins:structs:jar:1.9:test
[INFO] +- com.google.code.findbugs:annotations:jar:3.0.0:provided (optional) 
[INFO] +- net.jcip:jcip-annotations:jar:1.0:provided (optional) 
[INFO] +- org.codehaus.mojo:animal-sniffer-annotations:jar:1.16:provided (optional) 
[INFO] +- javax.servlet:javax.servlet-api:jar:3.1.0:provided
[INFO] +- org.jenkins-ci.main:jenkins-core:jar:2.73.3:provided
[INFO] |  +- org.jenkins-ci.plugins.icon-shim:icon-set:jar:1.0.5:provided
[INFO] |  +- org.jenkins-ci.main:remoting:jar:3.10.2:provided
[INFO] |  |  \- org.jenkins-ci:constant-pool-scanner:jar:1.2:provided
[INFO] |  +- org.jenkins-ci.main:cli:jar:2.73.3:provided
[INFO] |  +- org.jenkins-ci:version-number:jar:1.4:provided
[INFO] |  +- org.jenkins-ci:crypto-util:jar:1.1:provided
[INFO] |  +- org.jvnet.hudson:jtidy:jar:4aug2000r7-dev-hudson-1:provided
[INFO] |  +- com.google.inject:guice:jar:4.0:provided
[INFO] |  |  +- javax.inject:javax.inject:jar:1:provided
[INFO] |  |  \- aopalliance:aopalliance:jar:1.0:provided
[INFO] |  +- org.jruby.ext.posix:jna-posix:jar:1.0.3-jenkins-1:provided
[INFO] |  +- com.github.jnr:jnr-posix:jar:3.0.45:compile
[INFO] |  |  +- com.github.jnr:jnr-ffi:jar:2.1.8:compile
[INFO] |  |  |  +- org.ow2.asm:asm:jar:5.0.3:compile
[INFO] |  |  |  +- org.ow2.asm:asm-commons:jar:5.0.3:compile
[INFO] |  |  |  +- org.ow2.asm:asm-analysis:jar:5.0.3:compile
[INFO] |  |  |  +- org.ow2.asm:asm-tree:jar:5.0.3:compile
[INFO] |  |  |  +- org.ow2.asm:asm-util:jar:5.0.3:compile
[INFO] |  |  |  \- com.github.jnr:jnr-x86asm:jar:1.0.2:compile
[INFO] |  |  \- com.github.jnr:jnr-constants:jar:0.9.9:compile
[INFO] |  +- org.kohsuke:trilead-putty-extension:jar:1.2:provided
[INFO] |  +- org.jenkins-ci:trilead-ssh2:jar:build-217-jenkins-11:provided
[INFO] |  |  +- net.i2p.crypto:eddsa:jar:0.2.0:provided
[INFO] |  |  \- org.connectbot.jbcrypt:jbcrypt:jar:1.0.0:provided
[INFO] |  +- org.kohsuke.stapler:stapler-groovy:jar:1.250:provided
[INFO] |  |  \- org.kohsuke.stapler:stapler-jelly:jar:1.250:provided
[INFO] |  |     +- org.jenkins-ci:commons-jelly:jar:1.1-jenkins-20120928:provided
[INFO] |  |     \- org.jenkins-ci.dom4j:dom4j:jar:1.6.1-jenkins-4:provided
[INFO] |  +- org.kohsuke.stapler:stapler-jrebel:jar:1.250:provided
[INFO] |  |  \- org.kohsuke.stapler:stapler:jar:1.250:provided
[INFO] |  |     +- commons-discovery:commons-discovery:jar:0.4:provided
[INFO] |  |     \- org.jvnet:tiger-types:jar:2.2:provided
[INFO] |  +- org.kohsuke:windows-package-checker:jar:1.2:provided
[INFO] |  +- org.kohsuke.stapler:stapler-adjunct-zeroclipboard:jar:1.3.5-1:provided
[INFO] |  +- org.kohsuke.stapler:stapler-adjunct-timeline:jar:1.5:provided
[INFO] |  +- org.kohsuke.stapler:stapler-adjunct-codemirror:jar:1.3:provided
[INFO] |  +- org.kohsuke.stapler:json-lib:jar:2.4-jenkins-2:provided
[INFO] |  |  \- net.sf.ezmorph:ezmorph:jar:1.0.6:provided
[INFO] |  +- commons-httpclient:commons-httpclient:jar:3.1-jenkins-1:provided
[INFO] |  +- args4j:args4j:jar:2.0.31:provided
[INFO] |  +- org.jenkins-ci:bytecode-compatibility-transformer:jar:1.8:provided
[INFO] |  |  \- org.kohsuke:asm5:jar:5.0.1:provided
[INFO] |  +- org.jenkins-ci:task-reactor:jar:1.4:provided
[INFO] |  +- org.jvnet.localizer:localizer:jar:1.24:compile
[INFO] |  +- antlr:antlr:jar:2.7.6:provided
[INFO] |  +- org.jvnet.hudson:xstream:jar:1.4.7-jenkins-1:provided
[INFO] |  +- jfree:jfreechart:jar:1.0.9:provided
[INFO] |  |  \- jfree:jcommon:jar:1.0.12:provided
[INFO] |  +- org.apache.ant:ant:jar:1.8.4:provided
[INFO] |  |  \- org.apache.ant:ant-launcher:jar:1.8.4:provided
[INFO] |  +- commons-io:commons-io:jar:2.4:compile
[INFO] |  +- commons-lang:commons-lang:jar:2.6:provided
[INFO] |  +- commons-digester:commons-digester:jar:2.1:provided
[INFO] |  +- commons-beanutils:commons-beanutils:jar:1.8.3:provided
[INFO] |  +- org.apache.commons:commons-compress:jar:1.10:provided
[INFO] |  +- javax.mail:mail:jar:1.4.4:provided
[INFO] |  +- org.jvnet.hudson:activation:jar:1.1.1-hudson-1:provided
[INFO] |  +- jaxen:jaxen:jar:1.1-beta-11:provided
[INFO] |  +- commons-jelly:commons-jelly-tags-fmt:jar:1.0:provided
[INFO] |  +- commons-jelly:commons-jelly-tags-xml:jar:1.1:provided
[INFO] |  +- org.jvnet.hudson:commons-jelly-tags-define:jar:1.0.1-hudson-20071021:provided
[INFO] |  +- org.jenkins-ci:commons-jexl:jar:1.1-jenkins-20111212:provided
[INFO] |  +- org.acegisecurity:acegi-security:jar:1.0.7:provided
[INFO] |  |  +- org.springframework:spring-jdbc:jar:1.2.9:provided
[INFO] |  |  |  \- org.springframework:spring-dao:jar:1.2.9:provided
[INFO] |  |  +- oro:oro:jar:2.0.8:provided
[INFO] |  |  \- log4j:log4j:jar:1.2.17:provided
[INFO] |  +- org.codehaus.groovy:groovy-all:jar:2.4.11:provided
[INFO] |  +- jline:jline:jar:2.12:provided
[INFO] |  +- org.fusesource.jansi:jansi:jar:1.11:provided
[INFO] |  +- org.springframework:spring-webmvc:jar:2.5.6.SEC03:provided
[INFO] |  |  +- org.springframework:spring-beans:jar:2.5.6.SEC03:provided
[INFO] |  |  +- org.springframework:spring-context:jar:2.5.6.SEC03:provided
[INFO] |  |  +- org.springframework:spring-context-support:jar:2.5.6.SEC03:provided
[INFO] |  |  \- org.springframework:spring-web:jar:2.5.6.SEC03:provided
[INFO] |  +- org.springframework:spring-core:jar:2.5.6.SEC03:provided
[INFO] |  +- org.springframework:spring-aop:jar:2.5.6.SEC03:provided
[INFO] |  +- xpp3:xpp3:jar:1.1.4c:provided
[INFO] |  +- javax.servlet:jstl:jar:1.1.0:provided
[INFO] |  +- com.sun.xml.txw2:txw2:jar:20110809:provided
[INFO] |  |  +- javax.xml.stream:stax-api:jar:1.0-2:provided
[INFO] |  |  \- relaxngDatatype:relaxngDatatype:jar:20020414:provided
[INFO] |  +- commons-collections:commons-collections:jar:3.2.2:provided
[INFO] |  +- org.jvnet.winp:winp:jar:1.25:provided
[INFO] |  +- org.jenkins-ci:memory-monitor:jar:1.9:provided
[INFO] |  +- org.codehaus.woodstox:wstx-asl:jar:3.2.9:provided
[INFO] |  |  \- stax:stax-api:jar:1.0.1:provided
[INFO] |  +- org.jenkins-ci:jmdns:jar:3.4.0-jenkins-3:provided
[INFO] |  +- net.java.dev.jna:jna:jar:4.2.1:provided
[INFO] |  +- org.kohsuke:akuma:jar:1.10:provided
[INFO] |  +- org.kohsuke:libpam4j:jar:1.8:provided
[INFO] |  +- org.kohsuke:libzfs:jar:0.8:provided
[INFO] |  +- com.sun.solaris:embedded_su4j:jar:1.1:provided
[INFO] |  +- net.java.sezpoz:sezpoz:jar:1.12:provided
[INFO] |  +- org.kohsuke.jinterop:j-interop:jar:2.0.6-kohsuke-1:provided
[INFO] |  |  \- org.kohsuke.jinterop:j-interopdeps:jar:2.0.6-kohsuke-1:provided
[INFO] |  |     \- org.samba.jcifs:jcifs:jar:1.2.19:provided
[INFO] |  +- org.jvnet.robust-http-client:robust-http-client:jar:1.2:provided
[INFO] |  +- commons-codec:commons-codec:jar:1.8:provided
[INFO] |  +- org.kohsuke:access-modifier-annotation:jar:1.11:provided
[INFO] |  +- commons-fileupload:commons-fileupload:jar:1.3.1-jenkins-2:provided
[INFO] |  +- com.google.guava:guava:jar:11.0.1:compile
[INFO] |  |  \- com.google.code.findbugs:jsr305:jar:1.3.9:compile
[INFO] |  \- com.jcraft:jzlib:jar:1.1.3-kohsuke-1:compile
[INFO] +- org.jenkins-ci.main:jenkins-war:executable-war:2.73.3:test
[INFO] |  +- org.jenkins-ci.modules:instance-identity:jar:2.1:test
[INFO] |  |  \- io.github.stephenc.crypto:self-signed-cert-generator:jar:1.0.0:test
[INFO] |  +- org.jenkins-ci.modules:ssh-cli-auth:jar:1.4:test
[INFO] |  +- org.jenkins-ci.modules:slave-installer:jar:1.5:test
[INFO] |  +- org.jenkins-ci.modules:windows-slave-installer:jar:1.9.1:test
[INFO] |  +- org.jenkins-ci.modules:launchd-slave-installer:jar:1.2:test
[INFO] |  +- org.jenkins-ci.modules:upstart-slave-installer:jar:1.1:test
[INFO] |  +- org.jenkins-ci.modules:systemd-slave-installer:jar:1.1:test
[INFO] |  +- org.jenkins-ci.modules:sshd:jar:2.0:test
[INFO] |  |  \- org.apache.sshd:sshd-core:jar:1.6.0:test
[INFO] |  +- org.jenkins-ci.ui:jquery-detached:jar:core-assets:1.2.1:test
[INFO] |  +- org.jenkins-ci.ui:bootstrap:jar:core-assets:1.3.2:test
[INFO] |  \- org.jenkins-ci.ui:handlebars:jar:core-assets:1.1.1:test
[INFO] +- org.jenkins-ci.main:jenkins-test-harness:jar:2.34:test
[INFO] |  +- org.eclipse.jetty:jetty-webapp:jar:9.4.5.v20170502:test
[INFO] |  |  +- org.eclipse.jetty:jetty-xml:jar:9.4.5.v20170502:test
[INFO] |  |  |  \- org.eclipse.jetty:jetty-util:jar:9.4.5.v20170502:test
[INFO] |  |  \- org.eclipse.jetty:jetty-servlet:jar:9.4.5.v20170502:test
[INFO] |  +- org.eclipse.jetty:jetty-security:jar:9.4.5.v20170502:test
[INFO] |  |  \- org.eclipse.jetty:jetty-server:jar:9.4.5.v20170502:test
[INFO] |  |     +- org.eclipse.jetty:jetty-http:jar:9.4.5.v20170502:test
[INFO] |  |     \- org.eclipse.jetty:jetty-io:jar:9.4.5.v20170502:test
[INFO] |  +- org.jenkins-ci.main:jenkins-test-harness-htmlunit:jar:2.18-1:test
[INFO] |  |  +- xalan:xalan:jar:2.7.2:test
[INFO] |  |  +- xalan:serializer:jar:2.7.2:test
[INFO] |  |  +- org.apache.commons:commons-lang3:jar:3.4:test
[INFO] |  |  +- xerces:xercesImpl:jar:2.11.0:test
[INFO] |  |  +- xml-apis:xml-apis:jar:1.4.01:test
[INFO] |  |  +- net.sourceforge.nekohtml:nekohtml:jar:1.9.22:test
[INFO] |  |  +- net.sourceforge.cssparser:cssparser:jar:0.9.16:test
[INFO] |  |  +- org.w3c.css:sac:jar:1.3:test
[INFO] |  |  +- org.eclipse.jetty.websocket:websocket-client:jar:9.2.12.v20150709:test
[INFO] |  |  +- org.eclipse.jetty.websocket:websocket-common:jar:9.2.12.v20150709:test
[INFO] |  |  \- org.eclipse.jetty.websocket:websocket-api:jar:9.2.12.v20150709:test
[INFO] |  +- org.jvnet.hudson:embedded-rhino-debugger:jar:1.2:test
[INFO] |  +- org.netbeans.modules:org-netbeans-insane:jar:RELEASE72:test
[INFO] |  \- com.github.stephenc.findbugs:findbugs-annotations:jar:1.3.9-1:test
[INFO] +- org.jenkins-ci:test-annotations:jar:1.2:test
[INFO] +- junit:junit:jar:4.12:test
[INFO] +- org.slf4j:slf4j-api:jar:1.7.25:compile (optional) 
[INFO] +- org.slf4j:log4j-over-slf4j:jar:1.7.25:test
[INFO] +- org.slf4j:jcl-over-slf4j:jar:1.7.25:test
[INFO] \- org.slf4j:slf4j-jdk14:jar:1.7.25:test
robertpanzer commented 4 years ago

What exception do you get?

rmpestano commented 4 years ago

Hi Robert, no exception at all, the HTML document gets generated but without the extensions (themes, embed search etc...)

robertpanzer commented 4 years ago

So you are saying the the class CukedoctorExtensionRegistry is not instantiated and executed at all? Are you sure that this class is visible via the TCCL when the Asciidoctor instance is created?

rmpestano commented 4 years ago

Are you sure that this class is visible via the TCCL when the Asciidoctor instance is created?

I think yes because to create the extension registry I reference a constant declared there (CUKEDOCTOR_EXTENSION_GROUP_NAME) but I'll double-check by doing a classForName and let you know the results.

Thanks for the replies!

robertpanzer commented 4 years ago

Are you sure that the constant is not inlined? I have seen cases where the compiler moves final static strings into the consuming class.

rmpestano commented 4 years ago

I just tried and I can load the extension class via TCCL:

Screenshot 2020-09-08 at 13 58 55
rmpestano commented 4 years ago

If you wanna try yourself, you can debug this test: https://github.com/jenkinsci/cucumber-living-documentation-plugin/blob/d7fe2ba4acdc963134bed514407e54fadaa76d64/src/test/java/com/github/cukedoctor/jenkins/CucumberLivingDocumentationIT.java#L28

and then look into what is generated in docs dir:

Screenshot 2020-09-08 at 14 06 28

There must be a themes folder here (like in previous version of the plugin):

Screenshot 2020-09-08 at 14 08 02

Also if you open the HTML file you'll see the minmax macro wasn't replaced:

Screenshot 2020-09-08 at 14 08 59
robertpanzer commented 4 years ago

Please remove this line: https://github.com/jenkinsci/cucumber-living-documentation-plugin/blob/d7fe2ba4acdc963134bed514407e54fadaa76d64/src/main/java/com/github/cukedoctor/jenkins/CukedoctorPublisher.java#L293 Then it looks like the extensions are executed for me.

This is doing a second register on a new, empty ExtensionGroup with the same name. I am not sure right now if this is a bug or the intended behavior, but the idea was that the ExtensionGroup object stores a set of extensions that you can register in one go by calling ExtensionGroup.register(). Later you can unregister these by that name.

But I guess it's already in Asciidoctor Core that if you call Asciidoctor::Extensions#register again with the same name that the extensions under that name will get replaced: https://github.com/asciidoctor/asciidoctor/blob/11ae98c0ab3718573cc5a65d3137a68efc036429/lib/asciidoctor/extensions.rb#L1508

rmpestano commented 4 years ago

Awesome, thanks @robertpanzer!

Now the extension is registered during integration tests but somehow It doesn't when I use the plugin in a real Jenkins instance.

Trying to figure that out, thank you!

rmpestano commented 4 years ago

Looks like the plugin classloader is different than current thread classloader because the extension is not found by TCCL

Screenshot 2020-09-08 at 18 04 15 Screenshot 2020-09-08 at 18 04 38

I think I'll have to use a different classloader as I mentioned in first comment of this issue

robertpanzer commented 4 years ago

JettyAndServletApiOnlyClassloader hints at a classloader that does not see the "application" In that case you can set the TCCL to the Classloader of CukedoctorPublisher, and make sure to reset it after the asciidoctor instance has been created.

rmpestano commented 4 years ago

Yea, I saw that on the other issue:

 private Asciidoctor getAsciidoctor() {
        ClassLoader oldCl = Thread.currentThread().getContextClassLoader();
        Asciidoctor asciidoctor;
        try {
            ClassLoader classLoader = CukedoctorPublisher.class.getClassLoader();
            Thread.currentThread().setContextClassLoader(classLoader);
            asciidoctor = org.asciidoctor.jruby.AsciidoctorJRuby.Factory.create(classLoader);
        } finally {
            Thread.currentThread().setContextClassLoader(oldCl);
        }
        return asciidoctor;
    }

Now working great, thank you very much for all the help, now I can release a new version of the plugin!

robertpanzer commented 4 years ago

\o/ Awesome! Glad that it works.