Skip to main content
Version: 2.1.26

complete-dep

complete-dep allows one to complete Maven coordinates.

It can answer questions such as:

  • What artifacts are published under a given Maven groupId, for example org.scala-lang or io.circe?
  • For a given Maven groupId and artifactId, which version(s) of the artifact are available?

The complete-dep command takes a single argument which is composed of up to 3 colon-separated components.

cs complete-dep groupId:artifactId:version

Let's demonstrate this with a few examples.

Looking-up a Maven groupId​

$ cs complete-dep org.scala-lang
org.scala-lang
org.scala-lang-osgi

$ cs complete-dep com.zax
com.zaxxer

$ cs complete-dep com.typesafe.
com.typesafe.akka
com.typesafe.conductr
com.typesafe.config
com.typesafe.genjavadoc
com.typesafe.jse_2.10
com.typesafe.jse_2.11

<elided>

com.typesafe.ssl-config-core_2.13.0-RC3
com.typesafe.webdriver_2.10
com.typesafe.zinc

As can be seen from these 3 examples, there are two Maven groupIds that share the common org.scala-lang prefix whereas com.zax has exactly one matching groupId. Finally, cs complete-dep com.typesafe. will list more than 80 matching groupIds.

We can now focus on searching for some artifacts under these groupIds.

Looking-up artifacts for a given groupId​

Passing a Maven groupId terminated by a colon will trigger a lookup of all artifacts published under that groupId.

For example:

$ cs complete-dep com.zaxxer:
HikariCP
HikariCP-agent
HikariCP-java6
HikariCP-java7
HikariCP-java9ea
HikariCP-parent
SansOrm
SparseBitSet
influx4j
jnb-ping
kuill
nuprocess
sansorm

$ cs complete-dep com.typesafe.akka:
akka
akka-actor-testkit-typed_2.11
akka-actor-testkit-typed_2.12
akka-actor-testkit-typed_2.13
akka-actor-testkit-typed_2.13.0-M3
akka-actor-testkit-typed_2.13.0-M5
akka-actor-testkit-typed_2.13.0-RC1
akka-actor-testkit-typed_2.13.0-RC2
akka-actor-testkit-typed_2.13.0-RC3
akka-actor-tests_2.10
akka-actor-tests_2.10.0-M7
akka-actor-tests_2.10.0-RC1
akka-actor-tests_2.10.0-RC2
akka-actor-tests_2.10.0-RC3
akka-actor-tests_2.10.0-RC5
akka-actor-tests_2.11
akka-actor-tests_2.11.0-M3
akka-actor-tests_2.11.0-RC3
akka-actor-tests_2.11.0-RC4
akka-actor-tests_2.12.0-M1
akka-actor-typed_2.11
akka-actor-typed_2.12
akka-actor-typed_2.13
akka-actor-typed_2.13.0-M3
akka-actor-typed_2.13.0-M5
akka-actor-typed_2.13.0-RC1
akka-actor-typed_2.13.0-RC2
akka-actor-typed_2.13.0-RC3

<elided>

akka-zeromq_2.11
akka-zeromq_2.11.0-M3
hello-kernel_2.10
hello-kernel_2.11

An interesting observation that can be made when looking at the output for cs complete-dep com.typesafe.akka: is that each artifact is published against one or more minor versions of Scala (e.g. 2.11, 2.12, 2.13, etc.). This is because these are Scala libraries that are cross-built for each Scala version supported by the library.

Note: Scala guarantees binary compatibility between patch releases with a minor release.

For example, if we take the akka-actor-typed library:

$ cs complete-dep com.typesafe.akka:akka-actor-typed
akka-actor-typed_2.11
akka-actor-typed_2.12
akka-actor-typed_2.13
akka-actor-typed_2.13.0-M3
akka-actor-typed_2.13.0-M5
akka-actor-typed_2.13.0-RC1
akka-actor-typed_2.13.0-RC2
akka-actor-typed_2.13.0-RC3

We see that it was published against 3 Scala releases (ignoring Milestone releases and Release Candidates).

Looking-up artifact versions​

Given a Maven groupId and artifactId, we can use cs complete-dep to look up which version[s] of the artifact have been published.

We'll take two examples, one for a Java library and one for a Scala Library.

Let's start with the HikariCP library.

$ cs complete-dep com.zaxxer:HikariCP:
1.1.3
1.1.4

<elided>

2.7.8
2.7.9
3.0.0
3.1.0
3.2.0
3.3.0
3.3.1
3.4.0
3.4.1
3.4.2
3.4.3
3.4.4
3.4.5

Pretty straightforward...

Let's look at the akka-actor-typed library published for Scala 2.13.

$ cs complete-dep com.typesafe.akka:akka-actor-typed_2.13:
2.5.23
2.5.24
2.5.25
2.5.26
2.5.27
2.5.28
2.5.29
2.5.30
2.5.31
2.5.32
2.6.0-M3
2.6.0-M4
2.6.0-M5
2.6.0-M6
2.6.0-M7
2.6.0-M8
2.6.0-RC1
2.6.0-RC2
2.6.0
2.6.1
2.6.2
2.6.3
2.6.4
2.6.5
2.6.6
2.6.7
2.6.8
2.6.9
2.6.10

In conclusion we can say that cs complete-dep is a very powerful command that allows us to easily look-up library (artifact) version information from the command line.