skip non-class files in the exclusions processing for MergeJars #1239
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.
Note: This is a dupe of #1125 . I had to reopen the PR from a different GH org.
This is sort of an addendum to #1106 and #1107
In the previous PR, I added an exception for
COPYRIGHT
andNOTICE
since it was the same kind of use case as the existingLICENSE
exception.The issue that I am having is that I have files that should be present in all of the jars being published in a repo that are not
COPYRIGHT
,NOTICE
, orLICENSE
. For example aproject-version.properties
file that contains info about the build.Changing the
readExcludedFileNames
function to only process*.class
files allows for these files to propagate to the final jar. It also still passes all existing test cases.The only test for this functionality is specifically looking at
.class
files.https://github.com/bazelbuild/rules_jvm_external/blob/master/tests/com/github/bazelbuild/rules_jvm_external/jar/MergeJarsTest.java#L221I am open to other solutions, but this seems to have fixed a lot of issues for my use case without breaking any existing functionality that is being tested for.