Simple maven deploy with credentials as arguments

If you don’t code day to day in some JVM language but you still need to use Maven for deploying artifacts from time to time, your best option is to use Maven docker image. However, credentials to your Maven repository are stored in .m2/settings.xml in your home folder which makes the standard Maven docker image harder to use.

If you just want to deploy an artifact, you can use image raget/maven-deployer.

docker pull raget/maven-deployer

It is pretty easy:

docker run -v <path_to_artefacts_folder>:/data mvn-deploy "<YOUR_REPO>"
 "-Drepo.login=<YOUR_USERNAME>" "-Drepo.pwd=<YOUR_PASSWORD>" "-Dfile=/data/"

Sometimes it … Continue reading.

Secure random password generator for .NET Core

Recently, I was asked to replace the legacy and insecure password generator with the new one written in C#. After a minute of googling, I found pretty old .NET Membership function GeneratePassword from the namespace System.Web.Security. However, this package is not available in .NET Core. I also didn’t like any library or sample I managed to google out because of their design or security. So I spent a day crafting a secure random password generator for .NET Core.

Nuget package

Just install Raget.Security.Passwords nuget package and use it like … Continue reading.