Maven 1

Add a CLI command to show versions of plugins

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: 1.0-rc3
  • Component/s: None
  • Labels:
    None
  • Number of attachments :
    0

Description

I think it would be nice if we could have a CLI command to show the version of all plugins available in the current Maven install. Getting the version of a single plugin would also be nice I think (but that could be possibly implemented as a plugin:version goal in the plugin plugin).

Activity

Hide
Brett Porter added a comment -

you read my mind! I did this in the morning and will commit soon.

Show
Brett Porter added a comment - you read my mind! I did this in the morning and will commit soon.
Hide
Arnaud Heritier added a comment -

Another think that can interesting is to have an option to retreive all properties used by installed plugins.
I don't yet know if it is possible.
I'll try to work on it.

Show
Arnaud Heritier added a comment - Another think that can interesting is to have an option to retreive all properties used by installed plugins. I don't yet know if it is possible. I'll try to work on it.
Hide
Brett Porter added a comment -

I know enough about jelly contexts to say this won't be useful in the current incarnation. Really we just need to get the doco up to scratch and I intend to do that between RC3 and 1.0

In maven2 this sort of thing could easily be documented in the plugin descriptor.

Show
Brett Porter added a comment - I know enough about jelly contexts to say this won't be useful in the current incarnation. Really we just need to get the doco up to scratch and I intend to do that between RC3 and 1.0 In maven2 this sort of thing could easily be documented in the plugin descriptor.
Hide
Brett Porter added a comment -

take a look at maven --info and maven -P from the latest CVS and let me know if that's what you were thinking...

Show
Brett Porter added a comment - take a look at maven --info and maven -P from the latest CVS and let me know if that's what you were thinking...
Hide
Vincent Massol added a comment -

Very cool.

One idea for improvement for the -P output: to use the <description> information from the POM instead of the default goal. It will better reflect what the plugin does.

Another improvement for --info is maybe to allow passing a plugin name as a parameter to get information about a specific plugin, maybe showing all or some of the information in the POM for that plugin.

Show
Vincent Massol added a comment - Very cool. One idea for improvement for the -P output: to use the <description> information from the POM instead of the default goal. It will better reflect what the plugin does. Another improvement for --info is maybe to allow passing a plugin name as a parameter to get information about a specific plugin, maybe showing all or some of the information in the POM for that plugin.
Hide
Brett Porter added a comment -

you can type maven -P <plugin> to list a plugin's goals and pom.description.

Good point about the default goal vs description, but the length is probably too long in most cases, and the goals are actually better documented

I was going to polish them all up before the 1.0 release so it should be ok, but feel free to tweak if you'd like.

Show
Brett Porter added a comment - you can type maven -P <plugin> to list a plugin's goals and pom.description. Good point about the default goal vs description, but the length is probably too long in most cases, and the goals are actually better documented I was going to polish them all up before the 1.0 release so it should be ok, but feel free to tweak if you'd like.
Hide
Vincent Massol added a comment -

1/ I've tried -P with a plugin name. It doesn't seem to work:

E:\Dev\maven-plugins\announcement>maven -P maven-jboss-plugin
__ __

\/ __ Apache_ ___
  \/ / ` \ V / -) ' \ ~ intelligent projects ~
_   _,_ _/___ _ _ v. 1.0-rc3-SNAPSHOT

Goals in maven-jboss-plugin
===========================

E:\Dev\maven-plugins\announcement>

2/ It would be cool to support maven --info <plugin name>, showing POM information for that plugin

3/ For maven -P, the problems is that default goals do not always represent what the plugin does. For some plugins there are even no default goals which is normal. Description are not that long, are they? We could always use the <shortDescription> element then.

Show
Vincent Massol added a comment - 1/ I've tried -P with a plugin name. It doesn't seem to work: E:\Dev\maven-plugins\announcement>maven -P maven-jboss-plugin __ __
\/ __ Apache_ ___
  \/ / ` \ V / -) ' \ ~ intelligent projects ~
_   _,_ _/___ _ _ v. 1.0-rc3-SNAPSHOT
Goals in maven-jboss-plugin =========================== E:\Dev\maven-plugins\announcement> 2/ It would be cool to support maven --info <plugin name>, showing POM information for that plugin 3/ For maven -P, the problems is that default goals do not always represent what the plugin does. For some plugins there are even no default goals which is normal. Description are not that long, are they? We could always use the <shortDescription> element then.
Hide
Brett Porter added a comment -

> 1/ I've tried -P with a plugin name. It doesn't seem to work:
> E:\Dev\maven-plugins\announcement>maven -P maven-jboss-plugin

try maven -P jboss
I think this is what users are more likely to type - and in new plugins we should start calling them things like this. We already have maven- from the group and -plugin from the type, so no need to add it to the artifact ID.

> 2/ It would be cool to support maven --info <plugin name>, showing POM > information for that plugin

maven -P does that (shows pom.description). --info is more diagnostics for bug reports.

> 3/ For maven -P, the problems is that default goals do not always
> represent what the plugin does. For some plugins there are even no
> default goals which is normal. Description are not that long, are
> they? We could always use the <shortDescription> element then.

description is shown on index.xml by default so should be a bit more verbose.

shortDescription is a better alternative, but I didn't want to change too much what worked for now. The current shortDescs are not very helpful, plus that'd mean having to load all the project.xml files to show the output (or creating an additional cache field).

