fix: Resolve mvn command not found error in CI workflow

- Replace 'mvn' commands with './mvnw' in CI workflow
- Add chmod +x ./mvnw step to make Maven wrapper executable
- Add cache: maven to Java setup step for better caching
- Update troubleshooting scripts to use correct port 40047
- Update documentation to reflect port change

This fixes the 'mvn: command not found' error by ensuring
all Maven commands use the Maven wrapper (mvnw) which is
included in the project and doesn't require Maven to be
pre-installed on the runner.
This commit is contained in:
GSRN
2025-09-15 17:16:13 +02:00
parent e787aa64a3
commit 8c9ffb50ce
4 changed files with 15 additions and 11 deletions

View File

@@ -27,6 +27,10 @@ jobs:
with:
java-version: '17'
distribution: 'temurin'
cache: maven
- name: Make Maven wrapper executable
run: chmod +x ./mvnw
- name: Cache Maven dependencies
uses: actions/cache@v4
@@ -37,13 +41,13 @@ jobs:
fail-on-cache-miss: false
- name: Run tests
run: mvn test
run: ./mvnw test
- name: Run code quality checks
run: mvn spotbugs:check checkstyle:check
run: ./mvnw spotbugs:check checkstyle:check
- name: Build application
run: mvn clean package -DskipTests
run: ./mvnw clean package -DskipTests
- name: Build Docker image (test only)
run: docker build -t api-gateway:test .