pom.xml 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <project xmlns="http://maven.apache.org/POM/4.0.0"
  3. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  4. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  5. <modelVersion>4.0.0</modelVersion>
  6. <groupId>org.shoulder.specs</groupId>
  7. <artifactId>doc</artifactId>
  8. <version>0.0.1-SNAPSHOT</version>
  9. <properties>
  10. <maven.build.timestamp.format>yyyy-MM-dd HH</maven.build.timestamp.format>
  11. <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  12. <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
  13. <maven.compiler.encoding>UTF-8</maven.compiler.encoding>
  14. <maven.compiler.source>11</maven.compiler.source>
  15. <maven.compiler.target>11</maven.compiler.target>
  16. <asciidoctor-maven-plugin.version>2.0.0-RC.1</asciidoctor-maven-plugin.version>
  17. <asciidoctorj.version>2.3.1</asciidoctorj.version>
  18. <asciidoctorj-diagram.version>2.0.2</asciidoctorj-diagram.version>
  19. <asciidoctorj-pdf.version>1.5.3</asciidoctorj-pdf.version>
  20. <jruby.version>9.2.11.1</jruby.version>
  21. </properties>
  22. <organization>
  23. <name>shoulder</name>
  24. </organization>
  25. <build>
  26. <!-- https://github.com/asciidoctor/asciidoctor-maven-examples -->
  27. <!-- https://github.com/asciidoctor/asciidoctor-maven-plugin/blob/master/README_zh-CN.adoc -->
  28. <!-- 默认命令,配置后可以直接使用mvn编译(mvn clean process-asciidoc) 2000 端口开发访问 mvn asciidoctor:http -->
  29. <!--mvn generate-resources -Dasciidoctor.attributes=toc=right-->
  30. <defaultGoal>process-resources</defaultGoal>
  31. <resources>
  32. <resource>
  33. <directory>src/main/resources</directory>
  34. <targetPath>${project.build.directory}/book</targetPath>
  35. </resource>
  36. </resources>
  37. <plugins>
  38. <plugin>
  39. <groupId>org.asciidoctor</groupId>
  40. <artifactId>asciidoctor-maven-plugin</artifactId>
  41. <version>${asciidoctor-maven-plugin.version}</version>
  42. <configuration>
  43. <outputDirectory>${project.build.directory}/shoulder-specs/${project.version}</outputDirectory>
  44. <!--<sourceDocumentName>book.adoc</sourceDocumentName>
  45. <imagesDir>./</imagesDir>-->
  46. <preserveDirectories>false</preserveDirectories>
  47. <!--<sourceDirectory>src/docs/asciidoc/generated</sourceDirectory>-->
  48. <attributes>
  49. <endpoint-url>http://example.org</endpoint-url>
  50. <sourcedir>${project.build.sourceDirectory}</sourcedir>
  51. <project-version>${project.version}</project-version>
  52. </attributes>
  53. <requires>
  54. <require>asciidoctor-diagram</require>
  55. </requires>
  56. </configuration>
  57. <executions>
  58. <!--html-->
  59. <execution>
  60. <id>output-html</id>
  61. <phase>generate-resources</phase>
  62. <goals>
  63. <goal>process-asciidoc</goal>
  64. </goals>
  65. <configuration>
  66. <backend>html5</backend>
  67. <!-- coderay prettify -->
  68. <sourceHighlighter>coderay</sourceHighlighter>
  69. <attributes>
  70. <imagesdir>./images</imagesdir>
  71. <toc>left</toc>
  72. <icons>font</icons>
  73. <sectanchors>true</sectanchors>
  74. <!-- set the idprefix to blank -->
  75. <idprefix/>
  76. <idseparator>-</idseparator>
  77. <docinfo1>true</docinfo1>
  78. <revnumber>${project.version}</revnumber>
  79. <revdate>${maven.build.timestamp}</revdate>
  80. <organization>${project.organization.name}</organization>
  81. </attributes>
  82. </configuration>
  83. </execution>
  84. <!--pdf generator-->
  85. <!--<execution>
  86. <id>output-pdf</id>
  87. <phase>generate-resources</phase>
  88. <goals>
  89. <goal>process-asciidoc</goal>
  90. </goals>
  91. <configuration>
  92. <backend>pdf</backend>
  93. <sourceHighlighter>coderay</sourceHighlighter>
  94. <doctype>book</doctype>
  95. <attributes>
  96. <icons>font</icons>
  97. <pagenums/>
  98. <toc/>
  99. <idprefix/>
  100. <idseparator>-</idseparator>
  101. <pdf-fontsdir>data/fonts</pdf-fontsdir>
  102. <pdf-stylesdir>data/themes</pdf-stylesdir>
  103. <pdf-style>cn</pdf-style>
  104. </attributes>
  105. </configuration>
  106. </execution>-->
  107. </executions>
  108. <dependencies>
  109. <!-- Comment this section to use the default jruby artifact provided by the plugin -->
  110. <dependency>
  111. <groupId>org.jruby</groupId>
  112. <artifactId>jruby-complete</artifactId>
  113. <version>${jruby.version}</version>
  114. </dependency>
  115. <!-- Comment this section to use the default AsciidoctorJ artifact provided by the plugin -->
  116. <dependency>
  117. <groupId>org.asciidoctor</groupId>
  118. <artifactId>asciidoctorj</artifactId>
  119. <version>${asciidoctorj.version}</version>
  120. </dependency>
  121. <dependency>
  122. <groupId>org.asciidoctor</groupId>
  123. <artifactId>asciidoctorj-diagram</artifactId>
  124. <version>${asciidoctorj-diagram.version}</version>
  125. </dependency>
  126. <dependency>
  127. <groupId>org.asciidoctor</groupId>
  128. <artifactId>asciidoctorj-pdf</artifactId>
  129. <version>${asciidoctorj-pdf.version}</version>
  130. </dependency>
  131. </dependencies>
  132. </plugin>
  133. <!--打包插件-->
  134. <!--<plugin>
  135. <groupId>org.apache.maven.plugins</groupId>
  136. <artifactId>maven-assembly-plugin</artifactId>
  137. <executions>
  138. <execution>
  139. <id>assemble</id>
  140. <phase>package</phase>
  141. <goals>
  142. <goal>single</goal>
  143. </goals>
  144. <configuration>
  145. <descriptors>
  146. <descriptor>assembly.xml</descriptor>
  147. </descriptors>
  148. &lt;!&ndash;<recompressZippedFiles>true</recompressZippedFiles>&ndash;&gt;
  149. <finalName>shoulder-specs-${project.version}</finalName>
  150. <appendAssemblyId>false</appendAssemblyId>
  151. <outputDirectory>target/</outputDirectory>
  152. <workDirectory>target/assembly/work</workDirectory>
  153. <tarLongFileMode>gnu</tarLongFileMode>
  154. </configuration>
  155. </execution>
  156. </executions>
  157. </plugin>-->
  158. </plugins>
  159. </build>
  160. </project>