[ 
https://issues.apache.org/jira/browse/MDEP-645?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17140522#comment-17140522
 ] 

Elliotte Rusty Harold commented on MDEP-645:
--------------------------------------------

We called it list-classes rather than "show" but this is now in HEAD:

elharo@elharo1:~/maven-dependency-plugin$ mvn 
org.apache.maven.plugins:maven-dependency-plugin:3.1.3-SNAPSHOT:list-classes 
-Dartifact=org.apache.commons:commons-lang3:3.6
[INFO] Scanning for projects...
[INFO] 
[INFO] ----------< org.apache.maven.plugins:maven-dependency-plugin >----------
[INFO] Building Apache Maven Dependency Plugin 3.1.3-SNAPSHOT
[INFO] ----------------------------[ maven-plugin ]----------------------------
[INFO] 
[INFO] --- maven-dependency-plugin:3.1.3-SNAPSHOT:list-classes (default-cli) @ 
maven-dependency-plugin ---
[INFO] org.apache.commons.lang3.BitField
[INFO] org.apache.commons.lang3.builder.Diffable
[INFO] org.apache.commons.lang3.builder.DiffBuilder$11
[INFO] org.apache.commons.lang3.builder.DiffBuilder$12
[INFO] org.apache.commons.lang3.builder.DiffBuilder$17
[INFO] org.apache.commons.lang3.builder.DiffBuilder$18
[INFO] org.apache.commons.lang3.builder.DiffBuilder$8
[INFO] org.apache.commons.lang3.builder.EqualsBuilder
[INFO] org.apache.commons.lang3.builder.ReflectionDiffBuilder
[INFO] org.apache.commons.lang3.builder.ToStringExclude
[INFO] org.apache.commons.lang3.builder.ToStringStyle$MultiLineToStringStyle
[INFO] org.apache.commons.lang3.builder.ToStringStyle$NoClassNameToStringStyle
[INFO] org.apache.commons.lang3.builder.ToStringStyle$NoFieldNameToStringStyle
[INFO] org.apache.commons.lang3.CharEncoding
[INFO] org.apache.commons.lang3.CharRange
[INFO] org.apache.commons.lang3.CharUtils
[INFO] org.apache.commons.lang3.ClassUtils$2
[INFO] org.apache.commons.lang3.concurrent.AbstractCircuitBreaker$State$1
[INFO] org.apache.commons.lang3.concurrent.AtomicInitializer
[INFO] org.apache.commons.lang3.concurrent.AtomicSafeInitializer
[INFO] org.apache.commons.lang3.concurrent.BasicThreadFactory$Builder
[INFO] org.apache.commons.lang3.concurrent.CallableBackgroundInitializer
[INFO] org.apache.commons.lang3.concurrent.Computable
[INFO] org.apache.commons.lang3.concurrent.ConcurrentUtils$ConstantFuture
[INFO] 
org.apache.commons.lang3.concurrent.EventCountCircuitBreaker$CheckIntervalData
[INFO] 
org.apache.commons.lang3.concurrent.EventCountCircuitBreaker$StateStrategyOpen
[INFO] org.apache.commons.lang3.concurrent.Memoizer
[INFO] 
org.apache.commons.lang3.event.EventListenerSupport$ProxyInvocationHandler
[INFO] org.apache.commons.lang3.exception.CloneFailedException
[INFO] org.apache.commons.lang3.exception.ContextedRuntimeException
[INFO] org.apache.commons.lang3.JavaVersion
[INFO] org.apache.commons.lang3.math.Fraction
[INFO] org.apache.commons.lang3.mutable.MutableByte
[INFO] org.apache.commons.lang3.mutable.MutableFloat
[INFO] org.apache.commons.lang3.mutable.MutableObject
[INFO] org.apache.commons.lang3.NotImplementedException
[INFO] org.apache.commons.lang3.RandomStringUtils
[INFO] org.apache.commons.lang3.Range$ComparableComparator
[INFO] org.apache.commons.lang3.reflect.FieldUtils
[INFO] org.apache.commons.lang3.reflect.MethodUtils
[INFO] org.apache.commons.lang3.SerializationUtils
[INFO] org.apache.commons.lang3.StringEscapeUtils$CsvUnescaper
[INFO] org.apache.commons.lang3.StringUtils
[INFO] org.apache.commons.lang3.text.translate.CodePointTranslator
[INFO] org.apache.commons.lang3.text.translate.JavaUnicodeEscaper
[INFO] org.apache.commons.lang3.text.translate.NumericEntityEscaper
[INFO] org.apache.commons.lang3.text.translate.NumericEntityUnescaper
[INFO] org.apache.commons.lang3.text.translate.UnicodeUnescaper
[INFO] org.apache.commons.lang3.text.WordUtils
[INFO] org.apache.commons.lang3.ThreadUtils$ThreadGroupPredicate
[INFO] org.apache.commons.lang3.ThreadUtils
[INFO] org.apache.commons.lang3.time.DateUtils
[INFO] org.apache.commons.lang3.time.FastDateParser$5
[INFO] org.apache.commons.lang3.time.FastDateParser$CopyQuotedStrategy
[INFO] org.apache.commons.lang3.time.FastDateParser$NumberStrategy
[INFO] org.apache.commons.lang3.time.FastDateParser$Strategy
[INFO] org.apache.commons.lang3.time.FastDateParser$StrategyParser
[INFO] org.apache.commons.lang3.time.FastDateParser
[INFO] org.apache.commons.lang3.time.FastDatePrinter$PaddedNumberField
[INFO] org.apache.commons.lang3.time.FastDatePrinter$TextField
[INFO] org.apache.commons.lang3.time.FastDatePrinter$TimeZoneNameRule
[INFO] org.apache.commons.lang3.time.FastDatePrinter$TwelveHourField
[INFO] org.apache.commons.lang3.time.StopWatch$1
[INFO] org.apache.commons.lang3.time.StopWatch$State$4
[INFO] org.apache.commons.lang3.time.StopWatch
[INFO] org.apache.commons.lang3.tuple.MutablePair
[INFO] org.apache.commons.lang3.tuple.Pair
[INFO] org.apache.commons.lang3.arch.Processor$Type
[INFO] org.apache.commons.lang3.arch.Processor
[INFO] org.apache.commons.lang3.ArchUtils
[INFO] org.apache.commons.lang3.BooleanUtils
[INFO] org.apache.commons.lang3.builder.CompareToBuilder
[INFO] org.apache.commons.lang3.builder.DiffBuilder$10
[INFO] org.apache.commons.lang3.builder.DiffBuilder$13
[INFO] org.apache.commons.lang3.builder.DiffBuilder$16
[INFO] org.apache.commons.lang3.builder.DiffBuilder$2
[INFO] org.apache.commons.lang3.builder.DiffBuilder$3
[INFO] org.apache.commons.lang3.builder.DiffBuilder$4
[INFO] org.apache.commons.lang3.builder.DiffBuilder$5
[INFO] org.apache.commons.lang3.builder.DiffBuilder$9
[INFO] org.apache.commons.lang3.builder.EqualsExclude
[INFO] org.apache.commons.lang3.builder.IDKey
[INFO] org.apache.commons.lang3.builder.MultilineRecursiveToStringStyle
[INFO] org.apache.commons.lang3.builder.StandardToStringStyle
[INFO] org.apache.commons.lang3.builder.ToStringStyle$DefaultToStringStyle
[INFO] org.apache.commons.lang3.builder.ToStringStyle
[INFO] org.apache.commons.lang3.CharSetUtils
[INFO] org.apache.commons.lang3.ClassUtils$1
[INFO] org.apache.commons.lang3.ClassUtils
[INFO] org.apache.commons.lang3.concurrent.BasicThreadFactory$1
[INFO] org.apache.commons.lang3.concurrent.CircuitBreaker
[INFO] org.apache.commons.lang3.concurrent.ConcurrentInitializer
[INFO] org.apache.commons.lang3.concurrent.ConstantInitializer
[INFO] 
org.apache.commons.lang3.concurrent.EventCountCircuitBreaker$StateStrategy
[INFO] org.apache.commons.lang3.concurrent.EventCountCircuitBreaker
[INFO] org.apache.commons.lang3.EnumUtils
[INFO] org.apache.commons.lang3.event.EventUtils$EventBindingInvocationHandler
[INFO] org.apache.commons.lang3.exception.ContextedException
[INFO] org.apache.commons.lang3.exception.ExceptionUtils
[INFO] org.apache.commons.lang3.math.NumberUtils
[INFO] org.apache.commons.lang3.mutable.MutableLong
[INFO] org.apache.commons.lang3.ObjectUtils$Null
[INFO] org.apache.commons.lang3.RandomUtils
[INFO] org.apache.commons.lang3.reflect.ConstructorUtils
[INFO] org.apache.commons.lang3.reflect.MemberUtils$Executable
[INFO] org.apache.commons.lang3.reflect.Typed
[INFO] org.apache.commons.lang3.reflect.TypeUtils$1
[INFO] org.apache.commons.lang3.reflect.TypeUtils$ParameterizedTypeImpl
[INFO] org.apache.commons.lang3.reflect.TypeUtils$WildcardTypeImpl
[INFO] org.apache.commons.lang3.SerializationException
[INFO] 
org.apache.commons.lang3.SerializationUtils$ClassLoaderAwareObjectInputStream
[INFO] org.apache.commons.lang3.StringEscapeUtils$CsvEscaper
[INFO] org.apache.commons.lang3.StringEscapeUtils
[INFO] org.apache.commons.lang3.SystemUtils
[INFO] org.apache.commons.lang3.text.ExtendedMessageFormat
[INFO] org.apache.commons.lang3.text.StrBuilder$StrBuilderWriter
[INFO] org.apache.commons.lang3.text.StrLookup$1
[INFO] org.apache.commons.lang3.text.StrLookup$MapStrLookup
[INFO] org.apache.commons.lang3.text.StrLookup$SystemPropertiesStrLookup
[INFO] org.apache.commons.lang3.text.StrLookup
[INFO] org.apache.commons.lang3.text.StrMatcher$CharMatcher
[INFO] org.apache.commons.lang3.text.StrMatcher$CharSetMatcher
[INFO] org.apache.commons.lang3.text.StrMatcher$NoMatcher
[INFO] org.apache.commons.lang3.text.StrMatcher$StringMatcher
[INFO] org.apache.commons.lang3.text.StrMatcher$TrimMatcher
[INFO] org.apache.commons.lang3.text.StrMatcher
[INFO] org.apache.commons.lang3.text.StrSubstitutor
[INFO] org.apache.commons.lang3.text.translate.AggregateTranslator
[INFO] org.apache.commons.lang3.text.translate.CharSequenceTranslator
[INFO] org.apache.commons.lang3.text.translate.LookupTranslator
[INFO] org.apache.commons.lang3.text.translate.NumericEntityUnescaper$OPTION
[INFO] org.apache.commons.lang3.text.translate.OctalUnescaper
[INFO] org.apache.commons.lang3.text.translate.UnicodeEscaper
[INFO] org.apache.commons.lang3.text.translate.UnicodeUnpairedSurrogateRemover
[INFO] org.apache.commons.lang3.ThreadUtils$1
[INFO] org.apache.commons.lang3.ThreadUtils$ThreadPredicate
[INFO] org.apache.commons.lang3.time.DateFormatUtils
[INFO] org.apache.commons.lang3.time.DateUtils$ModifyType
[INFO] org.apache.commons.lang3.time.DurationFormatUtils
[INFO] org.apache.commons.lang3.time.FastDateParser$1
[INFO] org.apache.commons.lang3.time.FastDateParser$2
[INFO] org.apache.commons.lang3.time.FastDateParser$4
[INFO] org.apache.commons.lang3.time.FastDateParser$CaseInsensitiveTextStrategy
[INFO] org.apache.commons.lang3.time.FastDateParser$ISO8601TimeZoneStrategy
[INFO] org.apache.commons.lang3.time.FastDateParser$PatternStrategy
[INFO] org.apache.commons.lang3.time.FastDateParser$StrategyAndWidth
[INFO] org.apache.commons.lang3.time.FastDateParser$TimeZoneStrategy$TzInfo
[INFO] org.apache.commons.lang3.time.FastDateParser$TimeZoneStrategy
[INFO] org.apache.commons.lang3.time.FastDatePrinter$CharacterLiteral
[INFO] org.apache.commons.lang3.time.FastDatePrinter$DayInWeekField
[INFO] org.apache.commons.lang3.time.FastDatePrinter$Iso8601_Rule
[INFO] org.apache.commons.lang3.time.FastDatePrinter$NumberRule
[INFO] org.apache.commons.lang3.time.FastDatePrinter$Rule
[INFO] org.apache.commons.lang3.time.FastDatePrinter$StringLiteral
[INFO] org.apache.commons.lang3.time.FastDatePrinter$TimeZoneDisplayKey
[INFO] org.apache.commons.lang3.time.FastDatePrinter$TimeZoneNumberRule
[INFO] org.apache.commons.lang3.time.FastDatePrinter$TwentyFourHourField
[INFO] org.apache.commons.lang3.time.FastDatePrinter$TwoDigitNumberField
[INFO] org.apache.commons.lang3.time.FastDatePrinter$UnpaddedMonthField
[INFO] org.apache.commons.lang3.time.FastDatePrinter$WeekYear
[INFO] org.apache.commons.lang3.time.FormatCache$MultipartKey
[INFO] org.apache.commons.lang3.time.FormatCache
[INFO] org.apache.commons.lang3.time.StopWatch$SplitState
[INFO] org.apache.commons.lang3.time.StopWatch$State$1
[INFO] org.apache.commons.lang3.time.StopWatch$State$2
[INFO] org.apache.commons.lang3.time.StopWatch$State$3
[INFO] org.apache.commons.lang3.time.StopWatch$State
[INFO] org.apache.commons.lang3.tuple.ImmutablePair
[INFO] org.apache.commons.lang3.tuple.ImmutableTriple
[INFO] org.apache.commons.lang3.tuple.MutableTriple
[INFO] org.apache.commons.lang3.tuple.Triple
[INFO] org.apache.commons.lang3.Validate
[INFO] org.apache.commons.lang3.AnnotationUtils
[INFO] org.apache.commons.lang3.ArrayUtils
[INFO] org.apache.commons.lang3.builder.DiffBuilder$7
[INFO] org.apache.commons.lang3.builder.DiffResult
[INFO] org.apache.commons.lang3.builder.HashCodeBuilder
[INFO] org.apache.commons.lang3.builder.ReflectionToStringBuilder
[INFO] org.apache.commons.lang3.builder.ToStringStyle$JsonToStringStyle
[INFO] org.apache.commons.lang3.builder.ToStringStyle$SimpleToStringStyle
[INFO] org.apache.commons.lang3.CharRange$CharacterIterator
[INFO] org.apache.commons.lang3.CharSet
[INFO] org.apache.commons.lang3.ClassUtils$1$1
[INFO] org.apache.commons.lang3.ClassUtils$Interfaces
[INFO] org.apache.commons.lang3.concurrent.AbstractCircuitBreaker$State$2
[INFO] org.apache.commons.lang3.concurrent.AbstractCircuitBreaker$State
[INFO] org.apache.commons.lang3.concurrent.BackgroundInitializer
[INFO] org.apache.commons.lang3.concurrent.CircuitBreakingException
[INFO] org.apache.commons.lang3.concurrent.ConcurrentRuntimeException
[INFO] org.apache.commons.lang3.concurrent.EventCountCircuitBreaker$1
[INFO] org.apache.commons.lang3.concurrent.LazyInitializer
[INFO] 
org.apache.commons.lang3.concurrent.MultiBackgroundInitializer$MultiBackgroundInitializerResults
[INFO] org.apache.commons.lang3.concurrent.ThresholdCircuitBreaker
[INFO] org.apache.commons.lang3.concurrent.TimedSemaphore$1
[INFO] org.apache.commons.lang3.Conversion
[INFO] org.apache.commons.lang3.event.EventUtils
[INFO] org.apache.commons.lang3.exception.ExceptionContext
[INFO] org.apache.commons.lang3.LocaleUtils$SyncAvoid
[INFO] org.apache.commons.lang3.math.IEEE754rUtils
[INFO] org.apache.commons.lang3.mutable.MutableBoolean
[INFO] org.apache.commons.lang3.AnnotationUtils$1
[INFO] org.apache.commons.lang3.arch.Processor$Arch
[INFO] org.apache.commons.lang3.ArrayUtils$1
[INFO] org.apache.commons.lang3.builder.Builder
[INFO] org.apache.commons.lang3.builder.Diff
[INFO] org.apache.commons.lang3.builder.DiffBuilder$1
[INFO] org.apache.commons.lang3.builder.DiffBuilder$14
[INFO] org.apache.commons.lang3.builder.DiffBuilder$15
[INFO] org.apache.commons.lang3.builder.DiffBuilder$6
[INFO] org.apache.commons.lang3.builder.DiffBuilder
[INFO] org.apache.commons.lang3.builder.HashCodeExclude
[INFO] org.apache.commons.lang3.builder.RecursiveToStringStyle
[INFO] org.apache.commons.lang3.builder.ToStringBuilder
[INFO] org.apache.commons.lang3.builder.ToStringStyle$ShortPrefixToStringStyle
[INFO] org.apache.commons.lang3.CharRange$1
[INFO] org.apache.commons.lang3.CharSequenceUtils
[INFO] org.apache.commons.lang3.ClassPathUtils
[INFO] org.apache.commons.lang3.ClassUtils$2$1
[INFO] org.apache.commons.lang3.concurrent.AbstractCircuitBreaker$1
[INFO] org.apache.commons.lang3.concurrent.AbstractCircuitBreaker
[INFO] 
org.apache.commons.lang3.concurrent.BackgroundInitializer$InitializationTask
[INFO] org.apache.commons.lang3.concurrent.BasicThreadFactory
[INFO] org.apache.commons.lang3.concurrent.ConcurrentException
[INFO] org.apache.commons.lang3.concurrent.ConcurrentUtils
[INFO] 
org.apache.commons.lang3.concurrent.EventCountCircuitBreaker$StateStrategyClosed
[INFO] org.apache.commons.lang3.concurrent.Memoizer$1
[INFO] org.apache.commons.lang3.concurrent.MultiBackgroundInitializer$1
[INFO] org.apache.commons.lang3.concurrent.MultiBackgroundInitializer
[INFO] org.apache.commons.lang3.concurrent.TimedSemaphore
[INFO] org.apache.commons.lang3.event.EventListenerSupport
[INFO] org.apache.commons.lang3.exception.DefaultExceptionContext
[INFO] org.apache.commons.lang3.LocaleUtils
[INFO] org.apache.commons.lang3.mutable.Mutable
[INFO] org.apache.commons.lang3.mutable.MutableDouble
[INFO] org.apache.commons.lang3.mutable.MutableInt
[INFO] org.apache.commons.lang3.mutable.MutableShort
[INFO] org.apache.commons.lang3.ObjectUtils
[INFO] org.apache.commons.lang3.Range
[INFO] org.apache.commons.lang3.reflect.InheritanceUtils
[INFO] org.apache.commons.lang3.reflect.MemberUtils
[INFO] org.apache.commons.lang3.reflect.TypeLiteral
[INFO] org.apache.commons.lang3.reflect.TypeUtils$GenericArrayTypeImpl
[INFO] org.apache.commons.lang3.reflect.TypeUtils$WildcardTypeBuilder
[INFO] org.apache.commons.lang3.reflect.TypeUtils
[INFO] org.apache.commons.lang3.text.CompositeFormat
[INFO] org.apache.commons.lang3.text.FormatFactory
[INFO] org.apache.commons.lang3.text.FormattableUtils
[INFO] org.apache.commons.lang3.text.StrBuilder$StrBuilderReader
[INFO] org.apache.commons.lang3.text.StrBuilder$StrBuilderTokenizer
[INFO] org.apache.commons.lang3.text.StrBuilder
[INFO] org.apache.commons.lang3.text.StrTokenizer
[INFO] org.apache.commons.lang3.text.translate.EntityArrays
[INFO] org.apache.commons.lang3.ThreadUtils$AlwaysTruePredicate
[INFO] org.apache.commons.lang3.ThreadUtils$NamePredicate
[INFO] org.apache.commons.lang3.ThreadUtils$ThreadIdPredicate
[INFO] org.apache.commons.lang3.time.DateParser
[INFO] org.apache.commons.lang3.time.DatePrinter
[INFO] org.apache.commons.lang3.time.DateUtils$DateIterator
[INFO] org.apache.commons.lang3.time.DurationFormatUtils$Token
[INFO] org.apache.commons.lang3.time.FastDateFormat$1
[INFO] org.apache.commons.lang3.time.FastDateFormat
[INFO] org.apache.commons.lang3.time.FastDateParser$3
[INFO] org.apache.commons.lang3.time.FastDateParser$6
[INFO] org.apache.commons.lang3.time.FastDatePrinter$TwoDigitMonthField
[INFO] org.apache.commons.lang3.time.FastDatePrinter$TwoDigitYearField
[INFO] org.apache.commons.lang3.time.FastDatePrinter$UnpaddedNumberField
[INFO] org.apache.commons.lang3.time.FastDatePrinter
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  0.732 s
[INFO] Finished at: 2020-06-19T08:54:17-04:00
[INFO] ------------------------------------------------------------------------

> List classes in a given artifact
> --------------------------------
>
>                 Key: MDEP-645
>                 URL: https://issues.apache.org/jira/browse/MDEP-645
>             Project: Maven Dependency Plugin
>          Issue Type: New Feature
>            Reporter: John Lin
>            Assignee: Elliotte Rusty Harold
>            Priority: Minor
>              Labels: intern
>
> 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
> {code}
> org.apache.commons:commons-lang3:3.6
> {code}
> I have to run
> {code}
> jar tf 
> ~/.m2/repository/org/apache/commons/commons-lang3/3.6/commons-lang3-3.6.jar
> {code}
> This method has some disadvantages:
> # The jar file may not be downloaded, so it may not be in 
> {{~/.m2/repository}}.
> # It's kind of tedious to type such a long filename.
> # 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
> {code}
> mvn dependency:show -Dartifact=org.apache.commons:commons-lang3:3.6
> {code}
> to show
> {code}
> org.apache.commons.lang3.CharUtils
> org.apache.commons.lang3.RandomStringUtils
> ...
> {code}
> What do you guys think? Thanks.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to