Stateless central server application that manages DevStack project lifecycles. The system will expose RESTful APIs for third-party client applications and future CLI tools, while minimizing server-side data storage and leveraging external identity providers.
- Prerequisites
- Quick Start
- Build Options
- Running the Application
- Development Workflow
- Docker Support
- Advanced Usage
- Troubleshooting
Before using the Makefile, ensure you have the following installed:
- Java 17+ - The project uses Java 17
- Maven - Maven wrapper (
mvnw) is included in the project - Make - For running Makefile commands
- GraalVM with native-image - Required for native binary compilation
- Docker - Required for Docker image building
# Install GraalVM native-image component
gu install native-imageThe easiest way to get started is using the Makefile:
# Show all available commands
make help
# Build and run the application
make quick-startThis will build the JAR and start the application on http://localhost:8080.
Build a traditional Spring Boot JAR file:
make jar- Output:
core/target/core-0.0.1-SNAPSHOT.jar - Includes all dependencies
- Standard Spring Boot startup time
Build a native binary using GraalVM (requires GraalVM installation):
make native- Output:
core/target/core - Fast startup time
- Lower memory footprint
- Requires GraalVM with native-image
Build a native Docker image using GraalVM (requires GraalVM installation):
make docker-native- Output: Docker image
devstack-api-service-native:latest - Ultra-fast startup time
- Minimal container size
- Requires GraalVM with native-image
Build JAR, native binary, and Docker images (if GraalVM is available):
make allmake run-jarmake run-nativemake run-dockermake run-docker-nativeOnce running, the application is available at:
- Main Application: http://localhost:8080
- Swagger UI: http://localhost:8080/swagger-ui.html
- Actuator Health: http://localhost:8080/actuator/health
Clean, compile, and test in one command:
make devmake test# Format code
make format
# Run static analysis
make lintComplete build with verification:
make cimake dockerBuilds a standard Docker image with the Spring Boot JAR.
make docker-nativeBuilds a native Docker image using GraalVM for ultra-fast startup and minimal size.
make run-dockermake run-docker-nativeThe Docker images will be tagged as:
- Standard:
devstack-api-service:latest - Native:
devstack-api-service-native:latest
# Clean build artifacts
make clean
# Clean everything including Docker images
make clean-all# Show build information
make info
# Show project structure
make structureYou can still use Maven directly if needed:
# Standard build
./mvnw clean package
# Native build
./mvnw clean package -Pnative -DskipTests| Target | Description |
|---|---|
help |
Display available commands |
jar |
Build Spring Boot JAR |
native |
Build native binary with GraalVM |
docker |
Build Docker image (standard) |
docker-native |
Build Docker image (native) |
all |
Build JAR, native, and Docker images |
run-jar |
Run JAR application |
run-native |
Run native binary |
run-docker |
Run Docker container (standard) |
run-docker-native |
Run Docker container (native) |
dev |
Quick development cycle |
ci |
Full CI/CD build |
quick-start |
Build and run JAR |
test |
Run tests |
clean |
Clean build artifacts |
clean-all |
Clean everything including Docker |
format |
Format code |
lint |
Static code analysis |
info |
Show build information |
structure |
Show project structure |
Error: Java 17 or higher is required
Solution: Install Java 17+ and ensure it's in your PATH.
Error: native-image not found. Please install GraalVM and native-image
Solution: Install GraalVM and run gu install native-image.
Permission denied: ./mvnw
Solution: The Makefile automatically fixes this, but you can manually run:
chmod +x ./mvnwPort 8080 was already in use
Solution: Stop other applications using port 8080 or change the port in application.properties.
- Skip Tests for Faster Builds: Tests are automatically skipped in JAR/native builds
- Native Build Memory: Native builds require significant memory (4GB+ recommended)
- Docker Layer Caching: Docker builds reuse layers for faster subsequent builds
- Native Docker Benefits: Native Docker images start ~10x faster and use ~50% less memory
- Choose the Right Build: Use standard Docker for development, native Docker for production
devstack-api-service/
βββ Makefile # Build automation
βββ pom.xml # Parent POM
βββ mvnw # Maven wrapper
βββ core/ # Main application module
β βββ pom.xml # Core module POM
β βββ src/ # Source code
β βββ target/ # Build output
βββ docker/ # Docker configuration
βββ Dockerfile # Standard container definition
βββ Docker.native # Native container definition
- Use
make devfor development builds - Run
make formatandmake lintbefore committing - Ensure
make cipasses before submitting PRs