Skip to content

Commit

Permalink
Add GitHub Actions job for JavaDoc verification
Browse files Browse the repository at this point in the history
  • Loading branch information
pivovarit committed Oct 17, 2024
1 parent b8475f4 commit 3b8de11
Show file tree
Hide file tree
Showing 4 changed files with 83 additions and 38 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,19 @@ jobs:
- name: Build with Maven
run: mvn package

verify-javadoc:
runs-on: ubuntu-latest
name: Validate JavaDocs
steps:
- uses: actions/checkout@v4
- name: Setup JDK
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '23'
architecture: 'x64'
cache: 'maven'

- name: Validate JavaDocs
run: mvn -Pdoclint package -DskipTests=true

37 changes: 31 additions & 6 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<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/xsd/maven-4.0.0.xsd">
<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/xsd/maven-4.0.0.xsd">

<licenses>
<license>
Expand All @@ -25,11 +26,12 @@
<url>https://github.com/pivovarit/parallel-collectors</url>
<connection>scm:git:[email protected]:pivovarit/parallel-collectors.git</connection>
<developerConnection>scm:git:[email protected]:pivovarit/parallel-collectors.git</developerConnection>
<tag>HEAD</tag>
</scm>
<tag>HEAD</tag>
</scm>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.javadoc.plugin.version>3.10.1</maven.javadoc.plugin.version>
<junit.version>5.11.2</junit.version>
<assertj.version>3.26.3</assertj.version>
<awaitility.version>4.2.2</awaitility.version>
Expand All @@ -47,8 +49,7 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>3.13.0</version>
<configuration>
<source>21</source>
<target>21</target>
<release>21</release>
</configuration>
</plugin>

Expand Down Expand Up @@ -126,7 +127,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.10.1</version>
<version>${maven.javadoc.plugin.version}</version>
<executions>
<execution>
<id>attach-javadocs</id>
Expand Down Expand Up @@ -247,6 +248,30 @@
</plugins>
</build>
</profile>
<profile>
<id>doclint</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>${maven.javadoc.plugin.version}</version>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
<configuration>
<failOnWarnings>true</failOnWarnings>
<failOnError>true</failOnError>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>

