Skip to content

Commit

Permalink
fix: drop jdk srzip javadoc infra
Browse files Browse the repository at this point in the history
- chore: drop jdk srczip dependencies
- chore: cleanup comments and config related to srczip

Signed-off-by: Sam Gammon <[email protected]>
  • Loading branch information
sgammon committed Mar 10, 2024
1 parent 8b9387e commit 1a58b68
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 141 deletions.
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>
<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>

0 comments on commit 1a58b68

Please sign in to comment.