I was going to tweak up all the default goal descriptions (and add default goals where appropriate - I think all plugins should have one) to help this for 1.0. If you wanted to switch to shortDescription, feel free - now that this works reasonably well I'll move on to more important issues. Thanks!

Show
Brett Porter added a comment - > 1/ I've tried -P with a plugin name. It doesn't seem to work: > E:\Dev\maven-plugins\announcement>maven -P maven-jboss-plugin try maven -P jboss I think this is what users are more likely to type - and in new plugins we should start calling them things like this. We already have maven- from the group and -plugin from the type, so no need to add it to the artifact ID. > 2/ It would be cool to support maven --info <plugin name>, showing POM > information for that plugin maven -P does that (shows pom.description). --info is more diagnostics for bug reports. > 3/ For maven -P, the problems is that default goals do not always > represent what the plugin does. For some plugins there are even no > default goals which is normal. Description are not that long, are > they? We could always use the <shortDescription> element then. description is shown on index.xml by default so should be a bit more verbose. shortDescription is a better alternative, but I didn't want to change too much what worked for now. The current shortDescs are not very helpful, plus that'd mean having to load all the project.xml files to show the output (or creating an additional cache field). I was going to tweak up all the default goal descriptions (and add default goals where appropriate - I think all plugins should have one) to help this for 1.0. If you wanted to switch to shortDescription, feel free - now that this works reasonably well I'll move on to more important issues. Thanks!
Hide
Vincent Massol added a comment -

"try maven -P jboss
I think this is what users are more likely to type - and in new plugins we should start calling them things like this. We already have maven- from the group and -plugin from the type, so no need to add it to the artifact ID."

I do agree with the <name>,<group> and <type> combo. However when you want to uniquely describe a plugin you need to give the 3 pieces of information. If there are 2 plugins say:

maven-cactus-plugin
cactus-cactus-plugin

and you type "maven -P cactus", which one will it pick?

"maven -P does that (shows pom.description). --info is more diagnostics for bug reports."

I meant to show the full POM (or close). Things like currentVersion, etc. Maven -P shows the goals. But I understand, you're saying this is what --info should do.

"I was going to tweak up all the default goal descriptions (and add default goals where appropriate - I think all plugins should have one) to help this for 1.0. If you wanted to switch to shortDescription, feel free - now that this works reasonably well I'll move on to more important issues. Thanks!"

Yep, all my comments are minor compared to your work on the rc3 release. I'm sure they will resurface in the future but I agree it's alrady very nice as it is. Thanks.

Show
Vincent Massol added a comment - "try maven -P jboss I think this is what users are more likely to type - and in new plugins we should start calling them things like this. We already have maven- from the group and -plugin from the type, so no need to add it to the artifact ID." I do agree with the <name>,<group> and <type> combo. However when you want to uniquely describe a plugin you need to give the 3 pieces of information. If there are 2 plugins say: maven-cactus-plugin cactus-cactus-plugin and you type "maven -P cactus", which one will it pick? "maven -P does that (shows pom.description). --info is more diagnostics for bug reports." I meant to show the full POM (or close). Things like currentVersion, etc. Maven -P shows the goals. But I understand, you're saying this is what --info should do. "I was going to tweak up all the default goal descriptions (and add default goals where appropriate - I think all plugins should have one) to help this for 1.0. If you wanted to switch to shortDescription, feel free - now that this works reasonably well I'll move on to more important issues. Thanks!" Yep, all my comments are minor compared to your work on the rc3 release. I'm sure they will resurface in the future but I agree it's alrady very nice as it is. Thanks.
Hide
Brett Porter added a comment -

"I do agree with the <name>,<group> and <type> combo. However when you want to uniquely describe a plugin you need to give the 3 pieces of information. If there are 2 plugins say:

maven-cactus-plugin
cactus-cactus-plugin

and you type "maven -P cactus", which one will it pick?"

Whichever one defines the cactus:* goals.

This is not ideal, but the fact is Maven 1.x's plugin versioning and naming is not going to change. If you have clashing goal names or artifactId's even if the groups or versions are different, you are going to have problems more significant than the output of this command

"I meant to show the full POM (or close). Things like currentVersion, etc. Maven -P shows the goals. But I understand, you're saying this is what --info should do."

I'm not sure that much info is useful - it'd be easier to look up the project.xml in the plugins cache directory
pom.description gives you user-info, --info gives you the plugin names and versions installed which should help debug issues.

"Yep, all my comments are minor compared to your work on the rc3 release. I'm sure they will resurface in the future but I agree it's alrady very nice as it is. Thanks. "

Thanks!

Show
Brett Porter added a comment - "I do agree with the <name>,<group> and <type> combo. However when you want to uniquely describe a plugin you need to give the 3 pieces of information. If there are 2 plugins say: maven-cactus-plugin cactus-cactus-plugin and you type "maven -P cactus", which one will it pick?" Whichever one defines the cactus:* goals. This is not ideal, but the fact is Maven 1.x's plugin versioning and naming is not going to change. If you have clashing goal names or artifactId's even if the groups or versions are different, you are going to have problems more significant than the output of this command "I meant to show the full POM (or close). Things like currentVersion, etc. Maven -P shows the goals. But I understand, you're saying this is what --info should do." I'm not sure that much info is useful - it'd be easier to look up the project.xml in the plugins cache directory pom.description gives you user-info, --info gives you the plugin names and versions installed which should help debug issues. "Yep, all my comments are minor compared to your work on the rc3 release. I'm sure they will resurface in the future but I agree it's alrady very nice as it is. Thanks. " Thanks!

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: