Skip to content

Commit 78bd8d2

Browse files
committed
GH-476: Assemble Zip for Javadocs
Fixes: #476 * Add `maven-assembly-plugin` to Zip Javadocs from the `apidocs` dir into a `*-docs.zip` artifact * Modify `build-and-deploy-snapshot.yml` and `release.yml` to assign `zip.deployed=false` attribute to Zip artifacts * Also mark `docs.zip` files as `zip.type=docs`
1 parent ed9861d commit 78bd8d2

File tree

3 files changed

+36
-0
lines changed

3 files changed

+36
-0
lines changed

.github/workflows/build-and-deploy-snapshot.yml

+3
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ jobs:
3535
folder: 'deployment-repository'
3636
signing-key: ${{ secrets.GPG_PRIVATE_KEY }}
3737
signing-passphrase: ${{ secrets.GPG_PASSPHRASE }}
38+
artifact-properties: |
39+
/**/*.zip::zip.name=${{ github.event.repository.name }},zip.deployed=false
40+
/**/*docs.zip::zip.type=docs
3841
- name: Send Notification
3942
uses: ./.github/actions/send-notification
4043
if: always()

.github/workflows/release.yml

+3
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ jobs:
3333
folder: 'deployment-repository'
3434
signing-key: ${{ secrets.GPG_PRIVATE_KEY }}
3535
signing-passphrase: ${{ secrets.GPG_PASSPHRASE }}
36+
artifact-properties: |
37+
/**/*.zip::zip.name=${{ github.event.repository.name }},zip.deployed=false
38+
/**/*docs.zip::zip.type=docs
3639
outputs:
3740
version: ${{ steps.build-and-publish.outputs.version }}
3841
sync-to-maven-central:

pom.xml

+30
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,36 @@
271271
</execution>
272272
</executions>
273273
</plugin>
274+
<plugin>
275+
<artifactId>maven-assembly-plugin</artifactId>
276+
<version>3.7.1</version>
277+
<configuration>
278+
<inlineDescriptors>
279+
<inlineDescriptor>
280+
<id>docs</id>
281+
<formats>
282+
<format>zip</format>
283+
</formats>
284+
<includeBaseDirectory>false</includeBaseDirectory>
285+
<fileSets>
286+
<fileSet>
287+
<directory>${project.build.directory}/reports/apidocs</directory>
288+
<outputDirectory>/apidocs</outputDirectory>
289+
</fileSet>
290+
</fileSets>
291+
</inlineDescriptor>
292+
</inlineDescriptors>
293+
</configuration>
294+
<executions>
295+
<execution>
296+
<id>docs-assembly</id>
297+
<phase>package</phase>
298+
<goals>
299+
<goal>single</goal>
300+
</goals>
301+
</execution>
302+
</executions>
303+
</plugin>
274304
</plugins>
275305
</build>
276306

0 commit comments

Comments
 (0)