<dependencies>
Expand Down
65 changes: 33 additions & 32 deletions src/main/java/com/pivovarit/collectors/ParallelCollectors.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ private ParallelCollectors() {
* .collect(parallel(i -> foo(i), toList()));
* }</pre>
*
* @param mapper a transformation to be performed in parallel
* @param collector the {@code Collector} describing the reduction
* @param <T> the type of the collected elements
* @param <R> the result returned by {@code mapper}
* @param <RR> the reduction result {@code collector}
* @param mapper a transformation to be performed in parallel
* @param collector the {@code Collector} describing the reduction
* @param <T> the type of the collected elements
* @param <R> the result returned by {@code mapper}
* @param <RR> the reduction result {@code collector}
*
* @return a {@code Collector} which collects all processed elements into a user-provided mutable {@code Collection} in parallel
*
Expand Down Expand Up @@ -106,12 +106,12 @@ private ParallelCollectors() {
* .collect(parallel(i -> foo(i), toList(), executor));
* }</pre>
*
* @param mapper a transformation to be performed in parallel
* @param collector the {@code Collector} describing the reduction
* @param executor the {@code Executor} to use for asynchronous execution
* @param <T> the type of the collected elements
* @param <R> the result returned by {@code mapper}
* @param <RR> the reduction result {@code collector}
* @param mapper a transformation to be performed in parallel
* @param collector the {@code Collector} describing the reduction
* @param executor the {@code Executor} to use for asynchronous execution
* @param <T> the type of the collected elements
* @param <R> the result returned by {@code mapper}
* @param <RR> the reduction result {@code collector}
*
* @return a {@code Collector} which collects all processed elements into a user-provided mutable {@code Collection} in parallel
*
Expand All @@ -135,9 +135,9 @@ private ParallelCollectors() {
* .collect(parallel(i -> foo()));
* }</pre>
*
* @param mapper a transformation to be performed in parallel
* @param <T> the type of the collected elements
* @param <R> the result returned by {@code mapper}
* @param mapper a transformation to be performed in parallel
* @param <T> the type of the collected elements
* @param <R> the result returned by {@code mapper}
*
* @return a {@code Collector} which collects all processed elements into a {@code Stream} in parallel
*
Expand All @@ -162,6 +162,7 @@ private ParallelCollectors() {
* }</pre>
*
* @param mapper a transformation to be performed in parallel
* @param parallelism the max parallelism level
* @param <T> the type of the collected elements
* @param <R> the result returned by {@code mapper}
*
Expand Down Expand Up @@ -215,10 +216,10 @@ private ParallelCollectors() {
* .collect(parallel(i -> foo(), executor));
* }</pre>
*
* @param mapper a transformation to be performed in parallel
* @param executor the {@code Executor} to use for asynchronous execution
* @param <T> the type of the collected elements
* @param <R> the result returned by {@code mapper}
* @param mapper a transformation to be performed in parallel
* @param executor the {@code Executor} to use for asynchronous execution
* @param <T> the type of the collected elements
* @param <R> the result returned by {@code mapper}
*
* @return a {@code Collector} which collects all processed elements into a {@code Stream} in parallel
*
Expand All @@ -242,9 +243,9 @@ private ParallelCollectors() {
* .forEach(System.out::println);
* }</pre>
*
* @param mapper a transformation to be performed in parallel
* @param <T> the type of the collected elements
* @param <R> the result returned by {@code mapper}
* @param mapper a transformation to be performed in parallel
* @param <T> the type of the collected elements
* @param <R> the result returned by {@code mapper}
*
* @return a {@code Collector} which collects all processed elements into a {@code Stream} in parallel
*
Expand Down Expand Up @@ -295,10 +296,10 @@ private ParallelCollectors() {
* .forEach(System.out::println);
* }</pre>
*
* @param mapper a transformation to be performed in parallel
* @param executor the {@code Executor} to use for asynchronous execution
* @param <T> the type of the collected elements
* @param <R> the result returned by {@code mapper}
* @param mapper a transformation to be performed in parallel
* @param executor the {@code Executor} to use for asynchronous execution
* @param <T> the type of the collected elements
* @param <R> the result returned by {@code mapper}
*
* @return a {@code Collector} which collects all processed elements into a {@code Stream} in parallel
*
Expand Down Expand Up @@ -350,9 +351,9 @@ private ParallelCollectors() {
* .forEach(System.out::println);
* }</pre>
*
* @param mapper a transformation to be performed in parallel
* @param <T> the type of the collected elements
* @param <R> the result returned by {@code mapper}
* @param mapper a transformation to be performed in parallel
* @param <T> the type of the collected elements
* @param <R> the result returned by {@code mapper}
*
* @return a {@code Collector} which collects all processed elements into a {@code Stream} in parallel
*
Expand Down Expand Up @@ -403,10 +404,10 @@ private ParallelCollectors() {
* .forEach(System.out::println);
* }</pre>
*
* @param mapper a transformation to be performed in parallel
* @param executor the {@code Executor} to use for asynchronous execution
* @param <T> the type of the collected elements
* @param <R> the result returned by {@code mapper}
* @param mapper a transformation to be performed in parallel
* @param executor the {@code Executor} to use for asynchronous execution
* @param <T> the type of the collected elements
* @param <R> the result returned by {@code mapper}
*
* @return a {@code Collector} which collects all processed elements into a {@code Stream} in parallel
*
Expand Down
3 changes: 3 additions & 0 deletions src/main/java/module-info.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/**
* Parallel Collectors is a toolkit that eases parallel collection processing in Java using Stream API without the limitations imposed by standard Parallel Streams
*/
module parallel.collectors {
exports com.pivovarit.collectors;
}

0 comments on commit 3b8de11

Please sign in to comment.