Ensure that AsciidoctorJ can be used by apps into a Java Application Server (WildFly AS for now)
Java
Permalink
Failed to load latest commit information.
dockerfiles/wildfly82
src
.gitignore
LICENSE
README.adoc
pom.xml

README.adoc

Docker AsciidoctorJ

The Docker AsciidoctorJ project ensure that AsciidoctorJ can be used by apps into a Java Application Server (WildFly AS for now).
This repository provides :

  • a Dockerfile to build an image included WildFly 8.2 / asciidoctorj-1.5.2 / asciidoctorj-pdf-1.5.0

  • Arquillian tests that used a docker container to convert AsciiDoc files to HTML and PDF files

    Warning
    asciidoctorj-epub3 doesn’t work, for now, with this configuration.

All in one with Arquillian : Build the Docker image and execute tests in a container

  1. Clone this project :

    $ git clone https://github.com/asciidoctor/docker-asciidoctorj.git
  2. Ensure Java, Maven and Docker are installed

  3. Execute tests (Build a docker image / Start a container / Execute tests / Stop and destroy the container)

    mvn clean test -Pwildfly82_dockerfile

Build the docker image with Docker and THEN execute tests with Arquillian

  1. How to build the Docker image with docker command :

    1. Clone this project :

      $ git clone https://github.com/asciidoctor/docker-asciidoctorj.git
    2. Build the Docker image

      cd docker-asciidoctorj
      docker build -t asciidoctor/asciidoctorj-wildfly dockerfiles/wildfly82/
  2. How to execute the Arquillian Tests using an existing Docker image

    1. Ensure Java, Maven and Docker are installed, and that the Docker image asciidoctor/asciidoctorj-wildfly82 is present in your registry.

      docker images
      REPOSITORY                             TAG        IMAGE ID          CREATED           VIRTUAL SIZE
      asciidoctor/asciidoctorj-wildfly       latest     ddf1badf985c      12 hours ago      982.5 MB
    2. Execute tests (Start a container / Execute tests / Stop and destroy the container)

      mvn clean test -Pwildfly82
      1. You can execute just one test (AsciiDoc to PDf for example)

        mvn clean test -Pwildfly82 -Dtest=ConverterServletTest#should_convert_to_pdf
Important
Until the Docker image is present in your registry, you can just execute the Maven command (2b)
Note

You can pass the docker server ip/port configuration with Maven properties :

mvn clean test -Pwildfly82 -Ddocker.serverIp=192.168.59.103 -Ddocker.serverPort=2376

Errors

Error with asciidoctorj-epub3

The asciidoctorj-epub3 doesn’t work for now, there is an error :

"(LoadError) load error: nokogiri/nokogiri -- java.lang.NoClassDefFoundError: com/sun/org/apache/xpath/internal/VariableStackHTML