Skip to main content

JavaHiddenGems

Johanjanssen JavaHiddenGems


Make sure to start the Docker-webserver-cache container before running the OWASP dependency check or the Old GroupIds Alerter. Github Examples


Apache PDFBox 

Create and change PDF files or extract content from PDF files https://pdfbox.apache.org/


Apache POI 

Create, change and read files based on the Office Open XML standards (OOXML) such as Word and Excel files. https://poi.apache.org/


ArchUnit

Verify the Java code's architecture with unit tests. https://www.archunit.org/


AssertJ

Test code with assertions. https://assertj.github.io/doc/


AutoService

Generator for ServiceLoader service providers. https://github.com/google/auto


AutoValue

Generate immutable value classes. https://github.com/google/auto


Awaitility

Test asynchronous applications with a DSL. https://github.com/awaitility/awaitility


Buildpacks

Create (Docker) images. https://buildpacks.io/


ClassGraph

Classpath and module scanner for Java and other JVM languages. https://github.com/classgraph/classgraph


Eclipse Deeplearning4j

Suite of tools for deep learning on the JVM. https://projects.eclipse.org/proposals/eclipse-deeplearning4j https://www.rcp-vision.com/build-your-first-neural-network-with-eclipse-deeplearning4j/ No example yet


EqualsVerifier

Testing equals() and hashCode(). https://jqno.nl/equalsverifier/


flexmark-java

Parse markdown and render to HTML. https://github.com/vsch/flexmark-java


Gatling

Load testing for web applications. https://github.com/gatling/gatling


Google Guice

Dependency injection framework. https://github.com/google/guice


GraphQL Java

Query language for APIs. https://www.graphql-java.com/


Handlebars.java

Merge data with Mustache/Handlebars templates. Comparable to Pebble Templates. https://github.com/jknack/handlebars.java


iText

PDF library https://itextpdf.com/en Be aware of the quite limiting license: https://fossa.com/blog/open-source-software-licenses-101-agpl-license/


Apache PDFBox may be used as an alternative.


Jacoco

Code coverage library. https://www.jacoco.org/jacoco/ coverage unit test and running application


Jenetics

Java Genetic Algorithm, Evolutionary Algorithm, Genetic Programming, and Multi-objective Optimization library. https://jenetics.io/ No example yet


J2CL / GWT

J2CL is a transpiler from Java to Closure style JavaScript. https://github.com/google/j2cl https://www.gwtproject.org/ More info https://lofidewanto.medium.com/web-browser-programming-in-java-e69a153fcb15 No example yet


Java/JDK Mission Control

Monitor and diagnose applications, can also be used together with Flight Recorder. https://docs.oracle.com/en/java/java-components/jdk-mission-control/8/user-guide/


Java/JDK Flight Recorder

Collecting diagnostic and profiling data for a running application. https://developers.redhat.com/blog/2020/08/25/get-started-with-jdk-flight-recorder-in-openjdk-8u#using_jdk_flight_recorder_with_jdk_mission_control


JavaPoet

Java API for generating .java source files. https://github.com/square/javapoet


Jbang

Edit and run source-only Java programs. https://www.jbang.dev/


Jdbi

Relational database access. https://jdbi.org/


Jib

Build optimized Docker and OCI images without a Docker daemon. https://github.com/GoogleContainerTools/jib


JfrUnit

Assert Flight Recorder events. https://github.com/moditect/jfrunit


jlink

Generate custom Java runtime images with only the required platform modules. https://www.baeldung.com/jlink https://access.redhat.com/documentation/en-us/openjdk/11/html/using_jlink_to_customize_java_runtime_environment/index


jMolecules

Describe architectural styles such as layered, onion and hexagonal with annotations. Explicitly use DDD concepts with annotations or interfaces instead of naming classes ...Entity. ByteBuddy is used to map the annotations to Spring Data annotations during the build. https://github.com/xmolecules/jmolecules


JobRunr

Distributed job scheduler. https://www.jobrunr.io/en/


jOOQ

Integrate SQL queries in Java. https://www.jooq.org/


jpackage

Create native installers and packages. https://www.baeldung.com/java14-jpackage


JReleaser

Package and distribute the application to Homebrew, Chocolatey and others. https://jreleaser.org/


JShell

Interactive shell to learn and prototype Java code. https://en.wikipedia.org/wiki/JShell


jsoup

HTML parser. https://jsoup.org/


libphonenumber

Parsing, formatting and validating phone numbers. https://github.com/google/libphonenumber


MapStruct

Code generator to map between bean types. https://mapstruct.org/


Maven Central Search (mcs)

Search dependency coordinates in Maven Central. https://github.com/mthmulders/mcs


Maven Dependency Plugin

Analyze and manipulate artifacts. https://maven.apache.org/plugins/maven-dependency-plugin/


Maven Enforcer Plugin

Enforce constraints such as the Maven or JDK version. The Maven Enforcer Plugin


Maven Projects Info Reports Plugin

Generate reports about the project. https://maven.apache.org/plugins/maven-project-info-reports-plugin/


Maven Versions Plugin / Gradle Versions Plugin

Manage artifact versions. https://www.mojohaus.org/versions-maven-plugin/ https://github.com/ben-manes/gradle-versions-plugin


Maven Wrapper

Manages Maven version and configuration so the application uses the same setup everywhere. https://maven.apache.org/wrapper/


Micrometer application monitoring

Deliver application metrics from Spring Boot. https://micrometer.io/


MicroStream

Java serializer that does not require you to implement an interface or put annotations in your classes. https://microstream.one/


Moduliths

Verify the modular structure for Spring Boot applications between modules based on ArchUnit. https://github.com/moduliths/moduliths


mvnd (Apache Maven Daemon)

