-
Notifications
You must be signed in to change notification settings - Fork 0
/
pom.xml
143 lines (141 loc) · 7.07 KB
/
pom.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.paulojeronimo</groupId>
<artifactId>maven-asciidoctorj-template</artifactId>
<version>1.0.0-SNAPSHOT</version>
<name>Template para documentos escritos em AsciiDoc e gerados com o Maven</name>
<description>Este projeto gera os documentos usando o AsciiDoctorJ e o Maven</description>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<asciidoctor.maven.plugin.version>2.0.0</asciidoctor.maven.plugin.version>
<builder.helper.maven.plugin.version>3.2.0</builder.helper.maven.plugin.version>
<asciidoctorj.pdf.version>1.5.3</asciidoctorj.pdf.version>
<asciidoctorj.version>2.3.0</asciidoctorj.version>
<jruby.version>9.2.11.1</jruby.version>
</properties>
<build>
<defaultGoal>process-resources</defaultGoal>
<plugins>
<plugin>
<!-- Ref1 (see all at end of this document) -->
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>${builder.helper.maven.plugin.version}</version>
<executions>
<execution>
<id>timestamp-property</id>
<goals>
<goal>timestamp-property</goal>
</goals>
<configuration>
<name>build.time</name>
<pattern>dd/MM/yyyy HH:mm</pattern>
<locale>pt_BR</locale>
<timeZone>America/Sao_Paulo</timeZone>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.asciidoctor</groupId>
<artifactId>asciidoctor-maven-plugin</artifactId>
<version>${asciidoctor.maven.plugin.version}</version>
<dependencies>
<dependency>
<groupId>org.asciidoctor</groupId>
<artifactId>asciidoctorj-pdf</artifactId>
<version>${asciidoctorj.pdf.version}</version>
</dependency>
<!-- Comment this section to use the default jruby artifact provided by the plugin -->
<dependency>
<groupId>org.jruby</groupId>
<artifactId>jruby-complete</artifactId>
<version>${jruby.version}</version>
</dependency>
<!-- Comment this section to use the default AsciidoctorJ artifact provided by the plugin -->
<dependency>
<groupId>org.asciidoctor</groupId>
<artifactId>asciidoctorj</artifactId>
<version>${asciidoctorj.version}</version>
</dependency>
</dependencies>
<configuration>
<sourceDirectory>src/docs</sourceDirectory>
<!-- Attributes common to all output formats -->
<attributes>
<sourcedir>${project.build.sourceDirectory}</sourcedir>
<toc-title>Conteúdo</toc-title>
<!-- Ref2 -->
<revnumber>${project.version}</revnumber>
<revdate>${build.time}</revdate>
</attributes>
</configuration>
<executions>
<execution>
<id>asciidoc-to-html</id>
<phase>generate-resources</phase>
<goals>
<goal>process-asciidoc</goal>
</goals>
<configuration>
<backend>html5</backend>
<outputDirectory>${project.build.directory}/docs/html</outputDirectory>
<!-- Use `book` docType to enable title page generation -->
<attributes>
<linkcss>true</linkcss>
<imagesdir>./images</imagesdir>
<source-highlighter>coderay</source-highlighter>
<icons>font</icons>
<pagenums/>
<toc/>
<idprefix/>
<idseparator>-</idseparator>
</attributes>
</configuration>
</execution>
<execution>
<id>asciidoc-to-pdf</id>
<phase>generate-resources</phase>
<goals>
<goal>process-asciidoc</goal>
</goals>
<configuration>
<backend>pdf</backend>
<outputDirectory>${project.build.directory}/docs/pdf</outputDirectory>
<!-- Use `book` docType to enable title page generation -->
<doctype>book</doctype>
<attributes>
<pdf-stylesdir>${project.basedir}/src/pdf-styles</pdf-stylesdir>
<pdf-style>doc1</pdf-style>
<source-highlighter>coderay</source-highlighter>
<icons>font</icons>
<pagenums/>
<toc/>
<idprefix/>
<idseparator>-</idseparator>
</attributes>
<!-- Ref3 -->
<resources>
<resource>
<directory>src/docs</directory>
<excludes>
<exclude>images/**</exclude>
</excludes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
<!-- References:
Ref1: https://stackoverflow.com/questions/28281988/how-to-have-maven-show-local-timezone-in-maven-build-timestamp/47591695
Ref2: https://github.com/asciidoctor/asciidoctor-maven-plugin#add-version-and-build-date-to-the-header
Ref3: https://asciidoctor.org/docs/asciidoctor-maven-plugin/#configuration
-->