Add verification for build artifacts required by maven to publish#28967
Merged
JimSuplizio merged 6 commits intoAzure:mainfrom May 19, 2022
Merged
Add verification for build artifacts required by maven to publish#28967JimSuplizio merged 6 commits intoAzure:mainfrom
JimSuplizio merged 6 commits intoAzure:mainfrom
Conversation
Contributor
Author
|
/azp run java - template |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
Author
|
/azp run java - spring-experimental |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
Author
|
/azp run java - cosmos |
|
Azure Pipelines successfully started running 1 pipeline(s). |
…le to make diagnosis easier
Contributor
Author
|
/azp run java - template |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
Author
|
/azp run java - template |
|
Azure Pipelines successfully started running 1 pipeline(s). |
srnagar
approved these changes
May 19, 2022
Member
srnagar
left a comment
There was a problem hiding this comment.
LGTM! Thanks for adding this verification step @JimSuplizio!
Collaborator
|
API change check API changes are not detected in this pull request. |
Contributor
Author
|
/azp run java - cosmos |
|
Azure Pipelines successfully started running 1 pipeline(s). |
…force an error on a pipeline
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Maven requires the following 4 artifacts to publish. Note: POM only publish, in the case of BOMs, only requires a POM file. That's a separate pipeline and has not been changed. This only affects pipelines that are building and publishing libraries.
The changelog.md and readme.md are also published, if they exist, but they aren't required. Further, the
changelog.md and readme.md are verified elsewhere and are also affected by YML variables as to whether
or not they even need to be verified. Because they aren't mandatory, they will not be verified here.
This verification runs immediately after the build step and will fail the run if the required files are not there. The reason this check is necessary is because we've had libraries whose javadoc exclusions have resulted in not producing a javadocs (we have to produce an 'empty' javadoc with the README.md as the file contents in this case) and, previously, this wasn't failing until someone tried to release the library.
@kushagraThapar and @moarychan, I made a minor change to your empty javadoc creation which was producing a completely empty Javadoc jar. Maven requirements state that if there are no sources or javadocs that we're to make a fake -sources.jar or -javadoc.jar with simple README inside to pass the checking. Now, I realize both libraries have released with fully empty javadoc jars and passed Maven but, I'm not sure how. Maven used to fail if the jar was completely empty. Other than adding the readme to the javadoc, there's no other changes.