Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 2 additions & 10 deletions scripts/mcp_server.cmd
Original file line number Diff line number Diff line change
@@ -1,17 +1,9 @@
@echo off
setlocal

call .\support\check_env.bat

if errorlevel 1 (
echo Environment check failed. Exiting...
exit /b 1
)

cd ..

set AGENT_APPLICATION=..
set SPRING_PROFILES_ACTIVE=web,severance

cmd /c mvn -P agent-examples-kotlin -Dmaven.test.skip=true spring-boot:run
call .\support\agent.bat

endlocal
7 changes: 3 additions & 4 deletions scripts/mcp_server.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/usr/bin/env bash

./support/check_env.sh

cd ..
export AGENT_APPLICATION=..
export SPRING_PROFILES_ACTIVE=web,severance
mvn -P agent-examples-kotlin -Dmaven.test.skip=true spring-boot:run

./support/agent.sh
9 changes: 9 additions & 0 deletions scripts/shell.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
@echo off
setlocal

set AGENT_APPLICATION=..
set SPRING_PROFILES_ACTIVE=shell,severance

call .\support\agent.bat

endlocal
6 changes: 6 additions & 0 deletions scripts/shell.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash

export AGENT_APPLICATION=..
export SPRING_PROFILES_ACTIVE=shell,severance

./support/agent.sh
12 changes: 2 additions & 10 deletions scripts/shell_docker.cmd
Original file line number Diff line number Diff line change
@@ -1,17 +1,9 @@
@echo off
setlocal

call .\support\check_env.bat

if errorlevel 1 (
echo Environment check failed. Exiting...
exit /b 1
)

cd ..

set AGENT_APPLICATION=..
set SPRING_PROFILES_ACTIVE=shell,starwars,docker-desktop

cmd /c mvn -P agent-examples-kotlin -Dmaven.test.skip=true spring-boot:run
call .\support\agent.bat

endlocal
28 changes: 0 additions & 28 deletions scripts/shell_docker.ps1

This file was deleted.

6 changes: 6 additions & 0 deletions scripts/shell_docker.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash

export AGENT_APPLICATION=..
export SPRING_PROFILES_ACTIVE=shell,starwars,docker-desktop

./support/agent.sh
24 changes: 24 additions & 0 deletions scripts/support/agent.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
@echo off
setlocal

set SCRIPT_DIR=%~dp0
set ENV_SCRIPT=%SCRIPT_DIR%check_env.bat

call %SCRIPT_DIR%\check_env.bat

if errorlevel 1 (
echo Environment check failed. Exiting...
exit /b 1
)

if not defined AGENT_APPLICATION (
echo ERROR: AGENT_APPLICATION environment variable is NOT set
echo Please set it like: set AGENT_APPLICATION=path\to\your\project
exit /b 1
)

set POM_FILE=%AGENT_APPLICATION%\pom.xml

mvn -U -f %POM_FILE% -Dmaven.test.skip=true spring-boot:run

endlocal
35 changes: 35 additions & 0 deletions scripts/support/agent.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/bin/bash

# Get the directory where this script is located
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
ENV_SCRIPT="$SCRIPT_DIR/check_env.sh"

# Call the environment check script
if [ -f "$ENV_SCRIPT" ]; then
source "$ENV_SCRIPT"
if [ $? -ne 0 ]; then
echo "Environment check failed. Exiting..."
exit 1
fi
else
echo "Warning: Environment check script not found at $ENV_SCRIPT"
fi

# Check if AGENT_APPLICATION environment variable is set
if [ -z "$AGENT_APPLICATION" ]; then
echo "ERROR: AGENT_APPLICATION environment variable is NOT set"
echo "Please set it like: export AGENT_APPLICATION=/path/to/your/project"
exit 1
fi

# Set the POM file path
POM_FILE="$AGENT_APPLICATION/pom.xml"

# Check if the POM file exists
if [ ! -f "$POM_FILE" ]; then
echo "ERROR: POM file not found at $POM_FILE"
exit 1
fi

# Run Maven Spring Boot application
mvn -U -f "$POM_FILE" -Dmaven.test.skip=true spring-boot:run
39 changes: 0 additions & 39 deletions scripts/support/check_env.ps1

This file was deleted.

16 changes: 0 additions & 16 deletions shell.cmd

This file was deleted.

26 changes: 0 additions & 26 deletions shell.ps1

This file was deleted.

6 changes: 0 additions & 6 deletions shell.sh

This file was deleted.