Skip to content

Maven, Gradle & SDKMAN

  1. Apache Maven
    1. Scaffolding a project with Maven (maven archetype)
    2. Maven Tests
    3. Dependency Resolution in Maven
    4. Maven and Docker
    5. IDEs
      1. Intellij IDEA
    6. Maven Plugins
    7. Maven Cheat Sheets
    8. Other Commands
    9. Docker Maven Plugin (fabric8)
    10. Fabric8 Maven Plugin (deprecated)
  2. Eclipse JKube (formerly known as Fabric8 Maven Plugin) - Kubernetes & OpenShift Maven and Gradle Plugins
  3. Gradle
    1. Gradle Cheat Sheets
  4. SDKMAN
  5. Related Tools

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 (deprecated)

Eclipse JKube (formerly known as Fabric8 Maven Plugin) - Kubernetes & OpenShift Maven and Gradle Plugins

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.
  • JBang Run Java code directly. Reuse Maven dependencies with ease. Lets Students, Educators and Professional Developers create, edit and run self-contained source-only Java programs with unprecedented ease.