Skip to main content

Dependencies

Haft provides access to all official Spring Boot starters plus 230+ additional dependency shortcuts for popular libraries across 35 categories.

Build Tool Support

Haft automatically detects your build tool and modifies the appropriate file:

File FoundBuild ToolDependency Format
pom.xmlMavenXML dependencies
build.gradle.ktsGradle (Kotlin DSL)Kotlin DSL syntax
build.gradleGradle (Groovy DSL)Groovy DSL syntax

Spring Initializr Dependencies

These are the official Spring Boot starters available during haft init:

Developer Tools

DependencyDescription
devtoolsSpring Boot DevTools for fast restarts
lombokJava annotation library for boilerplate reduction
configuration-processorGenerate metadata for configuration properties
docker-composeDocker Compose support

Web

DependencyDescription
webSpring Web MVC for RESTful applications
webfluxReactive web framework
graphqlSpring GraphQL support
rest-docsDocument RESTful APIs
hateoasHypermedia-driven RESTful services
web-servicesSOAP web services
jerseyJAX-RS with Jersey
vaadinVaadin Flow web framework
thymeleafThymeleaf template engine
freemarkerFreeMarker template engine
mustacheMustache template engine
groovy-templatesGroovy template engine

SQL Databases

DependencyDescription
data-jpaSpring Data JPA with Hibernate
data-jdbcSpring Data JDBC
jdbcSpring JDBC
h2H2 Database (embedded)
mysqlMySQL Driver
postgresqlPostgreSQL Driver
mariadbMariaDB Driver
oracleOracle Driver
sqlserverMicrosoft SQL Server Driver
flywayFlyway database migrations
liquibaseLiquibase database migrations
jooqjOOQ SQL DSL

NoSQL Databases

DependencyDescription
data-mongodbSpring Data MongoDB
data-mongodb-reactiveReactive MongoDB
data-redisSpring Data Redis
data-redis-reactiveReactive Redis
data-elasticsearchSpring Data Elasticsearch
data-cassandraSpring Data Cassandra
data-cassandra-reactiveReactive Cassandra
data-couchbaseSpring Data Couchbase
data-couchbase-reactiveReactive Couchbase
data-neo4jSpring Data Neo4j

Security

DependencyDescription
securitySpring Security
oauth2-clientOAuth2 Client
oauth2-resource-serverOAuth2 Resource Server
oauth2-authorization-serverOAuth2 Authorization Server
ldapLDAP authentication

Messaging

DependencyDescription
kafkaApache Kafka
kafka-streamsKafka Streams
amqpRabbitMQ (AMQP)
artemisApache ActiveMQ Artemis
pulsarApache Pulsar
pulsar-reactiveReactive Pulsar
websocketWebSocket support
rsocketRSocket

Cloud

DependencyDescription
cloud-config-clientConfig Client
cloud-config-serverConfig Server
cloud-eureka-clientEureka Discovery Client
cloud-eureka-serverEureka Discovery Server
cloud-gatewaySpring Cloud Gateway
cloud-gateway-mvcSpring Cloud Gateway MVC
cloud-circuitbreaker-resilience4jCircuit Breaker (Resilience4j)
cloud-starter-consul-discoveryConsul Discovery
cloud-starter-vault-configVault Configuration
cloud-starter-zookeeper-discoveryZookeeper Discovery

Observability

DependencyDescription
actuatorSpring Boot Actuator
datadogDatadog metrics
graphiteGraphite metrics
influxInfluxDB metrics
new-relicNew Relic metrics
prometheusPrometheus metrics
wavefrontWavefront metrics
zipkinZipkin distributed tracing
distributed-tracingMicrometer Tracing

Testing

DependencyDescription
testcontainersTestcontainers support
cloud-contract-verifierSpring Cloud Contract Verifier
cloud-contract-stub-runnerSpring Cloud Contract Stub Runner
restdocsSpring REST Docs

I/O

