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

--clean

false

Perform a clean build.

--offline

false

Perform the build offline.

--test or -t

false

Run the application from the test classpath. Equivalent to bootTestRun (Gradle) or spring-boot:test-run (Maven). Useful when using Spring Boot’s native Testcontainers support without Arconia Dev Services.

--verbose or -v

false

Include verbose output.

--help or -h

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

  • ./gradlew bootRun (Linux/macOS with wrapper)

  • gradle bootRun (Linux/macOS without wrapper)

  • gradlew.bat bootRun (Windows with wrapper)

  • gradle bootRun (Windows without wrapper)

Maven

One of:

  • ./mvnw spring-boot:run (Linux/macOS with wrapper)

  • mvn spring-boot:run (Linux/macOS without wrapper)

  • mvnw.cmd spring-boot:run (Windows with wrapper)

  • mvn spring-boot:run (Windows without wrapper)

  • mvnd spring-boot:run (Using Maven Daemon)

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:

  1. Detect the application is running in dev mode and activate the dev profile.

  2. Start a PostgreSQL container using Testcontainers.

  3. Configure the DataSource to connect to it. No spring.datasource.* properties needed.

  4. 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.