pom.xml 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  3. xmlns="http://maven.apache.org/POM/4.0.0"
  4. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
  5. <modelVersion>4.0.0</modelVersion>
  6. <parent>
  7. <groupId>io.awspring.cloud</groupId>
  8. <artifactId>spring-cloud-aws</artifactId>
  9. <version>3.1.1-SNAPSHOT</version>
  10. </parent>
  11. <artifactId>spring-cloud-aws-docs</artifactId>
  12. <packaging>pom</packaging>
  13. <name>Spring Cloud AWS Docs</name>
  14. <properties>
  15. <docs.main>spring-cloud-aws</docs.main>
  16. <main.basedir>${basedir}/..</main.basedir>
  17. <configprops.path>${project.basedir}/src/main/asciidoc/_configprops.adoc</configprops.path>
  18. <configprops.inclusionPattern>spring.cloud.aws.*</configprops.inclusionPattern>
  19. <upload-docs-zip.phase>deploy</upload-docs-zip.phase>
  20. <generated-docs-multipage-output.dir>${project.build.directory}/generated-docs/${project.version}/reference/html</generated-docs-multipage-output.dir>
  21. <generated-docs-singlepage-output.dir>${project.build.directory}/generated-docs/${project.version}/reference/htmlsingle</generated-docs-singlepage-output.dir>
  22. <generated-docs-pdf-output.dir>${project.build.directory}/generated-docs/${project.version}/reference/pdf</generated-docs-pdf-output.dir>
  23. </properties>
  24. <build>
  25. <plugins>
  26. <plugin>
  27. <groupId>org.apache.maven.plugins</groupId>
  28. <artifactId>maven-deploy-plugin</artifactId>
  29. <version>${maven-deploy-plugin.version}</version>
  30. <configuration>
  31. <skip>true</skip>
  32. </configuration>
  33. </plugin>
  34. </plugins>
  35. </build>
  36. <dependencies>
  37. <dependency>
  38. <groupId>io.awspring.cloud</groupId>
  39. <artifactId>spring-cloud-aws-autoconfigure</artifactId>
  40. </dependency>
  41. </dependencies>
  42. <profiles>
  43. <profile>
  44. <id>docs-classic</id>
  45. <build>
  46. <pluginManagement>
  47. <plugins>
  48. <plugin>
  49. <groupId>org.apache.maven.plugins</groupId>
  50. <artifactId>maven-dependency-plugin</artifactId>
  51. <version>${maven-dependency-plugin.version}</version>
  52. <executions>
  53. <execution>
  54. <id>unpack-docs</id>
  55. <phase>${maven-dependency-plugin-for-docs.phase}</phase>
  56. <goals>
  57. <goal>unpack</goal>
  58. </goals>
  59. <configuration>
  60. <artifactItems>
  61. <artifactItem>
  62. <groupId>org.springframework.cloud</groupId>
  63. <artifactId>spring-cloud-build-docs</artifactId>
  64. <version>${spring-cloud-build.version}</version>
  65. <classifier>sources</classifier>
  66. <type>jar</type>
  67. <overWrite>true</overWrite>
  68. <outputDirectory>${docs.resources.dir}</outputDirectory>
  69. </artifactItem>
  70. </artifactItems>
  71. </configuration>
  72. </execution>
  73. <execution>
  74. <id>unpack-classes</id>
  75. <phase>${maven-dependency-plugin-for-docs-classes.phase}</phase>
  76. <goals>
  77. <goal>unpack</goal>
  78. </goals>
  79. <configuration>
  80. <artifactItems>
  81. <artifactItem>
  82. <groupId>org.springframework.cloud</groupId>
  83. <artifactId>spring-cloud-build-docs</artifactId>
  84. <version>${spring-cloud-build.version}</version>
  85. <classifier>jar-with-dependencies</classifier>
  86. <type>jar</type>
  87. <overWrite>true</overWrite>
  88. <outputDirectory>${docs.classes.dir}</outputDirectory>
  89. </artifactItem>
  90. </artifactItems>
  91. </configuration>
  92. </execution>
  93. </executions>
  94. </plugin>
  95. <plugin>
  96. <groupId>org.apache.maven.plugins</groupId>
  97. <artifactId>maven-resources-plugin</artifactId>
  98. <executions>
  99. <execution>
  100. <id>copy-asciidoc-resources</id>
  101. <phase>generate-resources</phase>
  102. <goals>
  103. <goal>copy-resources</goal>
  104. </goals>
  105. <configuration>
  106. <outputDirectory>${project.build.directory}/refdocs/</outputDirectory>
  107. <resources>
  108. <resource>
  109. <directory>src/main/asciidoc</directory>
  110. <excludes>
  111. <exclude>ghpages.sh</exclude>
  112. </excludes>
  113. </resource>
  114. </resources>
  115. </configuration>
  116. </execution>
  117. </executions>
  118. </plugin>
  119. <plugin>
  120. <groupId>org.codehaus.mojo</groupId>
  121. <artifactId>exec-maven-plugin</artifactId>
  122. <version>${exec-maven-plugin.version}</version>
  123. <executions>
  124. <execution>
  125. <id>generate-configprops</id>
  126. <phase>prepare-package</phase>
  127. <goals>
  128. <goal>java</goal>
  129. </goals>
  130. </execution>
  131. </executions>
  132. <dependencies>
  133. <dependency>
  134. <groupId>org.springframework.cloud</groupId>
  135. <artifactId>spring-cloud-build-docs</artifactId>
  136. <version>${spring-cloud-build.version}</version>
  137. <classifier>${spring-cloud-build-docs-classifier}</classifier>
  138. <type>jar</type>
  139. </dependency>
  140. </dependencies>
  141. <configuration>
  142. <includePluginDependencies>
  143. true
  144. </includePluginDependencies>
  145. <mainClass>org.springframework.cloud.internal.Main</mainClass>
  146. <arguments>
  147. <argument>${configprops.path}</argument>
  148. <argument>${configprops.inclusionPattern}</argument>
  149. </arguments>
  150. </configuration>
  151. </plugin>
  152. <plugin>
  153. <groupId>org.asciidoctor</groupId>
  154. <artifactId>asciidoctor-maven-plugin</artifactId>
  155. <version>${asciidoctor-maven-plugin.version}</version>
  156. <dependencies>
  157. <dependency>
  158. <groupId>io.spring.asciidoctor.backends</groupId>
  159. <artifactId>spring-asciidoctor-backends</artifactId>
  160. <version>${spring-asciidoctor-backends.version}</version>
  161. </dependency>
  162. <dependency>
  163. <groupId>org.asciidoctor</groupId>
  164. <artifactId>asciidoctorj-pdf</artifactId>
  165. <version>${asciidoctorj-pdf.version}</version>
  166. </dependency>
  167. <dependency>
  168. <groupId>org.asciidoctor</groupId>
  169. <artifactId>asciidoctorj-diagram</artifactId>
  170. <version>${asciidoctorj-diagram.version}</version>
  171. </dependency>
  172. </dependencies>
  173. <configuration>
  174. <sourceDirectory>${refdocs.build.directory}</sourceDirectory>
  175. <resources>
  176. <resource>
  177. <directory>${refdocs.build.directory}</directory>
  178. <excludes>
  179. <exclude>**/*.*adoc</exclude>
  180. </excludes>
  181. </resource>
  182. </resources>
  183. <!-- tag::attributes[] -->
  184. <attributes>
  185. <docinfo>shared</docinfo>
  186. <allow-uri-read>true</allow-uri-read>
  187. <nofooter/>
  188. <toc>left</toc>
  189. <toc-levels>4</toc-levels>
  190. <sectlinks>true</sectlinks>
  191. <sources-root>${project.basedir}/src@</sources-root>
  192. <asciidoc-sources-root>${project.basedir}/src/main/asciidoc@</asciidoc-sources-root>
  193. <generated-resources-root>${project.basedir}/target/generated-resources@
  194. </generated-resources-root>
  195. <!-- Use this attribute the reference code from another module -->
  196. <!-- Note the @ at the end, lowering the precedence of the attribute -->
  197. <project-root>${maven.multiModuleProjectDirectory}@</project-root>
  198. <!-- It's mandatory for you to pass the docs.main property -->
  199. <github-repo>${docs.main}@</github-repo>
  200. <github-project>https://github.com/spring-cloud/${docs.main}@</github-project>
  201. <github-raw>
  202. https://raw.githubusercontent.com/spring-cloud/${docs.main}/${github-tag}@
  203. </github-raw>
  204. <github-code>https://github.com/spring-cloud/${docs.main}/tree/${github-tag}@</github-code>
  205. <github-issues>https://github.com/spring-cloud/${docs.main}/issues/@</github-issues>
  206. <github-wiki>https://github.com/spring-cloud/${docs.main}/wiki@</github-wiki>
  207. <github-master-code>https://github.com/spring-cloud/${docs.main}/tree/master@</github-master-code>
  208. <index-link>${index-link}@</index-link>
  209. <!-- Spring Cloud specific -->
  210. <!-- for backward compatibility -->
  211. <spring-cloud-version>${project.version}@</spring-cloud-version>
  212. <project-version>${project.version}@</project-version>
  213. <github-tag>${github-tag}@</github-tag>
  214. <version-type>${version-type}@</version-type>
  215. <docs-url>https://docs.spring.io/${docs.main}/docs/${project.version}@</docs-url>
  216. <raw-docs-url>${github-raw}@</raw-docs-url>
  217. <project-version>${project.version}@</project-version>
  218. <project-name>${docs.main}@</project-name>
  219. <source-highlighter>highlight.js</source-highlighter>
  220. </attributes>
  221. <!-- end::attributes[] -->
  222. <requires>
  223. <require>asciidoctor-diagram</require>
  224. </requires>
  225. </configuration>
  226. <executions>
  227. <execution>
  228. <id>generate-html-documentation</id>
  229. <phase>${generate-docs.phase}</phase>
  230. <goals>
  231. <goal>process-asciidoc</goal>
  232. </goals>
  233. <configuration>
  234. <backend>spring-html</backend>
  235. <sourceDocumentExtensions>
  236. <sourceDocumentExtension>.adoc</sourceDocumentExtension>
  237. <sourceDocumentExtension>.htmladoc</sourceDocumentExtension>
  238. </sourceDocumentExtensions>
  239. <outputDirectory>${generated-docs-multipage-output.dir}
  240. </outputDirectory>
  241. <doctype>book</doctype>
  242. <attributes>
  243. <docinfo>shared</docinfo>
  244. <stylesdir>css/</stylesdir>
  245. <stylesheet>site.css</stylesheet>
  246. <linkcss>true</linkcss>
  247. <icons>font</icons>
  248. <highlightjsdir>js/highlight</highlightjsdir>
  249. <highlightjs-theme>github</highlightjs-theme>
  250. <imagesdir>./images</imagesdir>
  251. <attribute-missing>warn</attribute-missing>
  252. <source-highlighter>highlight.js</source-highlighter>
  253. </attributes>
  254. <logHandler>
  255. <outputToConsole>true</outputToConsole>
  256. <failIf>
  257. <!-- <severity>DEBUG</severity>-->
  258. </failIf>
  259. </logHandler>
  260. </configuration>
  261. </execution>
  262. <execution>
  263. <id>generate-htmlsingle-documentation</id>
  264. <phase>${generate-docs.phase}</phase>
  265. <goals>
  266. <goal>process-asciidoc</goal>
  267. </goals>
  268. <configuration>
  269. <backend>spring-html</backend>
  270. <sourceDocumentExtensions>
  271. <sourceDocumentExtension>.htmlsingleadoc</sourceDocumentExtension>
  272. </sourceDocumentExtensions>
  273. <outputDirectory>
  274. ${generated-docs-singlepage-output.dir}
  275. </outputDirectory>
  276. <doctype>book</doctype>
  277. <attributes>
  278. <source-highlighter>highlight.js</source-highlighter>
  279. <docinfo>shared</docinfo>
  280. <stylesdir>css/</stylesdir>
  281. <stylesheet>site.css</stylesheet>
  282. <linkcss>true</linkcss>
  283. <icons>font</icons>
  284. <highlightjsdir>js/highlight</highlightjsdir>
  285. <highlightjs-theme>github</highlightjs-theme>
  286. <imagesdir>./images</imagesdir>
  287. </attributes>
  288. </configuration>
  289. </execution>
  290. <execution>
  291. <id>generate-pdf-documentation</id>
  292. <phase>${generate-docs.phase}</phase>
  293. <goals>
  294. <goal>process-asciidoc</goal>
  295. </goals>
  296. <configuration>
  297. <backend>pdf</backend>
  298. <sourceDocumentExtensions>
  299. <sourceDocumentExtension>.pdfadoc</sourceDocumentExtension>
  300. </sourceDocumentExtensions>
  301. <outputDirectory>${generated-docs-pdf-output.dir}
  302. </outputDirectory>
  303. <resources>
  304. <resource>
  305. <directory>${refdocs.build.directory}</directory>
  306. <excludes>
  307. <exclude>**/*</exclude>
  308. </excludes>
  309. </resource>
  310. </resources>
  311. </configuration>
  312. </execution>
  313. </executions>
  314. </plugin>
  315. <plugin>
  316. <groupId>org.apache.maven.plugins</groupId>
  317. <artifactId>maven-antrun-plugin</artifactId>
  318. <version>${maven-antrun-plugin.version}</version>
  319. <dependencies>
  320. <dependency>
  321. <groupId>ant-contrib</groupId>
  322. <artifactId>ant-contrib</artifactId>
  323. <version>1.0b3</version>
  324. <exclusions>
  325. <exclusion>
  326. <groupId>ant</groupId>
  327. <artifactId>ant</artifactId>
  328. </exclusion>
  329. </exclusions>
  330. </dependency>
  331. <dependency>
  332. <groupId>org.apache.ant</groupId>
  333. <artifactId>ant-nodeps</artifactId>
  334. <version>${ant-nodeps.version}</version>
  335. </dependency>
  336. <dependency>
  337. <groupId>org.tigris.antelope</groupId>
  338. <artifactId>antelopetasks</artifactId>
  339. <version>${antelopetasks.version}</version>
  340. </dependency>
  341. <dependency>
  342. <groupId>org.jruby</groupId>
  343. <artifactId>jruby-complete</artifactId>
  344. <version>${jruby-complete.version}</version>
  345. </dependency>
  346. <dependency>
  347. <groupId>org.asciidoctor</groupId>
  348. <artifactId>asciidoctorj</artifactId>
  349. <version>${asciidoctorj.version}</version>
  350. </dependency>
  351. </dependencies>
  352. <executions>
  353. <execution>
  354. <id>readme</id>
  355. <phase>prepare-package</phase>
  356. <goals>
  357. <goal>run</goal>
  358. </goals>
  359. <configuration>
  360. <target>
  361. <path id="readme.class.path">
  362. <pathelement location="${readme.main.classpath}"/>
  363. </path>
  364. <java classname="org.springframework.cloud.internal.asciidoctor.ReadmeMain"
  365. failonerror="yes" classpathref="${readme.class.path}">
  366. <!-- Input -->
  367. <arg value="${project.basedir}/src/main/asciidoc/README.adoc"/>
  368. <!-- Output -->
  369. <arg value="${main.basedir}/README.adoc"/>
  370. </java>
  371. </target>
  372. </configuration>
  373. </execution>
  374. <execution>
  375. <id>assert-no-unresolved-links</id>
  376. <phase>${generate-docs.phase}</phase>
  377. <goals>
  378. <goal>run</goal>
  379. </goals>
  380. <configuration>
  381. <target>
  382. <fileset id="unresolved.file" dir="${basedir}/target/generated-docs/"
  383. includes="**/*.html">
  384. <contains text="Unresolved"/>
  385. </fileset>
  386. <fail message="[Unresolved] Found...failing">
  387. <condition>
  388. <resourcecount when="greater"
  389. count="0"
  390. refid="unresolved.file"/>
  391. </condition>
  392. </fail>
  393. </target>
  394. </configuration>
  395. </execution>
  396. <execution>
  397. <id>copy-missing-html-files</id>
  398. <phase>${copy-missing-html-files.phase}</phase>
  399. <goals>
  400. <goal>run</goal>
  401. </goals>
  402. <configuration>
  403. <failOnError>false</failOnError>
  404. <target>
  405. <copy tofile="${project.build.directory}/generated-docs/reference/htmlsingle/index.html">
  406. <fileset dir="${project.build.directory}/generated-docs/reference/htmlsingle" includes="${docs.main}.html" />
  407. </copy>
  408. </target>
  409. </configuration>
  410. </execution>
  411. <execution>
  412. <id>package-and-attach-docs-zip</id>
  413. <phase>${package-and-attach-docs-zip.phase}</phase>
  414. <goals>
  415. <goal>run</goal>
  416. </goals>
  417. <configuration>
  418. <target>
  419. <zip
  420. destfile="${project.build.directory}/${project.artifactId}-${revision}.zip">
  421. <!--<zipfileset
  422. src="${project.build.directory}/${project.artifactId}-${revision}-javadoc.jar"
  423. prefix="api" />-->
  424. <!-- <fileset dir="${project.build.directory}/contents"/>-->
  425. <fileset dir="${project.build.directory}/generated-docs"/>
  426. </zip>
  427. </target>
  428. </configuration>
  429. </execution>
  430. <execution>
  431. <id>setup-maven-properties</id>
  432. <phase>initialize</phase>
  433. <goals>
  434. <goal>run</goal>
  435. </goals>
  436. <configuration>
  437. <exportAntProperties>true</exportAntProperties>
  438. <target>
  439. <taskdef resource="net/sf/antcontrib/antcontrib.properties"/>
  440. <taskdef name="stringutil" classname="ise.antelope.tasks.StringUtilTask"/>
  441. <var name="version-type" value="${revision}"/>
  442. <propertyregex property="version-type" override="true"
  443. input="${version-type}" regexp=".*\.(.*)" replace="\1"/>
  444. <propertyregex property="version-type" override="true"
  445. input="${version-type}" regexp="(M)\d+" replace="MILESTONE"/>
  446. <propertyregex property="version-type" override="true"
  447. input="${version-type}" regexp="(RC)\d+"
  448. replace="MILESTONE"/>
  449. <propertyregex property="version-type" override="true"
  450. input="${version-type}" regexp="BUILD-(.*)"
  451. replace="SNAPSHOT"/>
  452. <stringutil string="${version-type}" property="spring-cloud-repo">
  453. <lowercase/>
  454. </stringutil>
  455. <propertyregex property="git.branch" override="true"
  456. input="${git.branch}" regexp="origin/(.*)"
  457. replace="\1"/>
  458. <var name="github-tag" value="${git.branch}"/>
  459. </target>
  460. </configuration>
  461. </execution>
  462. </executions>
  463. </plugin>
  464. <plugin>
  465. <groupId>org.jfrog.buildinfo</groupId>
  466. <artifactId>artifactory-maven-plugin</artifactId>
  467. <version>${artifactory-maven-plugin.version}</version>
  468. <executions>
  469. <execution>
  470. <id>build-info</id>
  471. <goals>
  472. <goal>publish</goal>
  473. </goals>
  474. <configuration>
  475. <deployProperties>
  476. <zip.deployed>true</zip.deployed>
  477. <zip.type>docs</zip.type>
  478. </deployProperties>
  479. <publisher>
  480. <contextUrl>https://repo.spring.io
  481. </contextUrl>
  482. <repoKey>libs-release-local</repoKey>
  483. <snapshotRepoKey>libs-snapshots-local
  484. </snapshotRepoKey>
  485. </publisher>
  486. </configuration>
  487. </execution>
  488. </executions>
  489. </plugin>
  490. <plugin>
  491. <artifactId>maven-deploy-plugin</artifactId>
  492. <version>${maven-deploy-plugin.version}</version>
  493. <executions>
  494. <execution>
  495. <id>default-deploy</id>
  496. <phase>${maven-deploy-plugin-default.phase}</phase>
  497. <goals>
  498. <goal>deploy</goal>
  499. </goals>
  500. </execution>
  501. <execution>
  502. <id>upload-docs-zip</id>
  503. <phase>${upload-docs-zip.phase}</phase>
  504. <goals>
  505. <goal>deploy-file</goal>
  506. </goals>
  507. <configuration>
  508. <generatePom>false</generatePom>
  509. <groupId>${project.groupId}</groupId>
  510. <artifactId>${project.artifactId}</artifactId>
  511. <version>${project.version}</version>
  512. <repositoryId>${maven-deploy-plugin.deployZipRepositoryId}</repositoryId>
  513. <url>${maven-deploy-plugin.deployZipUrl}</url>
  514. <file>${project.build.directory}/${project.artifactId}-${project.version}.zip</file>
  515. <packaging>zip;zip.type=docs;zip.deployed=false;</packaging>
  516. </configuration>
  517. </execution>
  518. </executions>
  519. </plugin>
  520. </plugins>
  521. </pluginManagement>
  522. <plugins>
  523. <plugin>
  524. <groupId>pl.project13.maven</groupId>
  525. <artifactId>git-commit-id-plugin</artifactId>
  526. </plugin>
  527. <plugin>
  528. <groupId>org.codehaus.mojo</groupId>
  529. <artifactId>exec-maven-plugin</artifactId>
  530. </plugin>
  531. <plugin>
  532. <groupId>org.apache.maven.plugins</groupId>
  533. <artifactId>maven-dependency-plugin</artifactId>
  534. </plugin>
  535. <plugin>
  536. <groupId>org.apache.maven.plugins</groupId>
  537. <artifactId>maven-resources-plugin</artifactId>
  538. </plugin>
  539. <plugin>
  540. <groupId>org.asciidoctor</groupId>
  541. <artifactId>asciidoctor-maven-plugin</artifactId>
  542. <configuration>
  543. <attributes>
  544. <source-highlighter>highlight.js</source-highlighter>
  545. </attributes>
  546. </configuration>
  547. </plugin>
  548. <plugin>
  549. <groupId>org.apache.maven.plugins</groupId>
  550. <artifactId>maven-antrun-plugin</artifactId>
  551. </plugin>
  552. </plugins>
  553. </build>
  554. </profile>
  555. </profiles>
  556. </project>