[ https://issues.apache.org/jira/browse/MRESOURCES-311?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17906400#comment-17906400 ]
ASF GitHub Bot commented on MRESOURCES-311: ------------------------------------------- adoroszlai opened a new pull request, #69: URL: https://github.com/apache/maven-remote-resources-plugin/pull/69 ## What changes were proposed in this pull request? `remote-resources:bundle` creates output that may not be reproducible. https://github.com/apache/maven-remote-resources-plugin/blob/7a40047813a7cfde0a1bfeedff66bdc76f7ea430/src/main/java/org/apache/maven/plugin/resources/remote/BundleRemoteResourcesMojo.java#L108-L122 `DirectoryScanner` uses `java.io.File.list()`, which does not guarantee order. https://issues.apache.org/jira/browse/MRESOURCES-311 ## How was this patch tested? Built the plugin and used it in another project. Changed `naturalOrder` to `reverseOrder`, and repeated. Verified output is reversed between the two runs. > Ensure reproducible order in bundle > ----------------------------------- > > Key: MRESOURCES-311 > URL: https://issues.apache.org/jira/browse/MRESOURCES-311 > Project: Maven Resources Plugin > Issue Type: Improvement > Reporter: Attila Doroszlai > Priority: Major > > {{remote-resources:bundle}} creates output that may not be reproducible. > {code:title=https://github.com/apache/maven-remote-resources-plugin/blob/7a40047813a7cfde0a1bfeedff66bdc76f7ea430/src/main/java/org/apache/maven/plugin/resources/remote/BundleRemoteResourcesMojo.java#L108-L122} > DirectoryScanner scanner = new DirectoryScanner(); > scanner.setBasedir(resourcesDirectory); > if (includes != null && includes.length != 0) { > scanner.setIncludes(includes); > } else { > scanner.setIncludes(DEFAULT_INCLUDES); > } > if (excludes != null && excludes.length != 0) { > scanner.setExcludes(excludes); > } > scanner.addDefaultExcludes(); > scanner.scan(); > {code} > {{DirectoryScanner}} uses {{java.io.File.list()}}, which does not guarantee > order. -- This message was sent by Atlassian Jira (v8.20.10#820010)