Check the dependency of a specific maven artifact in Coursier

What does this library depend on when developing on Android or in a JVM language such as Java? You often think that, right? How do you guys check? I think there are various things such as looking at sites such as https://mvnrepository.com/ and checking with ./gradlew dependencies.

Today, I would like to introduce a CLI tool called Coursier written in Scala that was useful. https://get-coursier.io/

How to use

You can check it on the terminal like coursier resolve maven_artifact

$ coursier resolve io.circe:circe-core_2.12:0.10.0
io.circe:circe-core_2.12:0.10.0:default
io.circe:circe-numbers_2.12:0.10.0:default
org.scala-lang:scala-library:2.12.6:default
org.scala-lang:scala-reflect:2.12.6:default
org.typelevel:cats-core_2.12:1.4.0:default
org.typelevel:cats-kernel_2.12:1.4.0:default
org.typelevel:cats-macros_2.12:1.4.0:default
org.typelevel:machinist_2.12:0.6.5:default

You can also check the dependencies in a tree shape with -t.

$ cs resolve -t io.circe::circe-generic:0.12.3
  Result:
└─ io.circe:circe-generic_2.13:0.12.3
   ├─ com.chuusai:shapeless_2.13:2.3.3
   │  └─ org.scala-lang:scala-library:2.13.0
   ├─ io.circe:circe-core_2.13:0.12.3
   │  ├─ io.circe:circe-numbers_2.13:0.12.3
   │  │  └─ org.scala-lang:scala-library:2.13.0
   │  ├─ org.scala-lang:scala-library:2.13.0

Installation method

It seems that you can install it on Mac as follows. https://get-coursier.io/docs/cli-installation

brew install coursier/formulas/coursier

View repositories on Google Maven Reposiotry

To see the Google Maven Reposiotry, which is indispensable for Android development, do the following.

cs resolve -t  -r https://maven.google.com -r https://jcenter.bintray.com androidx.ui:ui-livedata:0.1.0-dev12|view -
└─ androidx.ui:ui-livedata:0.1.0-dev12
   ├─ androidx.compose:compose-runtime:0.1.0-dev12
   │  ├─ androidx.annotation:annotation:1.1.0
   │  ├─ org.jetbrains.kotlin:kotlin-stdlib:^[[33m1.3.70 -> 1.3.71^[[0m
   │  │  ├─ org.jetbrains:annotations:13.0
   │  │  └─ org.jetbrains.kotlin:kotlin-stdlib-common:1.3.71
   │  ├─ org.jetbrains.kotlin:kotlin-stdlib-common:^[[33m1.3.70 -> 1.3.71^[[0m
   │  ├─ org.jetbrains.kotlinx:kotlinx-collections-immutable-jvm:0.3
   │  │  ├─ org.jetbrains.kotlin:kotlin-stdlib:^[[33m1.3.50 -> 1.3.71^[[0m
   │  │  │  ├─ org.jetbrains:annotations:13.0
   │  │  │  └─ org.jetbrains.kotlin:kotlin-stdlib-common:1.3.71
   │  │  └─ org.jetbrains.kotlin:kotlin-stdlib-common:^[[33m1.3.50 -> 1.3.71^[[0m
   │  ├─ org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.6
   │  │  ├─ org.jetbrains.kotlin:kotlin-stdlib:1.3.71
   │  │  │  ├─ org.jetbrains:annotations:13.0
 

At the end

It seemed convenient because it was easy to check when checking the dependency. In addition to checking the dependencies, it was convenient because there was a function to make it into a jar and a function to start it, so please check the official website. https://get-coursier.io/docs/overview

Recommended Posts

Check the dependency of a specific maven artifact in Coursier
Measure the size of a folder in Java
Set the time of LocalDateTime to a specific time
Set the source of the library set as a dependency in IntelliJ as a separate module of the project
Count the number of occurrences of a string in Ruby
Get a list of classes in a Guava specific package
Extract a specific element from the list of objects
A quick explanation of the five types of static in Java
Determine that the value is a multiple of 〇 in Ruby
Check the operation of two roles with a chat application
A program that counts the number of words in a List
Find the number of days in a month with Kotlin
When you want to check whether the contents of a property can be converted to a specific type
Graph the sensor information of Raspberry Pi in Java and check it with a web browser
Get a proxy instance of the component itself in Spring Boot
Fix the file name of war to the one set in Maven
Get the public URL of a private Flickr file in Java
Let's create a TODO application in Java 5 Switch the display of TODO
How to check for the contents of a java fixed-length string
[Rails] Check the contents of the object
Check the version of Cent OS
Check the migration status of rails
A memorandum of the FizzBuzz problem
Order of processing in the program
[Android] Develop a service that allows university students to check the operating status of buses circulating in the university.
Dynamically increase the number of elements in a Java 2D array (multidimensional array)
The story of forgetting to close a file in Java and failing
[Java] How to get to the front of a specific string using the String class
Sample program that returns the hash value of a file in Java
How to change the value of a variable at a breakpoint in intelliJ
How to get the absolute path of a directory running in Java
Android development, how to check null in the value of JSON object
Check the operation using jetty with Maven.
Get the result of POST in Java
Check the contents of the Java certificate store
Check the contents of params with pry
[Java] Get the day of the specific day of the week
The identity of params [: id] in rails
Memo: [Java] Check the contents of the directory
The story of AppClip support in Anyca
Creating a Servlet in the Liberty environment
The story of writing Java in Emacs
Check the version of the standard Web software.
[Java] Check the number of occurrences of characters
Find the difference from a multiple of 10
Write the movement of Rakefile in the runbook
Check the operation of the interface through threads
Creating a sample program using the problem of a database specialist in DDD Improvement 2
Character string comparison: I was caught in the skill check problem of Paiza
How to get the ID of a user authenticated with Firebase in Swift
How to check the latest version of io.spring.platform to describe in pom.xml of Spring (STS)
Call a method of the parent class by explicitly specifying the name in Ruby
Get the path defined in Controller class of Spring boot as a list
Creating a sample program using the problem of a database specialist in DDD Improvement 1
[Java] Is it unnecessary to check "identity" in the implementation of the equals () method?
How to make a unique combination of data in the rails intermediate table
Validate the identity token of a user authenticated with AWS Cognito in Java
Be absolutely careful when putting the result of and / or in a variable!