Skip to content

Commit

Permalink
Fix broken release (#185)
Browse files Browse the repository at this point in the history
When revamping docs, we accidentally removed the javadoc jar from release builds. Now it's back.

Also, tweak make-docs.py script so it just copies javadoc from target/ to docs/. Trying to control its location via `reportOutputDirectory` and `destDir` wasn't always working how we expected.
  • Loading branch information
graebm authored Oct 31, 2021
1 parent a2fefee commit 819ede3
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 6 deletions.
10 changes: 6 additions & 4 deletions make-docs.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
#!/usr/bin/env python3
import os
import shutil
import subprocess

if os.system("mvn clean package") != 0:
exit("maven clean package not built.")
subprocess.run(['mvn', 'clean', 'javadoc:javadoc'], check=True)

if os.system("mvn javadoc:javadoc") != 0:
exit("Maven javadoc plugin did not run correctly.")
if os.path.exists('docs'):
shutil.rmtree('docs')
shutil.copytree('sdk/target/site/apidocs', 'docs')
16 changes: 14 additions & 2 deletions sdk/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,6 @@
<additionalJOptions>
<additionalJOption>--allow-script-in-comments</additionalJOption>
</additionalJOptions>
<reportOutputDirectory>../</reportOutputDirectory>
<destDir>docs</destDir>
<windowtitle>AWS IoT Device SDK Java V2</windowtitle>
<encoding>UTF-8</encoding>
<docencoding>UTF-8</docencoding>
Expand Down Expand Up @@ -191,6 +189,20 @@
</execution>
</executions>
</plugin>
<!-- javadoc jar -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.3.0</version>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- GPG signing -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down

0 comments on commit 819ede3

Please sign in to comment.