New feature, improvement proposal
- Given the command:
- The command, with
.mvn/maven.config:
gives:
Apache Maven 3.9.14 (996c630dbc656c76214ce58821dcc58be960875b)
...
Java version: 21.0.10, vendor: Red Hat, Inc., runtime: ...
Default locale: en_GB, platform encoding: UTF-8
OS name: "linux" ...
It's fine.
3. The same command with .mvn/maven.config:
gives:
Apache Maven 3.9.14 (996c630dbc656c76214ce58821dcc58be960875b)
...
Java version: 21.0.10, vendor: Red Hat, Inc., runtime: ...
Default locale: en_GB, platform encoding: UTF-8
OS name: "linux" ...
[ERROR] Error executing Maven.
[ERROR] Invalid threads value: ' 1'. Supported are integer values.
- Command could be also used w/o
maven.config like so:
mvn -V -q help:help -T ' 1C' # a
mvn -V -q help:help -T ' 1' # b
which also works for case a and doesn't for b.
5. Having leading or trailing space in option gives something like
org.apache.commons.cli.ParseException: Unrecognized maven.config file entries: [ -ntp ]
or
Unable to parse maven.config file options: Unrecognized option: -ntp
which might come from commons-cli.
But as parsing threads value is done in Maven - could it be always trimmed first?
This is for Float.parseFloat (valueOf): https://docs.oracle.com/javase/8/docs/api/java/lang/Float.html#valueOf-java.lang.String-:
Leading and trailing whitespace characters in s are ignored. Whitespace is removed as if by the String.trim() method; that is, both ASCII space and control characters are removed. The rest of s should constitute a FloatValue ...
But nothing like that happens in Integer.parseInt.
New feature, improvement proposal
.mvn/maven.config:gives:
It's fine.
3. The same command with
.mvn/maven.config:gives:
maven.configlike so:which also works for case a and doesn't for b.
5. Having leading or trailing space in option gives something like
or
which might come from
commons-cli.But as parsing threads value is done in Maven - could it be always trimmed first?
This is for
Float.parseFloat(valueOf): https://docs.oracle.com/javase/8/docs/api/java/lang/Float.html#valueOf-java.lang.String-:But nothing like that happens in
Integer.parseInt.