Skip to content

Maven, Gradle & SDKMAN

Apache Maven

Scaffolding a project with Maven (maven archetype)

Maven Tests

Dependency Resolution in Maven

mvn dependency:analyze  (shows you the usage of listed and unlisted dependencies)
mvn dependency:resolve  (give me a list of everything I have declared, a nice way to avoid reading the POM file)
mvn dependency:tree     (how you got something on your classpath)

Maven and Docker

IDEs

Intellij IDEA

Maven Plugins

Maven Cheat Sheets

Other Commands

  • Display contents of a jar file:
jar tf target/example-1.0.0-SNAPSHOT.jar

Docker Maven Plugin (fabric8)

  • docker-maven-plugin This is a Maven plugin for building Docker images and managing containers for integration tests. It works with Maven 3.0.5 and Docker 1.6.0 or later.

Fabric8 Maven Plugin

Gradle

Gradle Cheat Sheets

SDKMAN

  • SdkMan is a tool for managing parallel versions of multiple Software Development Kits on most Unix based systems. It provides a convenient Command Line Interface (CLI) and API for installing, switching, removing and listing Candidates. Formerly known as GVM the Groovy enVironment Manager, it was inspired by the very useful RVM and rbenv tools, used at large by the Ruby community.
  • Using Jenkins Pipeline parallel stages to build Maven project with different JDKs
  • Demo: A single Jenkinsfile, a Java Maven project, a single Dockerfile, multiple Java versions build and tested in parallel thanks to SDKMAN:
  • jitpack.io 🌟 Easy to use package repository for Git. Publish your JVM and Android libraries. Publishing your own library to the Maven Central repository may be a painful experience. Therefore, you may just create a GitHub Release for your library, and then include it as a dependency using jitpack.