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

Remove usage of oss-parent Maven parent and update ReleaseProcess.md #2159

Merged

Conversation

Marcono1234
Copy link
Collaborator

@Marcono1234 Marcono1234 commented Jul 26, 2022

Resolves #1605 (even though the bug described there was most likely not casued by oss-parent)
Related: #2149 (comment)

The oss-parent configuration has been applied manually to the root pom.xml, however there are some differences:

  • Newer plugin versions are used for source and javadoc JAR creation, and for GPG signing
    Note that the GPG plugin currently does not handle a missing GPG binary very well, throwing a NullPointerException
  • No snapshot repository for distribution is specified since Gson does not deploy snapshots (as far as I know)
  • Have not included Maven enforcer rule to prevent old Maven 2 versions (most plugins probably already require Maven 3 anyways)
  • Uses <releaseProfiles> option of the Maven Release Plugin. This apparently only enables the release profile for release:perform whereas the previous approach of using the <arguments> option with -P... seems to have also affected release:prepare. This means that Javadoc or signing issues would not be noticed until after release:perform. Should that be changed?

See also oss-parent POM here: https://repo1.maven.org/maven2/org/sonatype/oss/oss-parent/9/oss-parent-9.pom

This required some reordering of the plugins for the gson module to make sure they are executed in the correct order. Otherwise this would cause failures for javadoc:jar executed as part of the release.

I have tested this locally a bit by setting the scm information and the repository URL to a file:/// URI and it seems to work as desired (have not tested GPG). Though would be good if you could nonetheless check if these changes are reasonable.

Sonatype also seems to provide their own convenience plugin for publishing to Maven Central, see guide, maybe that would be useful in the future, but I think at the moment it would complicate migrating away from oss-parent a bit.

The oss-parent configuration has been applied manually to the root pom.xml,
except that now newer plugin versions are used for source and javadoc JAR
creation, and for GPG signing.

This required some reordering of the plugins for the gson module to make
sure they are executed in the correct order. Otherwise this would cause
failures for javadoc:jar.
Comment on lines +21 to +22
1. Optional: Create a post on the [Gson Discussion Forum](https://groups.google.com/group/google-gson).
1. Optional: Update the release version in [Wikipedia](https://en.wikipedia.org/wiki/Gson) and update the current "stable" release.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Have prefixed them with "Optional" because the Google Group does not seem to be that actively used anymore, so updating both of them might not be as important?

@Marcono1234 Marcono1234 mentioned this pull request Aug 20, 2022
@eamonnmcmanus
Copy link
Member

Sorry I didn't get to this earlier. Would you mind resolving the conflicts? Then I think we can try this out at the next release.

@eamonnmcmanus eamonnmcmanus merged commit 2266ccd into google:master Sep 6, 2022
@Marcono1234 Marcono1234 deleted the marcono1234/remove-oss-parent branch September 7, 2022 20:27
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.

Remove oss-parent pom
2 participants