aboutsummaryrefslogtreecommitdiffstats
path: root/docs/pom.xml
blob: a9d821970e641bd62905b9380e9d7c756a170dbb (plain)
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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
<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/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>org.aspectj</groupId>
    <artifactId>aspectj-parent</artifactId>
    <version>1.9.22-SNAPSHOT</version>
  </parent>

  <artifactId>docs</artifactId>

  <profiles>
    <profile>
      <id>create-docs</id>
      <activation>
        <property>
          <name>createDocs</name>
          <value>true</value>
        </property>
      </activation>

      <build>
        <plugins>
          <plugin>
            <groupId>org.asciidoctor</groupId>
            <artifactId>asciidoctor-maven-plugin</artifactId>
            <configuration>
              <sourceDirectory>${project.basedir}</sourceDirectory>
              <preserveDirectories>true</preserveDirectories>
              <relativeBaseDir>true</relativeBaseDir>
              <attributes>
                <!-- Avoid "Last updated [timestamp]" footer on each page -->
                <nofooter>true</nofooter>
              </attributes>
              <resources>
                <resource>
                  <!-- Mandatory, even though identical to 'sourceDirectory' -->
                  <directory>${project.basedir}</directory>
                  <excludes>
                    <!-- Generally excluded file extensions -->
                    <exclude>**/*.doc</exclude>
                    <exclude>**/*.vsd</exclude>
                    <!-- Files excluded in root directory -->
                    <exclude>*.iml</exclude>
                    <exclude>pom.xml*</exclude>
                    <exclude>build.xml</exclude>
                    <exclude>docs.build.properties</exclude>
                    <!-- Files excluded in subdirectories -->
                    <exclude>developer/*.txt</exclude>
                    <exclude>developer/ajdt/**</exclude>
                    <exclude>developer/ram-disk/**</exclude>
                    <exclude>developer/traces/**</exclude>
                    <exclude>install/**</exclude>
                    <exclude>sandbox/**</exclude>
                    <exclude>src/**</exclude>
                    <exclude>target/**</exclude>
                    <exclude>teaching/**</exclude>
                    <exclude>test/**</exclude>
                  </excludes>
                </resource>
              </resources>
            </configuration>
            <executions>
              <execution>
                <id>create-html-from-asciidoc</id>
                <phase>generate-resources</phase>
                <goals>
                  <goal>process-asciidoc</goal>
                </goals>
              </execution>
              <execution>
                <id>generate-pdf-adk15notebook</id>
                <phase>generate-resources</phase>
                <goals>
                  <goal>process-asciidoc</goal>
                </goals>
                <configuration>
                  <backend>pdf</backend>
                  <sourceDocumentName>adk15notebook/adk15notebook.adoc</sourceDocumentName>
                  <skip>false</skip>
                </configuration>
              </execution>
              <execution>
                <id>generate-pdf-devguide</id>
                <phase>generate-resources</phase>
                <goals>
                  <goal>process-asciidoc</goal>
                </goals>
                <configuration>
                  <backend>pdf</backend>
                  <sourceDocumentName>devguide/devguide.adoc</sourceDocumentName>
                  <skip>false</skip>
                </configuration>
              </execution>
              <execution>
                <id>generate-pdf-pdguide</id>
                <phase>generate-resources</phase>
                <goals>
                  <goal>process-asciidoc</goal>
                </goals>
                <configuration>
                  <backend>pdf</backend>
                  <sourceDocumentName>pdguide/pdguide.adoc</sourceDocumentName>
                  <skip>false</skip>
                </configuration>
              </execution>
              <execution>
                <id>generate-pdf-progguide</id>
                <phase>generate-resources</phase>
                <goals>
                  <goal>process-asciidoc</goal>
                </goals>
                <configuration>
                  <backend>pdf</backend>
                  <sourceDocumentName>progguide/progguide.adoc</sourceDocumentName>
                  <skip>false</skip>
                </configuration>
              </execution>
              <execution>
                <id>generate-pdf-design-overview</id>
                <phase>generate-resources</phase>
                <goals>
                  <goal>process-asciidoc</goal>
                </goals>
                <configuration>
                  <backend>pdf</backend>
                  <sourceDocumentName>developer/design-overview.adoc</sourceDocumentName>
                  <skip>false</skip>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-resources-plugin</artifactId>
            <executions>
              <execution>
                <id>copy-docs-to-dist</id>
                <phase>package</phase>
                <goals>
                  <goal>copy-resources</goal>
                </goals>
                <configuration>
                  <outputDirectory>${project.basedir}/../aj-build/dist/docs/doc</outputDirectory>
                  <resources>
                    <resource>
                      <directory>${project.build.directory}/generated-docs</directory>
                      <!-- Exclude HTML content created from asciidoc files irrelevant for the distribution -->
                      <excludes>
                        <!-- Files excluded in root directory -->
                        <exclude>readme-docs-module.html</exclude>
                        <!-- Files excluded in subdirectories -->
                        <exclude>developer/ajdt/**</exclude>
                        <exclude>developer/traces/**</exclude>
                        <exclude>install/**</exclude>
                        <exclude>sandbox/**</exclude>
                        <exclude>target/**</exclude>
                        <exclude>teaching/**</exclude>
                        <exclude>test/**</exclude>
                      </excludes>
                    </resource>
                  </resources>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

</project>