coursier: add new documentation pages (#9728)

* coursier: add new documentation pages

* fixing ci errors

* fixing ci errors

* Update pages/common/cs-complete-dep.md

Co-authored-by: Emily Grace Seville <EmilySeville7cfg@gmail.com>

* Update pages/common/cs-complete-dep.md

Co-authored-by: Emily Grace Seville <EmilySeville7cfg@gmail.com>

* Update pages/common/cs-complete-dep.md

Co-authored-by: Emily Grace Seville <EmilySeville7cfg@gmail.com>

* Update pages/common/cs-fetch.md

Co-authored-by: Emily Grace Seville <EmilySeville7cfg@gmail.com>

* Update pages/common/cs-install.md

Co-authored-by: Emily Grace Seville <EmilySeville7cfg@gmail.com>

* Update pages/common/cs-fetch.md

Co-authored-by: Emily Grace Seville <EmilySeville7cfg@gmail.com>

* Update pages/common/cs-install.md

Co-authored-by: Emily Grace Seville <EmilySeville7cfg@gmail.com>

* Update pages/common/cs-install.md

Co-authored-by: Emily Grace Seville <EmilySeville7cfg@gmail.com>

* Update pages/common/cs-install.md

Co-authored-by: Emily Grace Seville <EmilySeville7cfg@gmail.com>

* Update pages/common/cs-install.md

Co-authored-by: Emily Grace Seville <EmilySeville7cfg@gmail.com>

* Update pages/common/cs-fetch.md

Co-authored-by: Emily Grace Seville <EmilySeville7cfg@gmail.com>

* Update pages/common/cs-fetch.md

Co-authored-by: Emily Grace Seville <EmilySeville7cfg@gmail.com>

* Update pages/common/cs-fetch.md

Co-authored-by: Emily Grace Seville <EmilySeville7cfg@gmail.com>

* Update pages/common/cs-install.md

Co-authored-by: Emily Grace Seville <EmilySeville7cfg@gmail.com>

* Update pages/common/cs-install.md

Co-authored-by: Emily Grace Seville <EmilySeville7cfg@gmail.com>

* fix other typo

* Update pages/common/cs-complete-dep.md

Co-authored-by: Emily Grace Seville <EmilySeville7cfg@gmail.com>

* Update pages/common/cs-java.md

Co-authored-by: Emily Grace Seville <EmilySeville7cfg@gmail.com>

* Update pages/common/cs-java.md

Co-authored-by: Emily Grace Seville <EmilySeville7cfg@gmail.com>

* Update pages/common/cs-java.md

Co-authored-by: Emily Grace Seville <EmilySeville7cfg@gmail.com>

* Update pages/common/cs-launch.md

Co-authored-by: Emily Grace Seville <EmilySeville7cfg@gmail.com>

* Update pages/common/cs-launch.md

Co-authored-by: Emily Grace Seville <EmilySeville7cfg@gmail.com>

* Update pages/common/cs-launch.md

Co-authored-by: Emily Grace Seville <EmilySeville7cfg@gmail.com>

* Update pages/common/cs-launch.md

Co-authored-by: Emily Grace Seville <EmilySeville7cfg@gmail.com>

* Update pages/common/cs-install.md

Co-authored-by: Emily Grace Seville <EmilySeville7cfg@gmail.com>

* Update pages/common/cs-resolve.md

Co-authored-by: Emily Grace Seville <EmilySeville7cfg@gmail.com>

* Update pages/common/cs-resolve.md

Co-authored-by: Emily Grace Seville <EmilySeville7cfg@gmail.com>

* Update pages/common/cs-resolve.md

Co-authored-by: Emily Grace Seville <EmilySeville7cfg@gmail.com>

* Update pages/common/cs-resolve.md

Co-authored-by: Emily Grace Seville <EmilySeville7cfg@gmail.com>

* Update pages/common/cs-resolve.md

Co-authored-by: Emily Grace Seville <EmilySeville7cfg@gmail.com>

* Update pages/common/cs.md

Co-authored-by: Emily Grace Seville <EmilySeville7cfg@gmail.com>

* Update pages/common/cs.md

Co-authored-by: Emily Grace Seville <EmilySeville7cfg@gmail.com>

* Update pages/common/cs.md

Co-authored-by: Emily Grace Seville <EmilySeville7cfg@gmail.com>

* Update pages/common/cs-resolve.md

Co-authored-by: Emily Grace Seville <EmilySeville7cfg@gmail.com>

* Update pages/common/cs.md

Co-authored-by: Emily Grace Seville <EmilySeville7cfg@gmail.com>

* Update pages/common/cs-java.md

Co-authored-by: Emily Grace Seville <EmilySeville7cfg@gmail.com>

* Update pages/common/cs-resolve.md

Co-authored-by: Emily Grace Seville <EmilySeville7cfg@gmail.com>

* fix error

Co-authored-by: Emily Grace Seville <EmilySeville7cfg@gmail.com>
pull/3/head
Elia Migliore 2023-01-09 17:38:15 +01:00 committed by GitHub
parent 12c37fc025
commit 1616fd5544
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 193 additions and 0 deletions

View File

@ -0,0 +1,20 @@
# cs complete dep
> Allows the developer to search for libraries without searching directly on the web but from the command line.
> More information: <https://get-coursier.io/docs/cli-complete>.
- Print which artifacts are published under a specific Maven group identifier:
`cs complete-dep {{group_id}}`
- List published library versions under a specific Maven group identifier and an artifact one:
`cs complete-dep {{group_id}}:{{artifact_id}}`
- Print which artifacts are pubblished under a given Maven groupId searching in the ivy2local:
`cs complete-dep {{group_id}} --repository ivy2local`
- List published artifacts under a Maven group identifier searching in a specific repository and credentials:
`cs complete-dep {{group_id}}:{{artifact_id}} --repository {{repository_url}} --credentials {{user}}:{{password}}`

28
pages/common/cs-fetch.md Normal file
View File

@ -0,0 +1,28 @@
# cs fetch
> Fetch fetches the JARs of one or more dependencies.
> More information: <https://get-coursier.io/docs/cli-fetch>.
- Fetch a specific version of a jar:
`cs fetch {{group_id}}:{{artifact_id}}:{{artifact_version}}`
- Fetch a package and evaluate the classpath corresponding to the selected package in an env var:
`CP="$(cs fetch --classpath org.scalameta::scalafmt-cli:latest.release)"`
- Fetch a source of a specific jar:
`cs fetch --sources {{group_id}}:{{artifact_id}}:{{artifact_version}}`
- Fetch the javadoc jars:
`cs fetch --javadoc {{group_id}}:{{artifact_id}}:{{artifact_version}}`
- Fetch dependency with javadoc jars and source jars:
`cs fetch --default={{true}} --sources --javadoc {{group_id}}:{{artifact_id}}:{{artifact_version}}`
- Fetch jars coming from dependency files:
`cs fetch {{--dependency-file path/to/file1 --dependency-file path/to/file2 ...}}`

View File

@ -0,0 +1,36 @@
# cs install
> Install an application in the installation directory onfigured when installing `cs` (to enable the binary to be loaded add to your `.bash_profile` the `$ eval "$(cs install --env)"` command).
> More information: <https://get-coursier.io/docs/cli-install>.
- Install a specific application:
`cs install {{application_name}}`
- Install a specific version of an application:
`cs install {{application_name}}:{{application_version}}`
- Search an application by a specific name:
`cs search {{application_partial_name}}`
- Update a specific application if available:
`cs update {{application_name}}`
- Update all the installed applications:
`cs update`
- Uninstall a specific application:
`cs uninstall {{application_name}}`
- List all installed applications:
`cs list`
- Pass specific java options to an installed application:
`{{application_name}} {{-Jjava_option_name1=value1 -Jjava_option_name2=value2 ...}}`

32
pages/common/cs-java.md Normal file
View File

@ -0,0 +1,32 @@
# cs java
> The java and java-home commands fetch and install JVMs. The java command runs them too.
> More information: <https://get-coursier.io/docs/cli-java>.
- Call the java version by using coursier:
`cs java -version`
- Call a specific java version with custom properties using coursier:
`cs java --jvm {{jvm_name}}:{{jvm_version}} -Xmx32m -X{{another_jvm_opt}} -jar {{path/to/jar_name.jar}}`
- List all the available JVM in the coursier default index:
`cs java --available`
- List all the installed JVM in the system with his own location:
`cs java --installed`
- Set the a specific JVM as one-off "default" for the shell instance:
`cs java --jvm {{jvm_name}}:{{jvm_version}} --env`
- Revert the changes for the default JVM settings:
`eval "$(cs java --disable)"`
- Set a specific JVM as default for the whole system:
`cs java --jvm {{jvm_name}}:{{jvm_version}} --setup`

20
pages/common/cs-launch.md Normal file
View File

@ -0,0 +1,20 @@
# cs launch
> Launch an application from the name directly from one or more Maven dependencies without the need of installing it.
> More information: <https://get-coursier.io/docs/cli-launch>.
- Launch a specific application with arguments:
`cs launch {{application_name}} -- {{arg1 arg2 ...}}`
- Launch a specific application version with arguments:
`cs launch {{application_name}}:{{application_version}} -- {{arg1 arg2 ...}}`
- Launch a specific version of an application specifying which is the main file:
`cs launch {{group_id}}:{{artifact_id}}:{{artifact_version}} --main-class {{path/to/main_class_file}}`
- Launch an application with specific java options and a jvm memory ones:
`cs launch --java-opt {{-Doption_name1:option_value1 -Doption_name2:option_value2 ...}} --java-opt {{-Xjvm_option1 -Xjvm_option2 ...}} {{application_name}}`

View File

@ -0,0 +1,28 @@
# cs resolve
> Resolve lists the transitive dependencies of one or more other dependencies.
> More information: <https://get-coursier.io/docs/cli-resolve>.
- Resolve lists of transitive dependencies of two dependencies:
`cs resolve {{group_id1}}:{{artifact_id1}}:{{artifact_version1}} {{group_id2}}:{{artifact_id2}}:{{artifact_version2}}`
- Resolve lists of transitive dependencies of a package by the dependency tree:
`cs resolve --tree {{group_id}}:{{artifact_id}}:{{artifact_version}}`
- Resolve dependency tree in a reverse order (from a dependency to its dependencies):
`cs resolve --reverse-tree {{group_id}}:{{artifact_id}}:{{artifact_version}`
- Print all the libraries that depends on a specific library:
`cs resolve {{group_id}}:{{artifact_id}}:{{artifact_version}} --what-depends-on {{searched_group_id}}:{{searched_artifact_id}}`
- Print all the libraries that depends on a specific library version:
`cs resolve {{group_id}}:{{artifact_id}}:{{artifact_version}} --what-depends-on {{searched_group_id}}:{{searched_artifact_id}}{{searched_artifact_version}}`
- Print eventual conflicts between a set of packages:
`cs resolve --conflicts {{group_id1:artifact_id1:artifact_version1 group_id2:artifact_id2:artifact_version2 ...}}`

29
pages/common/cs.md Normal file
View File

@ -0,0 +1,29 @@
# coursier
> Application and artifact manager for the Scala language, it can install Scala applications and setup your Scala development environment.
> Some subcommands such as `install`, `launch`, `java`, `fetch`, `resolve`, `complete-dep`, etc. have their own usage documentation, accessible via `tldr cs subcommand`.
> More information: <https://get-coursier.io/docs/overview>.
- Display version:
`cs version`
- Show a list of the installed applications:
`cs list`
- Install a specific application:
`cs install {{application_name}}`
- Uninstall a specific application:
`cs uninstall {{application_name}}`
- Setup machine for the Scala development:
`cs setup`
- Update all the installed applications:
`cs update`