Show the coordinates in a different form
BranislavBeno opened this issue · comments
It could be a useful addition when the application allows the user to choose a form of found coordinates.
I suggest extending command line interface with the new parameter -o
respectively --output
.
Supported values for suggested parameter should be:
-
maven
-
gradle
-
gradle-short
-
gradle-kotlin
-
sbt
-
ivy
-
grape
-
leiningen
-
buildr
When the parameter will not be from the given list, the application throws an exception with explaining message.
When the parameter will be empty or blank, the application throws an exception with explaining message as well.
For sake of backwards compatibility, when an output form will not be explicitly defined, maven
output form will be used by default.
Suggested parameter will be relevant only for search
command and only when groupId
, artifactId
and version
are defined.
Thank you for contributing this idea, @BranislavBeno. I like the idea a lot!
May I suggest naming the new parameter format
rather than output
? To me, output
sounds more like "where should the output go".
Indeed, when not specified, let's stick with the current behaviour (formatting as pom.xml snippet). For unknown values, an empty value or a blank value, an appropriate error message is a good idea.
Thank you for your feedback, @mthmulders.
I agree, that format
as a parameter identifier better fits its purpose.
Thank you for your feedback, @mthmulders.
I agree, that --format
as a parameter identifier better fits its purpose.
On the other hand, in case of -f
as a shortened version, there could be potential confusion with --full-name
of class-search
command.
How to deal with it?
Hmm, you're right. Thinking out loud:
- Keep using
--format
as the full name of the parameter, shortened to-n
(for "notation") - Name the parameter
--notation
, shortened to-n
I don't like a short parameter which doesn't even resemble the full name (option 1). But I still feel format
is the best description of what this parameter does.
What do you think about it, @BranislavBeno?
You are right, --format
is a better parameter identifier.
I will stick to your first suggestion.
This will also speed up PR preparation.
However, I'm of course still open to any changes within review. :-)
Best regards
Branislav
Added this feature with a3f54fd. Thanks you, @BranislavBeno, for your contribution!
Added this feature with a3f54fd. Thanks you, @BranislavBeno, for your contribution!
The pleasure was mine. :-)
Released in v0.3.0.