|
16 | 16 | <gradle.executable>./gradlew</gradle.executable>
|
17 | 17 | <gradle.task>build</gradle.task>
|
18 | 18 | <skip.gradle.build>false</skip.gradle.build>
|
| 19 | + <refdocs.build.directory>${project.build.directory}/refdocs/</refdocs.build.directory> |
19 | 20 | </properties>
|
20 | 21 | <dependencies>
|
21 | 22 | <dependency>
|
|
39 | 40 | </dependencies>
|
40 | 41 | <build>
|
41 | 42 | <plugins>
|
| 43 | + <plugin> |
| 44 | + <groupId>com.googlecode.maven-download-plugin</groupId> |
| 45 | + <artifactId>download-maven-plugin</artifactId> |
| 46 | + <executions> |
| 47 | + <execution> |
| 48 | + <id>unpack-doc-resources</id> |
| 49 | + <phase>generate-resources</phase> |
| 50 | + <goals> |
| 51 | + <goal>wget</goal> |
| 52 | + </goals> |
| 53 | + <configuration> |
| 54 | + <url>https://repo.spring.io/release/io/spring/docresources/spring-doc-resources/${spring-doc-resources.version}/spring-doc-resources-${spring-doc-resources.version}.zip</url> |
| 55 | + <unpack>true</unpack> |
| 56 | + <outputDirectory>${refdocs.build.directory}</outputDirectory> |
| 57 | + </configuration> |
| 58 | + </execution> |
| 59 | + </executions> |
| 60 | + </plugin> |
42 | 61 | <plugin>
|
43 | 62 | <groupId>org.apache.maven.plugins</groupId>
|
44 | 63 | <artifactId>maven-dependency-plugin</artifactId>
|
|
69 | 88 | </execution>
|
70 | 89 | </executions>
|
71 | 90 | </plugin>
|
| 91 | + <plugin> |
| 92 | + <groupId>org.apache.maven.plugins</groupId> |
| 93 | + <artifactId>maven-resources-plugin</artifactId> |
| 94 | + <executions> |
| 95 | + <execution> |
| 96 | + <id>copy-asciidoc-resources</id> |
| 97 | + <phase>generate-resources</phase> |
| 98 | + <goals> |
| 99 | + <goal>copy-resources</goal> |
| 100 | + </goals> |
| 101 | + <configuration> |
| 102 | + <outputDirectory>${refdocs.build.directory}</outputDirectory> |
| 103 | + <resources> |
| 104 | + <resource> |
| 105 | + <directory>src/main/asciidoc</directory> |
| 106 | + <filtering>false</filtering> |
| 107 | + </resource> |
| 108 | + </resources> |
| 109 | + </configuration> |
| 110 | + </execution> |
| 111 | + </executions> |
| 112 | + </plugin> |
72 | 113 | <plugin>
|
73 | 114 | <groupId>org.codehaus.mojo</groupId>
|
74 | 115 | <artifactId>exec-maven-plugin</artifactId>
|
|
233 | 274 | <target>
|
234 | 275 | <zip
|
235 | 276 | destfile="${project.build.directory}/${project.artifactId}-${project.version}-docs.zip">
|
236 |
| - <zipfileset |
237 |
| - src="build/libs/${project.artifactId}-${project.version}-javadoc.jar" |
238 |
| - prefix="api" /> |
239 |
| - <zipfileset dir="${project.build.directory}/generated-docs" |
240 |
| - includes="index.html" prefix="reference/html" /> |
241 |
| - <mappedresources> |
242 |
| - <fileset dir="${project.build.directory}/generated-docs" |
243 |
| - includes="index.pdf" /> |
244 |
| - <globmapper from="index.pdf" |
245 |
| - to="reference/pdf/spring-boot-gradle-plugin-reference.pdf" /> |
246 |
| - </mappedresources> |
| 277 | + <fileset dir="${project.build.directory}/generated-docs" /> |
247 | 278 | </zip>
|
248 | 279 | </target>
|
249 | 280 | </configuration>
|
|
261 | 292 | <goal>process-asciidoc</goal>
|
262 | 293 | </goals>
|
263 | 294 | <configuration>
|
264 |
| - <backend>html</backend> |
| 295 | + <backend>html5</backend> |
| 296 | + <outputDirectory>${project.build.directory}/generated-docs/reference/html</outputDirectory> |
| 297 | + <sourceHighlighter>highlight.js</sourceHighlighter> |
| 298 | + <doctype>book</doctype> |
| 299 | + <attributes> |
| 300 | + <highlightjsdir>js/highlight</highlightjsdir> |
| 301 | + <highlightjs-theme>atom-one-dark-reasonable</highlightjs-theme> |
| 302 | + <linkcss>true</linkcss> |
| 303 | + <imagesdir>./images</imagesdir> |
| 304 | + <icons>font</icons> |
| 305 | + <stylesdir>css/</stylesdir> |
| 306 | + <stylesheet>style.css</stylesheet> |
| 307 | + </attributes> |
265 | 308 | </configuration>
|
266 | 309 | </execution>
|
267 | 310 | <execution>
|
|
272 | 315 | </goals>
|
273 | 316 | <configuration>
|
274 | 317 | <backend>pdf</backend>
|
| 318 | + <outputDirectory>${project.build.directory}/generated-docs/reference/pdf</outputDirectory> |
275 | 319 | </configuration>
|
276 | 320 | </execution>
|
277 | 321 | </executions>
|
278 | 322 | <configuration>
|
279 |
| - <sourceDocumentName>index.adoc</sourceDocumentName> |
| 323 | + <sourceDirectory>${refdocs.build.directory}</sourceDirectory> |
280 | 324 | <attributes>
|
281 | 325 | <github-tag>${github-tag}</github-tag>
|
282 | 326 | <version-type>${version-type}</version-type>
|
|
0 commit comments