Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: drop jdk srzip javadoc infra #7092

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 0 additions & 69 deletions android/guava/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -106,23 +106,8 @@
<plugin>
<artifactId>maven-source-plugin</artifactId>
</plugin>
<!-- TODO(cpovirk): include JDK sources when building testlib doc, too -->
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you happen to have thoughts on whether it might make sense to remove this entirely? I'm guessing so, but I'm not sure.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, it looks like you did it on the non-Android side, so probably.

<executions>
<execution>
<id>unpack-jdk-sources</id>
<phase>generate-sources</phase>
<goals><goal>unpack-dependencies</goal></goals>
<configuration>
<includeArtifactIds>srczip</includeArtifactIds>
<outputDirectory>${project.build.directory}/jdk-sources</outputDirectory>
<silent>false</silent>
<!-- Exclude module-info files (since we're using -source 8 to avoid other modules problems) and FileDescriptor (which uses a language feature not available in Java 8). -->
<excludes>**/module-info.java,**/java/io/FileDescriptor.java</excludes>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
Expand All @@ -131,11 +116,6 @@
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<!-- TODO(cpovirk): Move this to the parent after making jdk-sources available there. -->
<!-- TODO(cpovirk): can we use includeDependencySources and a local com.oracle.java:jdk-lib:noversion:sources instead of all this unzipping and manual sourcepath modification? -->
<!-- (We need JDK *sources*, not just -link, so that {@inheritDoc} works.) -->
<sourcepath>${project.build.sourceDirectory}:${project.build.directory}/jdk-sources</sourcepath>

<!-- Passing `-subpackages com.google.common` breaks things, so we explicitly exclude everything else instead. -->
<!-- excludePackageNames requires specification of packages separately from "all subpackages".
https://issues.apache.org/jira/browse/MJAVADOC-584 -->
Expand Down Expand Up @@ -247,53 +227,4 @@
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>srczip-parent</id>
<activation>
<file>
<exists>${java.home}/../src.zip</exists>
</file>
</activation>
<dependencies>
<dependency>
<groupId>jdk</groupId>
<artifactId>srczip</artifactId>
<version>999</version>
<scope>system</scope>
<systemPath>${java.home}/../src.zip</systemPath>
<optional>true</optional>
</dependency>
</dependencies>
</profile>
<profile>
<id>srczip-lib</id>
<activation>
<file>
<exists>${java.home}/lib/src.zip</exists>
</file>
</activation>
<dependencies>
<dependency>
<groupId>jdk</groupId>
<artifactId>srczip</artifactId>
<version>999</version>
<scope>system</scope>
<systemPath>${java.home}/lib/src.zip</systemPath>
<optional>true</optional>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<!-- We need to point at the java.base subdirectory because Maven appears to assume that package foo.bar is located in foo/bar and not java.base/foo/bar when translating excludePackageNames into filenames to pass to javadoc. (Note that manually passing -exclude to javadoc appears to possibly not work at all for java.* types??) Also, referring only to java.base avoids a lot of other sources. -->
<sourcepath>${project.build.sourceDirectory}:${project.build.directory}/jdk-sources/java.base</sourcepath>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
72 changes: 0 additions & 72 deletions guava/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@
<groupId>com.google.j2objc</groupId>
<artifactId>j2objc-annotations</artifactId>
</dependency>
<!-- TODO(cpovirk): does this comment belong on the <dependency> in <profiles>? -->
<!-- TODO(cpovirk): want this only for dependency plugin but seems not to work there? Maven runs without failure, but the resulting Javadoc is missing the hoped-for inherited text -->
</dependencies>
<build>
<resources>
Expand Down Expand Up @@ -106,36 +104,13 @@
<plugin>
<artifactId>maven-source-plugin</artifactId>
</plugin>
<!-- TODO(cpovirk): include JDK sources when building testlib doc, too -->
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>unpack-jdk-sources</id>
<phase>generate-sources</phase>
<goals><goal>unpack-dependencies</goal></goals>
<configuration>
<includeArtifactIds>srczip</includeArtifactIds>
<outputDirectory>${project.build.directory}/jdk-sources</outputDirectory>
<silent>false</silent>
<!-- Exclude module-info files (since we're using -source 8 to avoid other modules problems) and FileDescriptor (which uses a language feature not available in Java 8). -->
<excludes>**/module-info.java,**/java/io/FileDescriptor.java</excludes>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>animal-sniffer-maven-plugin</artifactId>
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<!-- TODO(cpovirk): Move this to the parent after making jdk-sources available there. -->
<!-- TODO(cpovirk): can we use includeDependencySources and a local com.oracle.java:jdk-lib:noversion:sources instead of all this unzipping and manual sourcepath modification? -->
<!-- (We need JDK *sources*, not just -link, so that {@inheritDoc} works.) -->
<sourcepath>${project.build.sourceDirectory}:${project.build.directory}/jdk-sources</sourcepath>

<!-- Passing `-subpackages com.google.common` breaks things, so we explicitly exclude everything else instead. -->
<!-- excludePackageNames requires specification of packages separately from "all subpackages".
https://issues.apache.org/jira/browse/MJAVADOC-584 -->
Expand Down Expand Up @@ -248,52 +223,5 @@
</plugins>
</build>
<profiles>
<profile>
<id>srczip-parent</id>
<activation>
<file>
<exists>${java.home}/../src.zip</exists>
</file>
</activation>
<dependencies>
<dependency>
<groupId>jdk</groupId>
<artifactId>srczip</artifactId>
<version>999</version>
<scope>system</scope>
<systemPath>${java.home}/../src.zip</systemPath>
<optional>true</optional>
</dependency>
</dependencies>
</profile>
<profile>
<id>srczip-lib</id>
<activation>
<file>
<exists>${java.home}/lib/src.zip</exists>
</file>
</activation>
<dependencies>
<dependency>
<groupId>jdk</groupId>
<artifactId>srczip</artifactId>
<version>999</version>
<scope>system</scope>
<systemPath>${java.home}/lib/src.zip</systemPath>
<optional>true</optional>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<!-- We need to point at the java.base subdirectory because Maven appears to assume that package foo.bar is located in foo/bar and not java.base/foo/bar when translating excludePackageNames into filenames to pass to javadoc. (Note that manually passing -exclude to javadoc appears to possibly not work at all for java.* types??) Also, referring only to java.base avoids a lot of other sources. -->
<sourcepath>${project.build.sourceDirectory}:${project.build.directory}/jdk-sources/java.base</sourcepath>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>