|  | 
| 108 | 108 |     <!-- project version --> | 
| 109 | 109 |     <revision>0.3.0-SNAPSHOT</revision> | 
| 110 | 110 | 
 | 
|  | 111 | +    <!-- disable Javadoc generation. Can be overridden in child modules --> | 
|  | 112 | +    <maven.javadoc.skip>true</maven.javadoc.skip> | 
|  | 113 | + | 
| 111 | 114 |     <!-- disable `maven-site-plugin`--> | 
| 112 | 115 |     <maven.site.skip>true</maven.site.skip> | 
| 113 | 116 |     <maven.site.deploy.skip>true</maven.site.deploy.skip> | 
|  | 
| 187 | 190 |         </executions> | 
| 188 | 191 |       </plugin> | 
| 189 | 192 | 
 | 
|  | 193 | +      <!-- ███████ ████████  █████  ██████  ████████        ███████ ██ ████████ ███████ | 
|  | 194 | +         ██         ██    ██   ██ ██   ██    ██    ██     ██      ██    ██    ██ | 
|  | 195 | +         ███████    ██    ███████ ██████     ██           ███████ ██    ██    █████ | 
|  | 196 | +              ██    ██    ██   ██ ██   ██    ██    ██          ██ ██    ██    ██ | 
|  | 197 | +         ███████    ██    ██   ██ ██   ██    ██           ███████ ██    ██    ███████ | 
|  | 198 | +
 | 
|  | 199 | +         This section consists of plugins responsible for generating the site. | 
|  | 200 | +         Note that only this (i.e., the root) module is supposed to have a `site` goal, it is skipped for all other modules! --> | 
|  | 201 | + | 
|  | 202 | +      <!-- Remove the Maven Site Plugin execution --> | 
|  | 203 | +      <plugin> | 
|  | 204 | +        <groupId>org.apache.maven.plugins</groupId> | 
|  | 205 | +        <artifactId>maven-site-plugin</artifactId> | 
|  | 206 | +        <executions> | 
|  | 207 | +          <execution> | 
|  | 208 | +            <id>default-site</id> | 
|  | 209 | +            <phase>none</phase> | 
|  | 210 | +          </execution> | 
|  | 211 | +        </executions> | 
|  | 212 | +      </plugin> | 
|  | 213 | +      <!-- | 
|  | 214 | +        ~ JAVADOC GENERATION | 
|  | 215 | +        ~ 1. Define `currentYear` property used by the `maven-javadoc-plugin` configuration | 
|  | 216 | +        --> | 
|  | 217 | +      <plugin> | 
|  | 218 | +        <groupId>org.codehaus.mojo</groupId> | 
|  | 219 | +        <artifactId>build-helper-maven-plugin</artifactId> | 
|  | 220 | +        <executions> | 
|  | 221 | +          <execution> | 
|  | 222 | +            <id>define-currentYear-property</id> | 
|  | 223 | +            <goals> | 
|  | 224 | +              <goal>timestamp-property</goal> | 
|  | 225 | +            </goals> | 
|  | 226 | +            <phase>pre-site</phase> | 
|  | 227 | +            <inherited>false</inherited> | 
|  | 228 | +            <configuration> | 
|  | 229 | +              <name>currentYear</name> | 
|  | 230 | +              <pattern>yyyy</pattern> | 
|  | 231 | +              <locale>en_US</locale> | 
|  | 232 | +            </configuration> | 
|  | 233 | +          </execution> | 
|  | 234 | +        </executions> | 
|  | 235 | +      </plugin> | 
|  | 236 | +      <!-- 2. Generate the JavaDoc --> | 
|  | 237 | +      <plugin> | 
|  | 238 | +        <groupId>org.apache.maven.plugins</groupId> | 
|  | 239 | +        <artifactId>maven-javadoc-plugin</artifactId> | 
|  | 240 | +        <executions> | 
|  | 241 | +          <execution> | 
|  | 242 | +            <id>generate-site-javadoc</id> | 
|  | 243 | +            <goals> | 
|  | 244 | +              <goal>javadoc-no-fork</goal> | 
|  | 245 | +            </goals> | 
|  | 246 | +            <phase>pre-site</phase> | 
|  | 247 | +            <configuration combine.self="override"> | 
|  | 248 | +              <!-- `notimestamp` avoids `diff` noise and is required for reproducible builds: https://maven.apache.org/guides/mini/guide-reproducible-builds.html --> | 
|  | 249 | +              <notimestamp>true</notimestamp> | 
|  | 250 | +              <skip>${maven.javadoc.skip}</skip> | 
|  | 251 | +              <bottom><![CDATA[<p align="center"> | 
|  | 252 | +              Copyright © {inceptionYear}-{currentYear} {organizationName}. | 
|  | 253 | +              All Rights Reserved.<br/> | 
|  | 254 | +              Apache, Log4j, and the Apache feather logo are trademarks or registered trademarks of {organizationName}. | 
|  | 255 | +              Oracle and Java are registered trademarks of Oracle and/or its affiliates. | 
|  | 256 | +              Other names may be trademarks of their respective owners. | 
|  | 257 | +            </p>]]></bottom> | 
|  | 258 | +            </configuration> | 
|  | 259 | +          </execution> | 
|  | 260 | +        </executions> | 
|  | 261 | +      </plugin> | 
|  | 262 | +      <!-- 3. Move the JavaDoc to the main module --> | 
|  | 263 | +      <plugin> | 
|  | 264 | +        <groupId>org.apache.maven.plugins</groupId> | 
|  | 265 | +        <artifactId>maven-resources-plugin</artifactId> | 
|  | 266 | +        <executions> | 
|  | 267 | +          <execution> | 
|  | 268 | +            <id>copy-javadoc</id> | 
|  | 269 | +            <goals> | 
|  | 270 | +              <goal>copy-resources</goal> | 
|  | 271 | +            </goals> | 
|  | 272 | +            <phase>pre-site</phase> | 
|  | 273 | +            <configuration> | 
|  | 274 | +              <outputDirectory>${maven.multiModuleProjectDirectory}/target/site/javadoc/${project.artifactId}</outputDirectory> | 
|  | 275 | +              <resources> | 
|  | 276 | +                <resource> | 
|  | 277 | +                  <directory>target/site/apidocs</directory> | 
|  | 278 | +                </resource> | 
|  | 279 | +              </resources> | 
|  | 280 | +            </configuration> | 
|  | 281 | +          </execution> | 
|  | 282 | +        </executions> | 
|  | 283 | +      </plugin> | 
|  | 284 | + | 
| 190 | 285 |     </plugins> | 
| 191 | 286 |   </build> | 
| 192 | 287 | 
 | 
|  | 
0 commit comments