0

I have a spring boot application with TestNG as the unit test framework. Took reference for the wiring from Spring TestNg Sample

My Pom Snippet for ascii doctor looks like:

<plugin>
            <groupId>org.asciidoctor</groupId>
            <artifactId>asciidoctor-maven-plugin</artifactId>
            <version>1.5.6</version>
            <executions>
                <execution>
                    <id>generate-docs</id>
                    <phase>package</phase>
                    <goals>
                        <goal>process-asciidoc</goal>
                    </goals>
                    <configuration>
                        <backend>html</backend>
                        <doctype>book</doctype>
                        <attributes>
                            <snippets>${snippetsDirectory}</snippets>
                        </attributes>
                        <sourceDirectory>src/docs/asciidocs</sourceDirectory>
                        <outputDirectory>target/generated-docs</outputDirectory>
                    </configuration>
                </execution>
            </executions>
        </plugin>

I have the artifact spring-restdocs-mockmvc included in the pom. I see 6 small adoc snippets in target/generated-snippets but don't see any html file.

Read related StackOver Thread and manually included a api-guide.adoc file in src/docs/ascii-docs but still don't see any html file :(

I did go over numerous tutorial/examples thread but of no avail.

aditya parikh
  • 595
  • 4
  • 11
  • 30
  • Did you really add `api-guide.adoc` in `src/docs/ascii-docs`? The correct directory when using Maven is `src/main/asciidoc`. – Andy Wilkinson Apr 03 '18 at 15:00
  • yep, as i had my sourceDirectory parameter configured to `src/docs/asciidocs`, I added the `api-guide.adoc` there. After your suggestion, removed the sourceDirectory parameter and added it in `src/main/asciidoc`, but still nothing. I run the testng unit test suite to generate these docs. – aditya parikh Apr 03 '18 at 17:00
  • Ok, perhaps you could share a [minimal, complete, and verifiable example](/help/mcve)? – Andy Wilkinson Apr 03 '18 at 18:59

0 Answers0