DependencyDescription
batchSpring Batch
integrationSpring Integration
mailJava Mail Sender
quartzQuartz Scheduler
cacheSpring Cache
validationBean Validation (Hibernate Validator)

Extended Shortcuts (230+)

Beyond Spring Initializr starters, haft add supports 230+ shortcuts for popular libraries:

Web & HTTP

ShortcutDescription
feignDeclarative REST client (OpenFeign)
resilience4jFault tolerance (circuit breaker)
restclientSynchronous HTTP client
webclientReactive HTTP client
okhttpOkHttp HTTP client
retrofitRetrofit type-safe REST client
httpclient5Apache HttpClient 5
session-redisDistributed sessions with Redis
session-jdbcDistributed sessions with JDBC
grpcgRPC framework for Spring Boot
bucket4jRate limiting library
spring-cloud-gatewayAPI Gateway for microservices
eurekaService discovery with Eureka
consulService discovery with Consul
config-serverCentralized configuration server
config-clientConfig server client

SQL Databases (Extended)

ShortcutDescription
jpaSpring Data JPA (alias)
mybatisMyBatis SQL mapping framework
r2dbcReactive database access
r2dbc-postgresqlReactive PostgreSQL driver
clickhouseClickHouse column-oriented OLAP
cockroachdbCockroachDB distributed SQL
timescaledbTimescaleDB time-series
voltdbVoltDB in-memory SQL
sqliteSQLite embedded database
hsqldbHSQLDB embedded database
derbyApache Derby embedded database
duckdbDuckDB analytical database
questdbQuestDB time-series database

NoSQL (Extended)

ShortcutDescription
mongodbSpring Data MongoDB
mongodb-reactiveReactive MongoDB support
redisSpring Data Redis
elasticsearchSpring Data Elasticsearch
cassandraSpring Data Cassandra
neo4jSpring Data Neo4j
couchbaseCouchbase NoSQL database
scylladbScyllaDB (Cassandra-compatible)
influxdbInfluxDB time-series database
arangodbArangoDB multi-model database
hazelcastHazelcast in-memory data grid
igniteApache Ignite distributed computing
memcachedMemcached distributed caching
dynamodb-localDynamoDB enhanced client

Security (Extended)

ShortcutDescription
jwtJJWT library (api + impl + jackson)
passayPassword validation library
keycloakKeycloak admin client
auth0Auth0 authentication
vaultHashiCorp Vault integration
bouncy-castleBouncy Castle cryptography
jasyptEncryption for properties
nimbus-joseNimbus JOSE+JWT
otpTOTP/HOTP for 2FA
supertokensSuperTokens open source auth
kratosOry Kratos identity management
casCAS authentication client
samlSpring Security SAML
spring-sessionDistributed session management
recaptchaGoogle reCAPTCHA integration

Messaging (Extended)

ShortcutDescription
rabbitmqRabbitMQ Java client (direct)
activemqActiveMQ JMS messaging
natsNATS messaging system
zeromqZeroMQ high-performance messaging

AI & Machine Learning

ShortcutDescription
openaiOpenAI (ChatGPT, GPT-4) integration
anthropicAnthropic Claude integration
ollamaOllama local LLM integration
azure-openaiAzure OpenAI integration
bedrockAmazon Bedrock AI integration
vertex-aiGoogle Vertex AI Gemini integration
mistralMistral AI integration
pgvectorPostgreSQL vector database for AI
langchain4jLangChain for Java (LLM orchestration)
pineconePinecone vector database client
weaviateWeaviate vector database client
qdrantQdrant vector database client
chromaChroma vector database client
djlDeep Java Library (Amazon ML toolkit)
wekaWeka Machine Learning algorithms
corenlpStanford CoreNLP (NLP processing)

Cloud Providers

