Skip to content

Commit 819ede3

Browse files
authored
Fix broken release (#185)
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.
1 parent a2fefee commit 819ede3

File tree

2 files changed

+20
-6
lines changed

2 files changed

+20
-6
lines changed

make-docs.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
#!/usr/bin/env python3
22
import os
3+
import shutil
4+
import subprocess
35

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

7-
if os.system("mvn javadoc:javadoc") != 0:
8-
exit("Maven javadoc plugin did not run correctly.")
8+
if os.path.exists('docs'):
9+
shutil.rmtree('docs')
10+
shutil.copytree('sdk/target/site/apidocs', 'docs')

sdk/pom.xml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,6 @@
122122
<additionalJOptions>
123123
<additionalJOption>--allow-script-in-comments</additionalJOption>
124124
</additionalJOptions>
125-
<reportOutputDirectory>../</reportOutputDirectory>
126-
<destDir>docs</destDir>
127125
<windowtitle>AWS IoT Device SDK Java V2</windowtitle>
128126
<encoding>UTF-8</encoding>
129127
<docencoding>UTF-8</docencoding>
@@ -191,6 +189,20 @@
191189
</execution>
192190
</executions>
193191
</plugin>
192+
<!-- javadoc jar -->
193+
<plugin>
194+
<groupId>org.apache.maven.plugins</groupId>
195+
<artifactId>maven-javadoc-plugin</artifactId>
196+
<version>3.3.0</version>
197+
<executions>
198+
<execution>
199+
<id>attach-javadocs</id>
200+
<goals>
201+
<goal>jar</goal>
202+
</goals>
203+
</execution>
204+
</executions>
205+
</plugin>
194206
<!-- GPG signing -->
195207
<plugin>
196208
<groupId>org.apache.maven.plugins</groupId>

0 commit comments

Comments
 (0)