More findings from working with MVN repository
When mvn release:perform is run, there are two steps that I didn’t pay attention to before. Of course, the building, signing, and uploading of JARs/POMs to the staging repository is expected from the various updates to the POMs seen from the previous post.
Here are the steps:
- Creation of a staging repository
- Building, signing, and uploading artifacts into the staging repository
- Closing the staging repository
- Releasing the staging repository
Looking at the logs of the release more closely, this can be seen:
... [INFO] * Upload of locally staged artifacts finished. [INFO] * Closing staging repository with ID "comtherealvan-1016". Waiting for operation to complete... ........ [INFO] Remote staged 1 repositories, finished with success. [INFO] Remote staging repositories are being released... Waiting for operation to complete... ....... [INFO] Remote staging repositories released. [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 01:39 min ...
Parent POMs
Yep. More notes about parent POMs that have <packaging>pom</packaging> and global props that submodules inherit:
Closing and releasing have to be done manually
A staging repository will be created. However, I have to log into https://oss.sonatype.org/ and look up the staging repository (I just search for my group ID “therealvan.com” to find my artifacts).
Then I have to select my staging repository and click “Close” and then, after it successfully closes, click “Release” to release the repository. There is also a “Drop” to remove the staging repository when it’s no longer needed (e.g. clean up after a successful release or aborting a release).
More information is expected
For parent POMs, I ran into errors when trying to close the staging repository. They have to do with missing:
- Developer information
- Licensing information
- Project description
- Project URL
These do not seem to be required (at least for now) when the closing and releasing are done as part of mvn release:perform. However, when closing the staging repository manually, these come up as errors.
Fortunately, they are easy to fix:
- Developer information can be provided using the <developers> section in the POM.
- Licensing information can be provided using the <licenses> section in the POM.
- Project description and URL are just <description> and <url> tags for the top-level <project>.