ShortcutDescription
aws-s3Amazon S3 file storage
aws-sqsAmazon Simple Queue Service
aws-sesAmazon Simple Email Service
aws-snsAmazon Simple Notification Service
aws-dynamodbAmazon DynamoDB NoSQL database
aws-lambdaAmazon Lambda serverless
aws-cognitoAmazon Cognito authentication
aws-secretsmanagerAmazon Secrets Manager
aws-cloudwatchAmazon CloudWatch monitoring
aws-kinesisAmazon Kinesis streaming
gcp-storageGoogle Cloud Storage
gcp-pubsubGoogle Cloud Pub/Sub
gcp-bigqueryGoogle BigQuery
gcp-firestoreGoogle Firestore
gcp-secretmanagerGoogle Secret Manager
gcp-functionsGoogle Cloud Functions
azure-storageAzure Blob Storage
azure-servicebusAzure Service Bus
azure-keyvaultAzure Key Vault
azure-cosmosdbAzure Cosmos DB
azure-functionsAzure Functions

Notifications

ShortcutDescription
twilioSMS, WhatsApp, Voice API
sendgridSendGrid email delivery
mailersendMailerSend transactional email
mailgunMailgun email delivery
firebase-adminFirebase push notifications
pusherPusher real-time messaging
slackSlack API integration
discordDiscord bot integration
telegramTelegram bot API
onesignalOneSignal push notifications

Payments

ShortcutDescription
stripeStripe payment processing
paypalPayPal payment SDK
braintreeBraintree payment processing
squareSquare payment processing
razorpayRazorpay payment gateway
mollieMollie payment gateway
adyenAdyen payment platform
ShortcutDescription
algoliaAlgolia search-as-a-service
meilisearchMeilisearch open-source search
typesenseTypesense typo-tolerant search
solrApache Solr enterprise search
opensearchOpenSearch (Elasticsearch fork)

Observability (Extended)

ShortcutDescription
opentelemetryOpenTelemetry distributed tracing
jaegerDistributed tracing with Jaeger
sentrySentry error tracking
lokiGrafana Loki logging
grafanaGrafana LGTM metrics
micrometerPrometheus metrics exporter

Developer Tools (Extended)

ShortcutDescription
mapstructMapStruct bean mapping
openapiSpringDoc OpenAPI (Swagger UI)
commons-langApache Commons Lang
guavaGoogle Guava
modelmapperModelMapper
config-processorIDE support for @ConfigurationProperties
nativeGraalVM native image support
vavrFunctional programming library
immutablesImmutable object generation
record-builderBuilder pattern for Java records
jmoleculesDDD architectural concepts
spotbugsSpotBugs static analysis
error-proneError Prone static analysis
checker-qualChecker Framework annotations

Testing (Extended)

ShortcutDescription
testSpring Boot Test
security-testSpring Security Test
mockitoMockito mocking
wiremockWireMock HTTP mock server
rest-assuredREST Assured API testing
assertjAssertJ fluent assertions
awaitilityAwaitility async testing
archunitArchUnit architecture testing
jsonassertJSONAssert comparison
gatlingGatling load testing
jmhJMH microbenchmark harness
fakerDataFaker test data generation
greenmailGreenMail email testing
seleniumSelenium browser automation
selenideSelenide concise UI tests
playwrightMicrosoft Playwright browser automation
cucumberCucumber BDD testing
hoverflyHoverfly API simulation
pactPact consumer-driven contract testing

Utilities

ShortcutDescription
jsoupHTML parsing and web scraping
zxingQR code and barcode generation
thumbnailatorImage resizing and processing
jasperreportsReport generation
jfreechartChart generation
opencsvCSV parsing and writing
snakeyamlYAML parsing
commonmarkMarkdown parsing
flexmarkAdvanced Markdown processor
protobufGoogle Protocol Buffers
avroApache Avro serialization
msgpackMessagePack binary format
kryoFast binary serialization
jaxbXML binding (Java 11+)
dom4jXML parsing
xstreamXML serialization
jschSSH and SFTP client
sshjModern SSH client
libphonenumberPhone number validation
slugURL slug generation
emojiEmoji parsing
joda-timeDate/time library (legacy)
jnaJava Native Access
commons-ioApache Commons IO
jackson-datatypeJackson Java 8 datatypes
apache-poiMicrosoft Office file handling
itextPDF generation and manipulation
minioS3-compatible object storage client
json-pathJSON path query library

