You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by wu...@apache.org on 2023/04/03 06:30:58 UTC

[skywalking-java] 01/01: Build a dummy(empty) javadoc of finagle and jdk-http plugins

This is an automated email from the ASF dual-hosted git repository.

wusheng pushed a commit to branch fix-javadoc
in repository https://gitbox.apache.org/repos/asf/skywalking-java.git

commit 1c94dc8b02554f81263ea6e2b01e743512c27da8
Author: Wu Sheng <wu...@foxmail.com>
AuthorDate: Mon Apr 3 14:30:49 2023 +0800

    Build a dummy(empty) javadoc of finagle and jdk-http plugins
---
 CHANGES.md                                         |  1 +
 .../apm-sdk-plugin/finagle-6.25.x-plugin/pom.xml   | 34 ++++++++++++++++++++++
 .../bootstrap-plugins/jdk-http-plugin/pom.xml      | 34 ++++++++++++++++++++++
 3 files changed, 69 insertions(+)

diff --git a/CHANGES.md b/CHANGES.md
index 3061695744..404e808a34 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -25,6 +25,7 @@ Release Notes.
 * Fix a thread leak in `SamplingService` when updated sampling policy in the runtime.
 * Support MySQL plugin tracing SQL parameters when useServerPrepStmts 
 * Update the endpoint name of `Undertow` plugin to `Method:Path`.
+* Build a dummy(empty) javadoc of finagle and jdk-http plugins due to incompatibility.
 
 #### Documentation
 * Update docs of Tracing APIs, reorganize the API docs into six parts.
diff --git a/apm-sniffer/apm-sdk-plugin/finagle-6.25.x-plugin/pom.xml b/apm-sniffer/apm-sdk-plugin/finagle-6.25.x-plugin/pom.xml
index 76c3409492..40ac1b85fa 100644
--- a/apm-sniffer/apm-sdk-plugin/finagle-6.25.x-plugin/pom.xml
+++ b/apm-sniffer/apm-sdk-plugin/finagle-6.25.x-plugin/pom.xml
@@ -54,6 +54,40 @@
 
     <build>
         <plugins>
+            <!-- Build a dummy(empty) javadoc to satisfy maven central requirements -->
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-javadoc-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>attach-javadocs</id>
+                        <goals>
+                            <goal>jar</goal>
+                        </goals>
+                    </execution>
+                </executions>
+                <configuration>
+                    <failOnError>false</failOnError>
+                </configuration>
+            </plugin>
+            <!-- Ignore the error of javadoc build -->
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-jar-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>empty-javadoc-jar</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>jar</goal>
+                        </goals>
+                        <configuration>
+                            <classifier>javadoc</classifier>
+                            <classesDirectory>${basedir}/javadoc</classesDirectory>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
             <plugin>
                 <groupId>net.alchim31.maven</groupId>
                 <artifactId>scala-maven-plugin</artifactId>
diff --git a/apm-sniffer/bootstrap-plugins/jdk-http-plugin/pom.xml b/apm-sniffer/bootstrap-plugins/jdk-http-plugin/pom.xml
index dc5df3bbab..a4744f8686 100755
--- a/apm-sniffer/bootstrap-plugins/jdk-http-plugin/pom.xml
+++ b/apm-sniffer/bootstrap-plugins/jdk-http-plugin/pom.xml
@@ -40,6 +40,40 @@
             <plugin>
                 <artifactId>maven-deploy-plugin</artifactId>
             </plugin>
+            <!-- Ignore the error of javadoc build -->
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-javadoc-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>attach-javadocs</id>
+                        <goals>
+                            <goal>jar</goal>
+                        </goals>
+                    </execution>
+                </executions>
+                <configuration>
+                    <failOnError>false</failOnError>
+                </configuration>
+            </plugin>
+            <!-- Build a dummy(empty) javadoc to satisfy maven central requirements -->
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-jar-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>empty-javadoc-jar</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>jar</goal>
+                        </goals>
+                        <configuration>
+                            <classifier>javadoc</classifier>
+                            <classesDirectory>${basedir}/javadoc</classesDirectory>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
         </plugins>
     </build>
 </project>