RFR: Update JOpt Simple to 5.0.4

Oliver Eikemeier github.com+604196+eikemeier at openjdk.java.net
Tue Aug 31 19:30:08 UTC 2021


On Wed, 18 Aug 2021 07:38:46 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

> Downstream projects that depend on `jmh-core` should not have a dependency on another `jopt-simple`.

Why? Let's assume I want to benchmark [`avro-tools`](https://mvnrepository.com/artifact/org.apache.avro/avro-tools/1.10.2) and pass command line parameters while calling `main`. Does this mean any such use case is out of scope for `jmh`?

>  If they do depend on `jopt-simple` 5.0.4 via the parent POMs or something, then they need to use `<exclusion>` to exclude older `jopt-simple` and let JMH use its own.

You can't, because they are needed in the benchmarked part. The easy solution would be to upgrade `jopt-simple`, because it's a pretty old library and everyone else is using 5.0.4 (4.6 is ancient), a more elaborate solution would be to shadow `jopt-simple` in `jmh`.

-------------

PR: https://git.openjdk.java.net/jmh/pull/49


More information about the jmh-dev mailing list