Workflow

ShortcutDescription
camundaCamunda workflow automation
flowableFlowable BPMN engine
temporalTemporal workflow orchestration

Microservices

ShortcutDescription
spring-cloud-streamSpring Cloud Stream (Kafka/RabbitMQ)
spring-cloud-busSpring Cloud Bus state broadcast
spring-cloud-functionSpring Cloud Function serverless
spring-retrySpring Retry logic
shedlockShedLock distributed scheduling lock
etcdEtcd distributed key-value
zookeeperApache Zookeeper client
daprDapr distributed runtime SDK
grpc-servergRPC server starter

Caching

ShortcutDescription
caffeineCaffeine high-performance cache
ehcacheEhcache enterprise caching
infinispanInfinispan data grid
hazelcast-jetHazelcast Jet stream processing

Scheduling

ShortcutDescription
jobrunrJobRunr distributed jobs
db-schedulerDB Scheduler persistent tasks
schedulerTask scheduling with @Scheduled

API Documentation

ShortcutDescription
springdocSpringDoc OpenAPI 3
netflix-dgsNetflix DGS GraphQL
asyncapiAsyncAPI event-driven docs
json-schemaJSON Schema validation
graphql-kickstartGraphQL Kickstart starter

Logging

ShortcutDescription
logbackLogback logging framework
log4j2Apache Log4j 2 logging
slf4jSLF4J logging facade

Quality

ShortcutDescription
jacocoJaCoCo code coverage
checkstyleCheckstyle coding standards
spotlessSpotless code formatting
pmdPMD source code analyzer
sonarSonarQube integration

DevOps

ShortcutDescription
jibGoogle Jib Docker builds
docker-javaDocker Java API
kubernetes-clientKubernetes Java client
fabric8Fabric8 Kubernetes client

Feature Flags

ShortcutDescription
unleashUnleash feature toggle
launchdarklyLaunchDarkly feature flags
flagsmithFlagsmith feature flags
togglzTogglz feature flags for Spring
ff4jFF4J feature flipping

Maps & Geo

ShortcutDescription
google-mapsGoogle Maps Server SDK
mapboxMapbox Java SDK
graphhopperGraphHopper routing engine
h3Uber H3 Hexagonal Spatial Index
jtsJTS Topology Suite (geometry)
geotoolsGeoTools geospatial data tools
ip2locationIP2Location geo lookup
maxmindMaxMind GeoIP2 database

Media

ShortcutDescription
ffmpegFFmpeg video/audio processing
opencvOpenCV computer vision
pdfboxApache PDFBox PDF handling
tikaApache Tika content detection
docx4jDocx4j Word/PowerPoint files
openhtmltopdfOpenHTMLtoPDF converter
batikApache Batik SVG tools
metadata-extractorImage metadata extraction
imgscalrImgScalr image scaling
jxlsJXLS Excel templates
flying-saucerFlying Saucer XHTML to PDF
barcode4jBarcode4J barcode generation

Fintech

ShortcutDescription
web3jWeb3j Ethereum integration
bitcoinjBitcoinJ Bitcoin protocol
plaidPlaid bank account linking
xchangeXChange crypto exchange library
stellarStellar network SDK

Social

ShortcutDescription
facebook-sdkFacebook Graph API
twitter-apiTwitter/X API v2
linkedin-apiLinkedIn API
zoomZoom API integration
agoraAgora real-time video/audio
matrixMatrix.org decentralized chat

Data Processing

ShortcutDescription
sparkApache Spark Java API
flinkApache Flink stream processing
hadoopHadoop client libraries
tablesawTablesaw Java Dataframes
commons-mathApache Commons Math
nd4jND4J N-Dimensional Arrays
joda-moneyJoda-Money currency handling
jgraphtJGraphT graph algorithms

IoT

