Skip to content

Commit 2cde0e3

Browse files
ante003pivovarit
authored andcommitted
Asciidoc merge request (eugenp#2128)
* - added classes for asciidoctor article - added tests for that article - added exclusion in pom.xml in libraries * - fixed test * - fixed formating in pom * - added dependency to the pom.xml - created plugin in pom.xml
1 parent 87049b6 commit 2cde0e3

3 files changed

Lines changed: 24 additions & 0 deletions

File tree

‎libraries/pom.xml‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,26 @@
7070
</execution>
7171
</executions>
7272
</plugin>
73+
<plugin>
74+
<groupId>org.asciidoctor</groupId>
75+
<artifactId>asciidoctor-maven-plugin</artifactId>
76+
<version>1.5.5</version>
77+
<executions>
78+
<execution>
79+
<id>output-html</id>
80+
<phase>generate-resources</phase>
81+
<goals>
82+
<goal>process-asciidoc</goal>
83+
</goals>
84+
</execution>
85+
</executions>
86+
<configuration>
87+
<sourceDirectory>src/docs/asciidoc</sourceDirectory>
88+
<outputDirectory>target/docs/asciidoc</outputDirectory>
89+
<backend>html</backend>
90+
<doctype>book</doctype>
91+
</configuration>
92+
</plugin>
7393
</plugins>
7494
</build>
7595

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
== Introduction Section
2+
3+
Hi. I'm a simple test to see if this Maven build is working. If you see me in nice HTML, then it means everything is [red]#working#.

‎libraries/src/main/java/com/baeldung/asciidoctor/AsciidoctorDemo.java‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ public void generatePDFFromString(final String input) {
2323
.backend("pdf")
2424
.asMap();
2525

26+
2627
final String outfile = asciidoctor.convertFile(new File("sample.adoc"), options);
2728
}
2829

0 commit comments

Comments
 (0)