Deploying Scala libraries to Sonatype for dummies alternatives and similar packages
Based on the "Misc." category.
Alternatively, view Deploying Scala libraries to Sonatype for dummies alternatives based on common mentions on social networks and blogs.
Exercism - Scala ExercisesCrowd-sourced code mentorship. Practice having thoughtful conversations about code.
Scala schoolLessons in the Fundamentals of Scala
Scala ExercisesThe easy way to learn Scala.
Demos and Examples in Scala (Chinese)scala、spark使用过程中，各种测试用例以及相关资料整理
Learn-by-doing functional programming course on Scala7.2 0.0 Deploying Scala libraries to Sonatype for dummies VS Learn-by-doing functional programming course on Scalalearn-by-doing course/tutorial for functional programming on scala
A Tour of ScalaThe standard Scala XML library
Functional Programming for Mortalssource and examples to Functional Programming for Mortals with Scalaz
The Type Astronaut's Guide to Shapeless4.5 2.1 Deploying Scala libraries to Sonatype for dummies VS The Type Astronaut's Guide to ShapelessExample code to accompany shapeless-guide.
Get Programming with ScalaCode for the book "Get Programming with Scala" (Manning)
CA ArtLearn Cellular Automata through generative art
Scalera BlogBlog about Scala language and its environment (howto's, good practices, tips,...). Weekly posts written in both spanish and english
List of Scala Online CoursesA list of free and paid Scala online courses by Classpert, An online course search and comparison website
Scala Days ConferencesA youtube channel that provides full fledged videos, recorded at Scala Days Conferences
Dr. Mark LewisResources by Dr. Mark Lewis >> Website | Youtube Playlists
Functional Programming in ScalaCoursera Specialization (5 courses) created by Martin Odersky et al. at the EPFL (Ecole polytechnique fédérale de Lausanne).
Reactive Programming with Scala and AkkaUse the concepts of reactive programming to build distributed systems running on multiple nodes
Scala Collections CookbookScala collections introduction. written in Chinese.
Scala With CatsLearn system architecture and design using the techniques of modern functional programming with Cats
Scala for the Impatient 2nd EditionCovers most Scala features with short and easy to understand explainations.
Access the most powerful time series database as a service
Do you think we are missing an alternative of Deploying Scala libraries to Sonatype for dummies or a related project?
Scala With CatsvsFunctional Programming for Mortals
Reactive Programming with Scala and AkkavsScala With Cats
Introduction to programming with dependent types in ScalavsExercism - Scala Exercises
Scala With CatsvsThe Type Astronaut's Guide to Shapeless
Scala ExercisesvsExercism - Scala Exercises
Publishing a Scala library with SBT in Sonatype OSS for dummies:
When you use a modern dependency management tool like maven or sbt your dependencies get downloaded automatically. For most of us that's a magic process, most of the time it works and it's great. It really simplifies dependency management and makes us developers very productive.
That's done through the "central" repository, hosted by Sonatype free of charge for open source projects.
Let's say you have an open source project and want to release some artifacts for other people to use through this convenient process. This is a step-by-step guide on how to accomplish this, as the process can be a bit involved.
Setup sonatype account
- Follow the two steps in initial setup
- Create account
- Create a ticket Make sure to fill "Group Id" with your desired name or domain of your project. For example "org.example", let's call this $GROUP_ID
Setup project sbt
In build.sbt: we set "organization" to $GROUP_ID if this is not correct we will get a permission denied error when trying to release.
build.sbt: Make sure to include a "name" for your lib, for example "mylib"
Add the publishing boilerplate as seen in
build.sbt (Lines 22-55) adjusting the values to your project.
Add the "sbt-pgp" plugin globally to sbt:
mkdir -p ~/.sbt/0.13/plugins echo 'addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.0.0")' > ~/.sbt/0.13/plugins/gpg.sbt
Start sbt in your project folder
Create a gpg key
sbt> pgp-cmd gen-key
This should create the public and private keys in ~/.sbt/gpg/
Or import a preexisting key
Alternatively if you have a gpg key you can import it and point the secret keyring of sbt gpg to it:
gpg --import secring.asc $ cat .sbt/gpg.sbt pgpSecretRing := file("/Users/xxxx/.gnupg/secring.gpg")
And skip the next step.
Import the key in your gpg keyring
cd ~/.sbt/gpg/ gpg --import secring.asc
Copy the key ID in the output:
gpg: key 526BA3C6: ... ^^^^^^^^
Import the public key into a public keyserver that central will use to verify your signed jars
gpg --send-keys --keyserver pgp.mit.edu 526BA3C6 pubring.asc
Make sure your sonatype credentials are available to sbt, put the following in
credentials += Credentials("Sonatype Nexus Repository Manager", "oss.sonatype.org", "<your username>", "<your password>")
From the sbt console you can now do
This should upload the artifacts, .jar .pom with their respective signatures.
Go to Sonatype OSS to release
Login by cliking on the upper right corner of the screen When you first upload the artifacts they are in a "staging area" not yet released
Scroll down to your artifact and verify that it has the files you want, additionally you can verify the jar with
jar tvf to check the contents
[screen shot 00](sonatype_00.png)
To release our artifact we need to first "Close" [screen shot 01](sonatype_01.png)
Check in the activity tab that everything is successful, or address any issues encountered
After a bit, we should be able to get the dependency in other projects by adding to the
"org.example" %% "mylib" % "0.1"
That should be all, congratulations! your artifact should be available for the world at large to use!
You might want to also check the similar guide in the SBT documentation