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

Simplify our maven-javadoc-plugin configuration, and move both it and maven-source-plugin to the default phase (which is package). #6772

Closed
wants to merge 0 commits into from

Conversation

copybara-service[bot]
Copy link
Contributor

Simplify our maven-javadoc-plugin configuration, and move both it and maven-source-plugin to the default phase (which is package).

I doubt that this ends up being a complete no-op in all scenarios (if only because of the phase change), but I didn't set out intending to change any behavior, and my various tests all passed:

  • mvn clean javadoc:jar deploy -DskipTests=true -Dmaven.deploy.skip=true (also also a similar test without javadoc:jar, as discussed below)
  • mvn clean deploy -Psonatype-oss-release -DskipTests -Drelease -Dmaven.deploy.skip=true (now that it's passing after cl/572327204)
  • mvn clean install -DskipTests

As part of this CL, I'm removing javadoc:jar from the command line we use for snapshots. I do this out of fear that it will someday result in "duplicated artifacts" (like cl/571437790), use the wrong configuration, or just run twice—as apparently it does in my test of the main changes from this CL:

[INFO] --- javadoc:3.5.0:jar (default-cli) @ guava ---
[INFO] No previous run data found, generating javadoc.
[INFO] Building jar: /usr/local/google/home/cpovirk/tmp.lS88PuqjZ4/git/guava/target/guava-HEAD-jre-SNAPSHOT-javadoc.jar
...
[INFO] --- javadoc:3.5.0:jar (attach-docs) @ guava ---
[INFO] Configuration changed, re-generating javadoc.
[INFO] Building jar: /usr/local/google/home/cpovirk/tmp.lS88PuqjZ4/git/guava/target/guava-HEAD-jre-SNAPSHOT-javadoc.jar

The new snapshot command appears to run Javadoc exactly once, as desired:

[INFO] --- javadoc:3.5.0:jar (attach-docs) @ guava ---
[INFO] No previous run data found, generating javadoc.

(While in the neighborhood, I considered also investigating a switch from jar to jar-no-fork, similar to what we did for maven-source-plugin, but I didn't bother. FWIW, I didn't notice any duplicate steps, so the switch might not buy us anything for Guava in particular.)

Also, I removed some mentions of org.apache.maven.plugins, which are redundant because that is the default.

RELNOTES=n/a

@copybara-service copybara-service bot closed this Oct 11, 2023
@copybara-service copybara-service bot deleted the test_572264125 branch October 11, 2023 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants