|
119 | 119 | <xmlunit.version>1.5</xmlunit.version> |
120 | 120 | <xws-security.version>3.0</xws-security.version> |
121 | 121 | <xom.version>1.2.5</xom.version> |
| 122 | + <docs.resources.version>0.1.3.RELEASE</docs.resources.version> |
122 | 123 | </properties> |
123 | 124 |
|
124 | 125 | <dependencyManagement> |
|
184 | 185 | <version>${woodstox.version}</version> |
185 | 186 | <scope>test</scope> |
186 | 187 | </dependency> |
187 | | - |
| 188 | + <dependency> |
| 189 | + <groupId>io.spring.docresources</groupId> |
| 190 | + <artifactId>spring-doc-resources</artifactId> |
| 191 | + <version>${docs.resources.version}</version> |
| 192 | + <type>zip</type> |
| 193 | + <optional>true</optional> |
| 194 | + </dependency> |
188 | 195 | </dependencies> |
189 | 196 |
|
190 | 197 | <build> |
|
466 | 473 | <id>docs</id> |
467 | 474 |
|
468 | 475 | <build> |
| 476 | + |
469 | 477 | <plugins> |
| 478 | + <plugin> |
| 479 | + <groupId>org.apache.maven.plugins</groupId> |
| 480 | + <artifactId>maven-dependency-plugin</artifactId> |
| 481 | + <executions> |
| 482 | + <execution> |
| 483 | + <id>unpack-doc-resources</id> |
| 484 | + <goals> |
| 485 | + <goal>unpack-dependencies</goal> |
| 486 | + </goals> |
| 487 | + <phase>generate-resources</phase> |
| 488 | + <inherited>false</inherited> |
| 489 | + <configuration> |
| 490 | + <includeGroupIds>io.spring.docresources</includeGroupIds> |
| 491 | + <includeArtifactIds>spring-doc-resources</includeArtifactIds> |
| 492 | + <includeTypes>zip</includeTypes> |
| 493 | + <excludeTransitive>true</excludeTransitive> |
| 494 | + <outputDirectory>${project.build.directory}/refdocs/</outputDirectory> |
| 495 | + </configuration> |
| 496 | + </execution> |
| 497 | + </executions> |
| 498 | + </plugin> |
| 499 | + <plugin> |
| 500 | + <groupId>org.apache.maven.plugins</groupId> |
| 501 | + <artifactId>maven-resources-plugin</artifactId> |
| 502 | + <executions> |
| 503 | + <execution> |
| 504 | + <id>copy-asciidoc-resources</id> |
| 505 | + <phase>generate-resources</phase> |
| 506 | + <inherited>false</inherited> |
| 507 | + <goals> |
| 508 | + <goal>copy-resources</goal> |
| 509 | + </goals> |
| 510 | + <configuration> |
| 511 | + <outputDirectory>${project.build.directory}/refdocs/</outputDirectory> |
| 512 | + <resources> |
| 513 | + <resource> |
| 514 | + <directory>src/main/asciidoctor</directory> |
| 515 | + <filtering>false</filtering> |
| 516 | + </resource> |
| 517 | + </resources> |
| 518 | + </configuration> |
| 519 | + </execution> |
| 520 | + </executions> |
| 521 | + </plugin> |
470 | 522 | <plugin> |
471 | 523 | <groupId>org.asciidoctor</groupId> |
472 | 524 | <artifactId>asciidoctor-maven-plugin</artifactId> |
|
482 | 534 | <execution> |
483 | 535 | <id>html</id> |
484 | 536 | <phase>generate-resources</phase> |
| 537 | + <inherited>false</inherited> |
485 | 538 | <goals> |
486 | 539 | <goal>process-asciidoc</goal> |
487 | 540 | </goals> |
488 | 541 | <configuration> |
489 | 542 | <backend>html5</backend> |
490 | 543 | <outputDirectory>${project.build.directory}/site/reference/html</outputDirectory> |
491 | | - <sourceHighlighter>prettify</sourceHighlighter> |
| 544 | + <sourceHighlighter>highlight.js</sourceHighlighter> |
492 | 545 | <attributes> |
| 546 | + // these attributes are required to use the doc resources |
| 547 | + <docinfo>shared</docinfo> |
| 548 | + <stylesdir>css/</stylesdir> |
| 549 | + <stylesheet>spring.css</stylesheet> |
| 550 | + <linkcss>true</linkcss> |
493 | 551 | <icons>font</icons> |
| 552 | + <highlightjsdir>js/highlight</highlightjsdir> |
| 553 | + <highlightjs-theme>github</highlightjs-theme> |
494 | 554 | <sectanchors>true</sectanchors> |
495 | 555 | </attributes> |
496 | 556 | </configuration> |
|
499 | 559 | <execution> |
500 | 560 | <id>pdf</id> |
501 | 561 | <phase>generate-resources</phase> |
| 562 | + <inherited>false</inherited> |
502 | 563 | <goals> |
503 | 564 | <goal>process-asciidoc</goal> |
504 | 565 | </goals> |
|
510 | 571 | </executions> |
511 | 572 |
|
512 | 573 | <configuration> |
513 | | - <sourceDirectory>src/main/asciidoctor</sourceDirectory> |
| 574 | + <sourceDirectory>${project.build.directory}/refdocs/</sourceDirectory> |
514 | 575 | <sourceDocumentName>index.adoc</sourceDocumentName> |
515 | 576 | <doctype>book</doctype> |
516 | 577 | <attributes> |
517 | 578 | <version>${project.version}</version> |
518 | 579 | <projectName>${project.name}</projectName> |
519 | 580 | <projectVersion>${project.version}</projectVersion> |
520 | 581 | <allow-uri-read>true</allow-uri-read> |
521 | | - <toclevels>3</toclevels> |
| 582 | + <toclevels>4</toclevels> |
522 | 583 | <numbered>true</numbered> |
523 | 584 | <baseDir>${project.basedir}</baseDir> |
524 | 585 | </attributes> |
|
731 | 792 | <enabled>false</enabled> |
732 | 793 | </snapshots> |
733 | 794 | </repository> |
| 795 | + <repository> |
| 796 | + <id>spring-release</id> |
| 797 | + <name>Spring Releases</name> |
| 798 | + <url>https://repo.spring.io/release</url> |
| 799 | + <snapshots> |
| 800 | + <enabled>false</enabled> |
| 801 | + </snapshots> |
| 802 | + </repository> |
734 | 803 | </repositories> |
735 | 804 |
|
736 | 805 | <pluginRepositories> |
|
0 commit comments