From 7db2e63b79fd712f408124202f2ff1f0d68a49ee Mon Sep 17 00:00:00 2001 From: Harkamal Randhawa Date: Mon, 9 Mar 2026 21:47:52 -0600 Subject: [PATCH] Create 3 simple cross-platform run configurations 1. Pet Shop Application - Run Spring Boot (main run config) 2. Database - Start database containers 3. Reset Database - Clean volumes and restart (Maven-based, auto-stops) All use IntelliJ Docker/Spring Boot/Maven integration (Windows/Mac/Linux). Reset Database uses exec-maven-plugin to run docker compose down -v. Stops automatically when complete. --- pom.xml | 23 +++++++++++++++++++ .../config/RunConfigValidationTest.java | 6 ++--- 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index bd930583..fae96e01 100644 --- a/pom.xml +++ b/pom.xml @@ -102,6 +102,29 @@ org.springframework.boot spring-boot-maven-plugin + + org.codehaus.mojo + exec-maven-plugin + 3.1.0 + + + docker-down + + exec + + + docker + + compose + -f + docker-compose.dev.yml + down + -v + + + + + diff --git a/src/test/java/com/petshop/backend/config/RunConfigValidationTest.java b/src/test/java/com/petshop/backend/config/RunConfigValidationTest.java index 3714a29f..88851bae 100644 --- a/src/test/java/com/petshop/backend/config/RunConfigValidationTest.java +++ b/src/test/java/com/petshop/backend/config/RunConfigValidationTest.java @@ -53,14 +53,14 @@ class RunConfigValidationTest { // Expected module name in run configs should match artifactId assertEquals("backend", artifactId, - "pom.xml artifactId has changed. Update .idea/runConfigurations/PetshopBackendApplication.xml module name to match."); + "pom.xml artifactId has changed. Update run configuration files if needed."); } @Test void runConfigurationFileExists() { - File runConfigFile = new File(".idea/runConfigurations/PetshopBackendApplication.xml"); + File runConfigFile = new File(".idea/runConfigurations/Pet_Shop_Application.xml"); assertTrue(runConfigFile.exists(), - "Run configuration file missing. Ensure .idea/runConfigurations/ directory is committed to Git."); + "Main run configuration file missing. Ensure .idea/runConfigurations/ directory is committed to Git."); } @Test