ShortcutDescription
mqtt-pahoEclipse Paho MQTT client
spring-integration-mqttSpring Integration MQTT
coapCalifornium CoAP protocol
modbusModbus industrial protocol
pi4jPi4J Raspberry Pi control

Ops

ShortcutDescription
actuatorSpring Boot Actuator for monitoring
micrometerMicrometer Prometheus metrics exporter

Template Engines

ShortcutDescription
thymeleafThymeleaf server-side HTML templating
freemarkerFreeMarker template engine
mustacheMustache template engine

Content

ShortcutDescription
romeRome RSS and Atom feed parser
htmlunitHtmlUnit headless browser
blikiBliki Wikipedia syntax parser
emoji-javaEmoji Java string handling

Networking

ShortcutDescription
nettyNetty async event-driven network framework
pcap4jPcap4J packet capture library
dns-javadnsjava DNS protocol implementation

Integration

ShortcutDescription
spring-integrationSpring Integration EIP patterns
apache-camelApache Camel integration framework
spring-cloud-data-flowSpring Cloud Data Flow orchestration
spring-cloud-taskSpring Cloud Task short-lived microservices

API

ShortcutDescription
springdocSpringDoc OpenAPI 3 generation
asyncapiAsyncAPI event-driven documentation
netflix-dgsNetflix DGS GraphQL framework
avro-serializerAvro serialization for Kafka schemas
json-schemaJSON Schema validation
graphql-kickstartGraphQL Kickstart starter

Using Dependencies

With haft add

# Interactive search picker
haft add

# Browse by category
haft add --browse

# Add by shortcut
haft add lombok jpa validation

# Add multiple at once
haft add jwt openapi mapstruct

# Add by Maven coordinates (auto-verified against Maven Central)
haft add org.mapstruct:mapstruct

# Add with specific version
haft add io.jsonwebtoken:jjwt-api:0.12.5

# Add with scope override
haft add h2 --scope test

# List all shortcuts
haft add --list

Adding Any Maven Central Dependency

You can add any dependency from Maven Central using Maven coordinates format:

# Format: groupId:artifactId
haft add org.apache.commons:commons-collections4

# Format: groupId:artifactId:version
haft add com.google.code.gson:gson:2.10.1

# Multiple coordinates
haft add org.modelmapper:modelmapper io.github.cdimascio:dotenv-java

Haft automatically:

  • Verifies the dependency exists on Maven Central
  • Fetches the latest version if not specified
  • Adds to your pom.xml or build.gradle with correct format
# This will fetch latest version automatically
$ haft add org.mapstruct:mapstruct
SUCCESS ✓ Added dependency=org.mapstruct:mapstruct:1.5.5.Final

# Error if dependency doesn't exist
$ haft add com.fake:nonexistent
ERROR ✗ dependency 'com.fake:nonexistent' not found on Maven Central

With haft remove

# Interactive picker
haft remove

# Remove by artifact name
haft remove lombok

# Remove by suffix (jpa matches spring-boot-starter-data-jpa)
haft rm jpa web

# Remove by coordinates
haft rm org.projectlombok:lombok

In Interactive Mode (haft init)

  1. Navigate to the Dependencies step
  2. Use / to search
  3. Use Tab or 0-9 for categories
  4. Press Space to select
  5. Press Enter to confirm

In Non-Interactive Mode

haft init my-app --deps web,data-jpa,lombok,validation

REST API

haft init my-api --deps web,data-jpa,validation,lombok
haft add jwt openapi

Microservice

haft init my-service --deps web,actuator,cloud-config-client,cloud-eureka-client
haft add resilience4j opentelemetry

Reactive Application

haft init my-reactive --deps webflux,data-mongodb-reactive,security

AI Application

haft init my-ai-app --deps web,lombok
haft add openai langchain4j pgvector

Batch Processing

haft init my-batch --deps batch,data-jpa,postgresql
haft add jobrunr

Full-Stack with Auth

haft init my-fullstack --deps web,data-jpa,security,thymeleaf,lombok
haft add jwt passay