Skip to content

[MDEP-645] List classes in a given artifact #1075

@jira-importer

Description

@jira-importer

John Lin opened MDEP-645 and commented

When I want to list all the classes in a given artifact, I have to use jar command to show files in the corresponding .jar file.

For example, I want to list all the classes in the artifact

org.apache.commons:commons-lang3:3.6

I have to run

jar tf ~/.m2/repository/org/apache/commons/commons-lang3/3.6/commons-lang3-3.6.jar

This method has some disadvantages:

  1. The jar file may not be downloaded, so it may not be in ~/.m2/repository.
  2. It's kind of tedious to type such a long filename.
  3. The output is shown in raw filenames, e.g., org/apache/commons/lang3/SystemUtils.class, but I generally want a package + class name org.apache.commons.lang3.SystemUtils.

So I would expect a goal called show with an argument artifact, so I can type

mvn dependency:show -Dartifact=org.apache.commons:commons-lang3:3.6

to show

org.apache.commons.lang3.CharUtils
org.apache.commons.lang3.RandomStringUtils
...

What do you guys think? Thanks.


Affects: 3.1.3

Issue Links:

  • MDEP-842 :list-classes does not skip if skip is set
    ("causes")
  • MDEP-843 :list-classes does not use GAV parameters
    ("causes")

Remote Links:

1 votes, 6 watchers

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestpriority:minorMinor loss of function, or other problem where easy workaround is present

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions