arconia dev
The arconia dev command runs your Spring Boot application in development mode. It delegates to your build tool’s (Maven/Gradle) development tasks and is designed to work seamlessly with the Arconia Framework.
How It Works
When you run arconia dev, the Arconia Framework detects that the application is running in development mode and activates a series of dev-only features, such as enabling a dev Spring profile and provisioning any declared Arconia Dev Services.
Usage
Basic usage:
arconia dev
Run from the test classpath (for Spring Boot’s native Testcontainers approach):
arconia dev --test
Pass extra parameters to the underlying build tool using --:
arconia dev -- --stacktrace
arconia dev -- -DmyProperty=value
Options
The following options are available:
| Option | Default | Description |
|---|---|---|
|
|
Perform a clean build. |
|
|
Perform the build offline. |
|
|
Run the application from the test classpath. Equivalent to |
|
|
Include verbose output. |
|
Display help information for the command. |
Build Tool Integration
The dev command automatically detects whether your project uses Maven or Gradle and runs the appropriate development task:
| Build Tool | Command |
|---|---|
Gradle |
|
Maven |
One of:
|
Use -- to pass parameters directly to the underlying build tool. The -- separator is required to distinguish Arconia CLI options from build tool parameters.
When the --test option is used, the command changes to bootTestRun for Gradle and spring-boot:test-run for Maven, running the application from the test classpath.
Workflow with Arconia Dev Services
Arconia Dev Services make it trivial to provision external services for local development. As an example, here is how to add a PostgreSQL database to a Spring Boot application using Gradle:
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-data-jdbc'
runtimeOnly 'org.postgresql:postgresql'
// Arconia Dev Services: only active during development and testing
testAndDevelopmentOnly 'io.arconia:arconia-dev-services-postgresql'
// Optional: enables live restart and keeps containers alive across restarts
developmentOnly 'org.springframework.boot:spring-boot-devtools'
}
dependencyManagement {
imports {
mavenBom 'io.arconia:arconia-bom:0.24.0'
}
}
Then, you can run your Spring Boot application as follows:
arconia dev
On startup, Arconia will automatically:
-
Detect the application is running in dev mode and activate the
devprofile. -
Start a PostgreSQL container using Testcontainers.
-
Configure the
DataSourceto connect to it. Nospring.datasource.*properties needed. -
Keep the container running across code changes if Spring Boot DevTools is on the classpath.
| Arconia Dev Services are available for a wide range of services, including data stores (PostgreSQL, MongoDB, Redis, MySQL, and more), message brokers (Kafka, RabbitMQ, Pulsar), observability platforms (Grafana LGTM, Phoenix, OpenTelemetry Collector), and AI inference servers (Ollama). See the Arconia Dev Services documentation for the full list. |
The --test Flag
The --test flag runs the application from the test classpath. It’s equivalent to ./gradlew bootTestRun or ./mvnw spring-boot:test-run. This is the approach needed when relying on Spring Boot’s native Testcontainers development-time services, which live in the test classpath and require a separate TestApplication class and container configuration beans.
If you are using Arconia Dev Services, you do not need --test. Dev Services work from the main classpath and activate automatically when arconia dev is used, with no boilerplate code required.