[MRRESOURCES-150] Ensure reproducible order in bundle#69
[MRRESOURCES-150] Ensure reproducible order in bundle#69slawekjaranowski merged 5 commits intoapache:masterfrom
Conversation
|
@elharo @slawekjaranowski please review when you have some time |
|
I moved issue to correct jira project - https://issues.apache.org/jira/browse/MRRESOURCES-150 |
Added.
Thanks.
PR title updated. Would you like me to squash commits and force-push? |
src/test/java/org/apache/maven/plugin/resources/remote/RemoteResourcesMojoTest.java
Outdated
Show resolved
Hide resolved
I can squash .... |
| import org.eclipse.aether.internal.impl.SimpleLocalRepositoryManagerFactory; | ||
| import org.eclipse.aether.repository.LocalRepository; | ||
|
|
||
| import static org.assertj.core.api.Assertions.assertThat; |
There was a problem hiding this comment.
These days we're using Hamcrest, not assertj
There was a problem hiding this comment.
It is only test dependencies .... I will not require
even more JUnit 5 doesn't use it
There was a problem hiding this comment.
I'd like to settle on one thing. I don't care much which one, but let's not have a random mix of libraries doing the same thing.
There was a problem hiding this comment.
we didn't use any Hamcrest nor assertj until this PR
@elharo any other remarks?
There was a problem hiding this comment.
My impression is that across Maven and even more broadly across Java, but definitely within Maven hamcrest is far more common now. I've certainly seen it a lot more while working my way through all the plugins than I've seen assert4j, though they are both present. JUnit 4 already depends on Hamcrest, though that got removed in JUnit 5.
There was a problem hiding this comment.
ok we have Hamcrest so I would like to merge
|
@adoroszlai thanks |
|
Thanks @elharo, @slawekjaranowski for the review. |
|
Resolve #194 |
What changes were proposed in this pull request?
remote-resources:bundlecreates output that may not be reproducible.maven-remote-resources-plugin/src/main/java/org/apache/maven/plugin/resources/remote/BundleRemoteResourcesMojo.java
Lines 108 to 122 in 7a40047
DirectoryScannerusesjava.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
naturalOrdertoreverseOrder, and repeated. Verified output is reversed between the two runs.