Faster Maven builds. The mvnd


Old GroupIds Alerter Maven Plugin / Old GroupIds AlerterGradle Plugin

Checks for deprecated groupIds/ArtifactIds and suggests alternatives. https://github.com/jonathanlermitage/oga-maven-plugin https://github.com/jonathanlermitage/oga-gradle-plugin


OpenRewrite

Seach and transform Java applications, for instance to update frameworks, or to migrate to other frameworks. https://docs.openrewrite.org/


(OWASP) Dependency Check Maven / (OWASP) Dependency Check Gradle

Detect publicly disclosed vulnerabilities in dependencies. https://jeremylong.github.io/DependencyCheck/dependency-check-maven/ https://jeremylong.github.io/DependencyCheck/dependency-check-gradle/index.html


Be aware that the plugin uses a CVE database and that one has some changes coming in the endpoints such as rate limits and an API key: https://nvd.nist.gov/General/News/changes-to-feeds-and-apis. Google also has a CVE database https://github.com/github/advisory-database#license but it looks like there's no (Maven) plugin for it yet.


Passay

Library to enforce rules for passwords. https://www.passay.org/


Pebble Templates

Templating engine comparable to Handlebars https://pebbletemplates.io/


picocli

One file framework to create Java command line applications. https://picocli.info/


Playwright

End-to-end testing for web applications. https://playwright.dev/ No example yet


Pitest or PIT Mutation Testing

Test your unit tests by automatically changing production code and rerunning the tests to see if they still pass. The Pitest


Renovate

Creates pull requests to update the dependencies. https://docs.renovatebot.com/java/


Dependabot

Creates pull requests to update the dependencies. https://docs.github.com/en/code-security/dependabot


Resilience4j

Fault tolerance library. https://github.com/resilience4j/resilience4j No example yet


REST Assured

Test and validate REST services. https://rest-assured.io/


RESTEasy

Supports building REST applications. https://github.com/resteasy/Resteasy


Retrofit

Type safe HTTP client. https://square.github.io/retrofit/


ShedLock

Guarantees that scheduled tasks are executed at most once at the same time in a distributed environment. https://github.com/lukas-krecan/ShedLock


SDKMAN!

Manage multiple versions of Software Development Kits (SDK's). https://sdkman.io/


Spark

Perform data engineering, science and machine learning on a single machine and on clusters. https://spark.apache.org/ https://github.com/apache/spark


Testcontainers

Provides database, Selenium and many other containers to test against in unit tests. https://www.testcontainers.org/ https://github.com/testcontainers/testcontainers-java


Timefold

Solve planning and scheduling challenges such as vehicle routing, rostering, create schedules etcetera. https://timefold.ai/


Togglz

Feature flaggs. https://www.togglz.org/ https://github.com/togglz/togglz


Lightbend/TypeSafe config and tsc-reload

Load and reload configuration such as property files. https://github.com/lightbend/config https://github.com/arkadius/tsc-reload


Update4j

Auto update and launch desktop applications. https://github.com/update4j/update4j No example yet


Vavr

Functional library. https://www.vavr.io/ https://github.com/vavr-io/vavr


Wiremock

Create mock APIs. http://wiremock.org https://github.com/wiremock/wiremock

Comments

Popular posts from this blog

Apache Storm vs Apache Flink

 Apache Storm and Apache Flink are both distributed stream processing frameworks, but they have some key differences in terms of architecture, programming models, and features. Here's a comparison between Apache Storm and Apache Flink: 1. **Programming Model:**    - **Apache Storm:** Storm provides a low-level, event-driven programming model using spouts and bolts. Spouts are sources of data, and bolts are the processing units that apply transformations or analyses to the data. It is designed for building complex, directed acyclic graphs (DAGs) of processing stages.        - **Apache Flink:** Flink offers a more high-level and expressive API for stream processing. Flink's API includes a functional programming style using operations like map, flatMap, filter, and windowing operations, making it easier to express complex data transformations. 2. **Event Time Processing:**    - **Apache Storm:** Initially, Storm had challenges in handling event ...

Shell Scripts

Shell scripts $? variable: In a shell script, we can check the return status immediately after running any command to determine if command is successful or not. like echo $? if return status is 0, it indicates success,  and if the return status is non-zero, typically 1, means failure. /dev/null /dev/null is a special device file in Unix-like operating systems (including Linux) that discards all data written to it. It essentially acts as a black hole for data. When data is written to /dev/null, it simply disappears and does not consume any storage space. Here are some common use cases for /dev/null: Discarding Output: As mentioned earlier, redirecting output to /dev/null is a common way to discard unwanted output, such as diagnostic messages or verbose output, especially when running scripts or commands in the background where you don't need to see the output. command >/dev/null  # Redirects stdout to /dev/null command 2>/dev/null # Redirects stderr to /dev/null command ...

Recover lost files on Windows, free and effective

 Windows File Recovery If necessary, download and launch the app from Microsoft Store. Press the Windows key, enter Windows File Recovery in the search box, and then select Windows File Recovery. When you are prompted to allow the app to make changes to your device, select Yes. In the Command Prompt window, enter the command in the following format:  winfr source-drive: destination-drive: [/mode] [/switches] There are 2 basic modes you can use to recover files: Regular and Extensive.  Regular mode examples Recover your Documents folder from your C: drive to the recovery folder on an E: drive. Don’t forget the backslash (\) at the end of the folder.   winfr C: E: /regular /n \Users\<username>\Documents\  Recover PDF and Word files from your C: drive to the recovery folder on an E: drive.  winfr C: E: /regular /n *.pdf /n *.docx  Extensive mode examples   winfr E: C: /extensive /n *invoice*  Recover jpeg and png photos from your...