|
| 1 | +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 2 | + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
| 3 | + <modelVersion>4.0.0</modelVersion> |
| 4 | + |
| 5 | + <parent> |
| 6 | + <groupId>org.fugerit.java.demo</groupId> |
| 7 | + <artifactId>turbo-unit</artifactId> |
| 8 | + <version>1.0.0-SNAPSHOT</version> |
| 9 | + </parent> |
| 10 | + |
| 11 | + <artifactId>turbo-unit-docs</artifactId> |
| 12 | + |
| 13 | + <packaging>jar</packaging> |
| 14 | + |
| 15 | + <properties> |
| 16 | + <!-- asciidoc properties --> |
| 17 | + <asciidoctor.maven.plugin.version>3.2.0</asciidoctor.maven.plugin.version> |
| 18 | + <asciidoctorj.pdf.version>2.3.19</asciidoctorj.pdf.version> |
| 19 | + <asciidoctorj.version>3.0.0</asciidoctorj.version> |
| 20 | + <asciidoctorj.diagram.version>2.3.2</asciidoctorj.diagram.version> |
| 21 | + <asciidoctorj.diagram-plantuml.version>1.2025.2</asciidoctorj.diagram-plantuml.version> |
| 22 | + <asciidoctorj.diagram-ditaamini.version>1.0.3</asciidoctorj.diagram-ditaamini.version> |
| 23 | + <jruby.version>9.4.12.0</jruby.version> |
| 24 | + <maven.build.timestamp.format>yyyy-MM-dd'T'HH:mm:ss'Z'</maven.build.timestamp.format> |
| 25 | + <pdf-output-folder>${project.build.directory}/generated-pdf</pdf-output-folder> |
| 26 | + <html-output-folder>${project.build.directory}/generated-html5</html-output-folder> |
| 27 | + </properties> |
| 28 | + |
| 29 | + <build> |
| 30 | + <defaultGoal>process-resources</defaultGoal> |
| 31 | + <plugins> |
| 32 | + <plugin> |
| 33 | + <groupId>org.asciidoctor</groupId> |
| 34 | + <artifactId>asciidoctor-maven-plugin</artifactId> |
| 35 | + <version>${asciidoctor.maven.plugin.version}</version> |
| 36 | + <dependencies> |
| 37 | + <dependency> |
| 38 | + <groupId>org.asciidoctor</groupId> |
| 39 | + <artifactId>asciidoctorj-pdf</artifactId> |
| 40 | + <version>${asciidoctorj.pdf.version}</version> |
| 41 | + </dependency> |
| 42 | + <!-- Comment this section to use the default jruby artifact provided by the plugin --> |
| 43 | + <dependency> |
| 44 | + <groupId>org.jruby</groupId> |
| 45 | + <artifactId>jruby</artifactId> |
| 46 | + <version>${jruby.version}</version> |
| 47 | + </dependency> |
| 48 | + <!-- Comment this section to use the default AsciidoctorJ artifact provided by the plugin --> |
| 49 | + <dependency> |
| 50 | + <groupId>org.asciidoctor</groupId> |
| 51 | + <artifactId>asciidoctorj</artifactId> |
| 52 | + <version>${asciidoctorj.version}</version> |
| 53 | + </dependency> |
| 54 | + <dependency> |
| 55 | + <groupId>org.asciidoctor</groupId> |
| 56 | + <artifactId>asciidoctorj-diagram</artifactId> |
| 57 | + <version>${asciidoctorj.diagram.version}</version> |
| 58 | + </dependency> |
| 59 | + <dependency> |
| 60 | + <groupId>org.asciidoctor</groupId> |
| 61 | + <artifactId>asciidoctorj-diagram-plantuml</artifactId> |
| 62 | + <version>${asciidoctorj.diagram-plantuml.version}</version> |
| 63 | + </dependency> |
| 64 | + <dependency> |
| 65 | + <groupId>org.asciidoctor</groupId> |
| 66 | + <artifactId>asciidoctorj-diagram-ditaamini</artifactId> |
| 67 | + <version>${asciidoctorj.diagram-ditaamini.version}</version> |
| 68 | + </dependency> |
| 69 | + </dependencies> |
| 70 | + <configuration> |
| 71 | + <requires> |
| 72 | + <require>asciidoctor-diagram</require> |
| 73 | + </requires> |
| 74 | + <resources> |
| 75 | + <resource> |
| 76 | + <directory>src/main/docs/asciidoc</directory> |
| 77 | + <excludes> |
| 78 | + <exclude>resources/themes/**</exclude> |
| 79 | + </excludes> |
| 80 | + </resource> |
| 81 | + </resources> |
| 82 | + <sourceDirectory>src/main/docs/asciidoc</sourceDirectory> |
| 83 | + <enableVerbose>true</enableVerbose> |
| 84 | + <logHandler> |
| 85 | + <outputToConsole>true</outputToConsole> |
| 86 | + </logHandler> |
| 87 | + <!-- Attributes common to all output formats --> |
| 88 | + <attributes> |
| 89 | + <attribute-missing>warn</attribute-missing> |
| 90 | + <allow-uri-read>true</allow-uri-read> |
| 91 | + <source-highlighter>rouge</source-highlighter> |
| 92 | + <imagesdir>./resources/images</imagesdir> |
| 93 | + <themesdir>./resources/themes</themesdir> |
| 94 | + <revnumber>${project.version}</revnumber> |
| 95 | + <revdate>${maven.build.timestamp}</revdate> |
| 96 | + <revremark>Digital Version</revremark> |
| 97 | + <organization>${project.organization.name}</organization> |
| 98 | + </attributes> |
| 99 | + </configuration> |
| 100 | + <executions> |
| 101 | + <execution> |
| 102 | + <id>asciidoc-to-pdf</id> |
| 103 | + <phase>generate-resources</phase> |
| 104 | + <goals> |
| 105 | + <goal>process-asciidoc</goal> |
| 106 | + </goals> |
| 107 | + <configuration> |
| 108 | + <backend>pdf</backend> |
| 109 | + <doctype>book</doctype> |
| 110 | + <sourceDocumentName>index.adoc</sourceDocumentName> |
| 111 | + <outputDirectory>${pdf-output-folder}</outputDirectory> |
| 112 | + <outputFile>${project.artifactId}-${project.version}.pdf</outputFile> |
| 113 | + <attributes> |
| 114 | + <pdf-theme>basic</pdf-theme> |
| 115 | + <pdf-themesdir>${project.basedir}/src/main/docs/asciidoc/resources/themes</pdf-themesdir> |
| 116 | + <icons>font</icons> |
| 117 | + <pagenums/> |
| 118 | + <toc/> |
| 119 | + <idprefix/> |
| 120 | + <idseparator>-</idseparator> |
| 121 | + </attributes> |
| 122 | + </configuration> |
| 123 | + </execution> |
| 124 | + <execution> |
| 125 | + <id>asciidoc-to-html</id> |
| 126 | + <phase>generate-resources</phase> |
| 127 | + <goals> |
| 128 | + <goal>process-asciidoc</goal> |
| 129 | + </goals> |
| 130 | + <configuration> |
| 131 | + <backend>html5</backend> |
| 132 | + <outputDirectory>${html-output-folder}</outputDirectory> |
| 133 | + <!-- |
| 134 | + Scenarios for linking vs embedding assets: |
| 135 | +
|
| 136 | + Link to both stylesheets and images:: |
| 137 | +
|
| 138 | + - don't set embedAssets option |
| 139 | + - set linkcss attribute to true |
| 140 | + - set imagesdir attribute to path relative to AsciiDoc source file |
| 141 | +
|
| 142 | + <attributes> |
| 143 | + <linkcss>true</linkcss> |
| 144 | + <imagesdir>./images</imagesdir> |
| 145 | + </attributes> |
| 146 | +
|
| 147 | + Embed stylesheets and images:: |
| 148 | +
|
| 149 | + - set embedAssets option to true |
| 150 | + - don't set linkcss attribute |
| 151 | + - set imagesdir attribute to path relative to project root |
| 152 | +
|
| 153 | + <embedAssets>true</embedAssets> |
| 154 | + <attributes> |
| 155 | + <imagesdir>src/docs/asciidoc/images</imagesdir> |
| 156 | + </attributes> |
| 157 | +
|
| 158 | + Link to stylesheets but embed images:: |
| 159 | +
|
| 160 | + - set embedAssets option to true |
| 161 | + - set linkcss attribute to true |
| 162 | + - set imagesdir attribute to path relative to project root |
| 163 | +
|
| 164 | + <embedAssets>true</embedAssets> |
| 165 | + <attributes> |
| 166 | + <linkcss>true</linkcss> |
| 167 | + <imagesdir>src/docs/asciidoc/images</imagesdir> |
| 168 | + </attributes> |
| 169 | +
|
| 170 | + Embed stylesheets but link images (default):: |
| 171 | +
|
| 172 | + - don't set embedAssets option |
| 173 | + - don't set linkcss attribute |
| 174 | + - set imagesdir attribute to path relative to AsciiDoc source file |
| 175 | +
|
| 176 | + <attributes> |
| 177 | + <imagesdir>./images</imagesdir> |
| 178 | + </attributes> |
| 179 | +
|
| 180 | + IMPORTANT: When you enable image embedding, you must qualify the path with imagesdir, as shown above. |
| 181 | + --> |
| 182 | + <attributes> |
| 183 | + <source-highlighter>rouge</source-highlighter> |
| 184 | + <imagesdir>resources/images</imagesdir> |
| 185 | + <toc>left</toc> |
| 186 | + <icons>font</icons> |
| 187 | + <sectanchors>true</sectanchors> |
| 188 | + <!-- set the idprefix to blank --> |
| 189 | + <idprefix/> |
| 190 | + <idseparator>-</idseparator> |
| 191 | + <docinfo1>true</docinfo1> |
| 192 | + </attributes> |
| 193 | + </configuration> |
| 194 | + </execution> |
| 195 | + </executions> |
| 196 | + </plugin> |
| 197 | + </plugins> |
| 198 | + </build> |
| 199 | + |
| 200 | + <dependencies> |
| 201 | + |
| 202 | + </dependencies> |
| 203 | + |
| 204 | +</project> |
0 commit comments