Skip to content
Draft
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
2 changes: 1 addition & 1 deletion .github/actions/build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ runs:

- name: Build with Maven
run: |
mvn clean install -P unit-tests -DskipIntegrationTests
./mvnw clean install -P unit-tests -DskipIntegrationTests
shell: bash

# - name: Piper Maven build
Expand Down
6 changes: 3 additions & 3 deletions .github/actions/deploy-release/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ runs:

- name: Deploy to Maven Central
run: >
mvn -B -ntp --show-version
./mvnw -B -ntp --show-version
-Dmaven.install.skip=true
-Dmaven.test.skip=true
-Dgpg.passphrase="$GPG_PASSPHRASE"
Expand All @@ -74,7 +74,7 @@ runs:
# - name: "Deploy Locally"
# run: |
# echo "Deploying artifacts locally..."
# mvn --batch-mode --no-transfer-progress --fail-at-end --show-version \
# ./mvnw --batch-mode --no-transfer-progress --fail-at-end --show-version \
# -Durl=file:./temp_local_repo \
# -Dmaven.install.skip=true \
# -Dmaven.test.skip=true \
Expand All @@ -98,7 +98,7 @@ runs:

# - name: "Deploy Staging"
# run: |
# mvn --batch-mode --no-transfer-progress --fail-at-end --show-version \
# ./mvnw --batch-mode --no-transfer-progress --fail-at-end --show-version \
# org.sonatype.plugins:nexus-staging-maven-plugin:1.6.13:deploy-staged-repository \
# -DserverId=ossrh \
# -DnexusUrl=https://oss.sonatype.org \
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/deploy/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ runs:

- name: Deploy
run: >
mvn -B -ntp --fae --show-version
./mvnw -B -ntp --fae --show-version
-DaltDeploymentRepository=${{inputs.server-id}}::default::${{inputs.repository-url}}
-Dmaven.install.skip=true
-Dmaven.test.skip=true
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/newrelease/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ runs:
run: |
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
echo $VERSION > cap-notebook/version.txt
mvn --no-transfer-progress versions:set-property -Dproperty=revision -DnewVersion=$VERSION
./mvnw --no-transfer-progress versions:set-property -Dproperty=revision -DnewVersion=$VERSION
#chmod +x ensure-license.sh
#./ensure-license.sh
git config --global user.name 'github-actions[bot]'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/blackduck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:

- name: Install dependencies
run: |
mvn clean install -P unit-tests -DskipIntegrationTests
./mvnw clean install -P unit-tests -DskipIntegrationTests

- name: Download Synopsys Detect Script
run: curl --silent -O https://detect.synopsys.com/detect9.sh
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cfdeploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
- name: Build and package 🔨
run: |
echo "🚀 Building and packaging..."
mvn clean install -P unit-tests -DskipIntegrationTests
./mvnw clean install -P unit-tests -DskipIntegrationTests
echo "✅ Build and packaging completed successfully!"

- name: Verify and Checkout Deploy Branch 🔄
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/internalArticatory.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
- name: Read current revision
id: read-revision
run: |
current_version=$(mvn -q -DforceStdout help:evaluate -Dexpression=project.version)
current_version=$(./mvnw -q -DforceStdout help:evaluate -Dexpression=project.version)
echo "Current version: $current_version"
echo "revision=$current_version" >> $GITHUB_OUTPUT
echo "updated_version=$current_version" >> $GITHUB_OUTPUT
Expand All @@ -62,7 +62,7 @@ jobs:
else
echo "Already a -SNAPSHOT version; no bump performed."
fi
updated_version=$(mvn -q -DforceStdout help:evaluate -Dexpression=project.version)
updated_version=$(./mvnw -q -DforceStdout help:evaluate -Dexpression=project.version)
echo "updated_version=$updated_version" >> $GITHUB_OUTPUT
# Manual settings.xml generation removed; using setup-java injected server credentials.

Expand All @@ -71,7 +71,7 @@ jobs:
run: |
final_version="${{ steps.bump-version.outputs.updated_version || steps.read-revision.outputs.updated_version }}"
echo "Deploying ${final_version} to Artifactory"
mvn -B -ntp -fae \
./mvnw -B -ntp -fae \
-Dmaven.install.skip=true -Dmaven.test.skip=true -DdeployAtEnd=true \
-DaltDeploymentRepository=artifactory::${{ env.ARTIFACTORY_URL }} deploy
env:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/main-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
- name: Get Revision
id: get-revision
run: |
current_version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
current_version=$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout)
echo "Current version: $current_version"
echo "REVISION=$current_version" >> $GITHUB_ENV
shell: bash
Expand Down Expand Up @@ -84,7 +84,7 @@ jobs:
echo "Current version already contains -SNAPSHOT, no update needed."
fi
# Export the updated or original version
updated_version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
updated_version=$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout)
echo "UPDATED_VERSION=$updated_version" >> $GITHUB_ENV
shell: bash

Expand All @@ -96,7 +96,7 @@ jobs:
- name: Deploy snapshot
if: ${{ endsWith(env.UPDATED_VERSION, '-SNAPSHOT') }}
run: |
mvn -B -ntp -fae -Dmaven.install.skip=true -Dmaven.test.skip=true -DdeployAtEnd=true -DaltDeploymentRepository=github::default::https://maven.pkg.github.com/cap-java/sdm deploy
./mvnw -B -ntp -fae -Dmaven.install.skip=true -Dmaven.test.skip=true -DdeployAtEnd=true -DaltDeploymentRepository=github::default::https://maven.pkg.github.com/cap-java/sdm deploy
env:
GITHUB_TOKEN: ${{ secrets.GIT_TOKEN }}
shell: bash
8 changes: 4 additions & 4 deletions .github/workflows/multi tenancy_Integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,8 @@ jobs:
EOL

echo "🎯 Running Maven integration tests"
mvn clean verify -P integration-tests -DtokenFlow=namedUser -DtenancyModel=multi -Dtenant=TENANT1 -DskipUnitTests
mvn clean verify -P integration-tests -DtokenFlow=technicalUser -DtenancyModel=multi -Dtenant=TENANT1 -DskipUnitTests
mvn clean verify -P integration-tests -DtokenFlow=namedUser -DtenancyModel=multi -Dtenant=TENANT2 -DskipUnitTests
mvn clean verify -P integration-tests -DtokenFlow=technicalUser -DtenancyModel=multi -Dtenant=TENANT2 -DskipUnitTests
./mvnw clean verify -P integration-tests -DtokenFlow=namedUser -DtenancyModel=multi -Dtenant=TENANT1 -DskipUnitTests
./mvnw clean verify -P integration-tests -DtokenFlow=technicalUser -DtenancyModel=multi -Dtenant=TENANT1 -DskipUnitTests
./mvnw clean verify -P integration-tests -DtokenFlow=namedUser -DtenancyModel=multi -Dtenant=TENANT2 -DskipUnitTests
./mvnw clean verify -P integration-tests -DtokenFlow=technicalUser -DtenancyModel=multi -Dtenant=TENANT2 -DskipUnitTests
echo "✅ Integration tests completed!"
2 changes: 1 addition & 1 deletion .github/workflows/multiTenancyDeployLocal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
- name: Build and package 📦
run: |
echo "🔨 Building and packaging..."
mvn clean install -P unit-tests -DskipIntegrationTests
./mvnw clean install -P unit-tests -DskipIntegrationTests
echo "✅ Build completed successfully!"

- name: Setup Node.js 🟢
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/multiTenant_deploy_and_Integration_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- name: Build and package 📦
run: |
echo "🔨 Building and packaging..."
mvn clean install -P unit-tests -DskipIntegrationTests
./mvnw clean install -P unit-tests -DskipIntegrationTests
echo "✅ Build completed successfully!"

- name: Setup Node.js 🟢
Expand Down Expand Up @@ -272,8 +272,8 @@ jobs:
EOL

echo "🎯 Running Maven integration tests"
mvn clean verify -P integration-tests -DtokenFlow=namedUser -DtenancyModel=multi -Dtenant=TENANT1 -DskipUnitTests
mvn clean verify -P integration-tests -DtokenFlow=technicalUser -DtenancyModel=multi -Dtenant=TENANT1 -DskipUnitTests
mvn clean verify -P integration-tests -DtokenFlow=namedUser -DtenancyModel=multi -Dtenant=TENANT2 -DskipUnitTests
mvn clean verify -P integration-tests -DtokenFlow=technicalUser -DtenancyModel=multi -Dtenant=TENANT2 -DskipUnitTests
./mvnw clean verify -P integration-tests -DtokenFlow=namedUser -DtenancyModel=multi -Dtenant=TENANT1 -DskipUnitTests
./mvnw clean verify -P integration-tests -DtokenFlow=technicalUser -DtenancyModel=multi -Dtenant=TENANT1 -DskipUnitTests
./mvnw clean verify -P integration-tests -DtokenFlow=namedUser -DtenancyModel=multi -Dtenant=TENANT2 -DskipUnitTests
./mvnw clean verify -P integration-tests -DtokenFlow=technicalUser -DtenancyModel=multi -Dtenant=TENANT2 -DskipUnitTests
echo "✅ Integration tests completed!"
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
- name: Build and package 📦
run: |
echo "🔨 Building and packaging..."
mvn clean install -P unit-tests -DskipIntegrationTests
./mvnw clean install -P unit-tests -DskipIntegrationTests
echo "✅ Build completed successfully!"

- name: Setup Node.js 🟢
Expand Down Expand Up @@ -75,8 +75,8 @@ jobs:
fi
done

echo "\nResolving effective value BEFORE override via mvn help:evaluate ..."
RESOLVED_BEFORE=$(mvn -q -DforceStdout help:evaluate -Dexpression=cds.services.version || true)
echo "\nResolving effective value BEFORE override via ./mvnw help:evaluate ..."
RESOLVED_BEFORE=$(./mvnw -q -DforceStdout help:evaluate -Dexpression=cds.services.version || true)
echo "Effective cds.services.version before override: '${RESOLVED_BEFORE}'"
if [ "${RESOLVED_BEFORE}" = "${TARGET_CDS_SERVICES_VERSION}" ]; then
echo "NOTE: Effective value already equals target; files will still be normalized to target string."
Expand All @@ -91,8 +91,8 @@ jobs:
echo "\nRaw occurrences AFTER override:"
grep -R "<cds.services.version>" $FILES || true

echo "\nResolving effective value AFTER override via mvn help:evaluate ..."
RESOLVED_AFTER=$(mvn -q -DforceStdout help:evaluate -Dexpression=cds.services.version || true)
echo "\nResolving effective value AFTER override via ./mvnw help:evaluate ..."
RESOLVED_AFTER=$(./mvnw -q -DforceStdout help:evaluate -Dexpression=cds.services.version || true)
echo "Effective cds.services.version after override: '${RESOLVED_AFTER}'"
if [ "${RESOLVED_AFTER}" != "${TARGET_CDS_SERVICES_VERSION}" ]; then
echo "WARNING: Resolved value does not match target (profiles or parent POM could be overriding it)." >&2
Expand Down Expand Up @@ -321,8 +321,8 @@ jobs:
EOL

echo "🎯 Running Maven integration tests"
mvn clean verify -P integration-tests -DtokenFlow=namedUser -DtenancyModel=multi -Dtenant=TENANT1 -DskipUnitTests
mvn clean verify -P integration-tests -DtokenFlow=technicalUser -DtenancyModel=multi -Dtenant=TENANT1 -DskipUnitTests
mvn clean verify -P integration-tests -DtokenFlow=namedUser -DtenancyModel=multi -Dtenant=TENANT2 -DskipUnitTests
mvn clean verify -P integration-tests -DtokenFlow=technicalUser -DtenancyModel=multi -Dtenant=TENANT2 -DskipUnitTests
./mvnw clean verify -P integration-tests -DtokenFlow=namedUser -DtenancyModel=multi -Dtenant=TENANT1 -DskipUnitTests
./mvnw clean verify -P integration-tests -DtokenFlow=technicalUser -DtenancyModel=multi -Dtenant=TENANT1 -DskipUnitTests
./mvnw clean verify -P integration-tests -DtokenFlow=namedUser -DtenancyModel=multi -Dtenant=TENANT2 -DskipUnitTests
./mvnw clean verify -P integration-tests -DtokenFlow=technicalUser -DtenancyModel=multi -Dtenant=TENANT2 -DskipUnitTests
echo "✅ Integration tests completed!"
39 changes: 39 additions & 0 deletions .github/workflows/sanity.check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Sanity Check

on:
push:
branches: [ "develop" ]
pull_request:
branches: [ "develop" ]
types: [opened, synchronize, reopened, auto_merge_enabled]
workflow_dispatch:
permissions:
pull-requests: read

jobs:
sanity-check:
runs-on: ubuntu-latest
strategy:
matrix:
java-version: [17]
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up JDK ${{ matrix.java-version }}
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: ${{ matrix.java-version }}

- name: Cache Maven dependencies
uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-

- name: Sanity Check
run: |
./mvnw clean rewrite:dryRun
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# - name: Consume GitHub Packages (com.sap.cds.sdm-root and com.sap.cds.sdm)
# run: |
# mvn dependency:get -Dartifact=com.sap.cds:sdm-root:LATEST -DrepoUrl=https://maven.pkg.github.com/cap-java/sdm
# mvn dependency:get -Dartifact=com.sap.cds:sdm:LATEST -DrepoUrl=https://maven.pkg.github.com/cap-java/sdm
# ./mvnw dependency:get -Dartifact=com.sap.cds:sdm-root:LATEST -DrepoUrl=https://maven.pkg.github.com/cap-java/sdm
# ./mvnw dependency:get -Dartifact=com.sap.cds:sdm:LATEST -DrepoUrl=https://maven.pkg.github.com/cap-java/sdm

- name: Prepare and Deploy to Cloud Foundry
run: |
Expand Down Expand Up @@ -207,8 +207,8 @@ jobs:
EOL
echo "🎯 Running Maven integration tests"
# Run Maven integration tests
mvn clean verify -P integration-tests -DtokenFlow=namedUser -DtenancyModel=single -DskipUnitTests || { echo "Maven tests failed for Technical User Flow"; exit 1; }
mvn clean verify -P integration-tests -DtokenFlow=technicalUser -DtenancyModel=single -DskipUnitTests || { echo "Maven tests failed for Named User Flow"; exit 1; }
./mvnw clean verify -P integration-tests -DtokenFlow=namedUser -DtenancyModel=single -DskipUnitTests || { echo "Maven tests failed for Technical User Flow"; exit 1; }
./mvnw clean verify -P integration-tests -DtokenFlow=technicalUser -DtenancyModel=single -DskipUnitTests || { echo "Maven tests failed for Named User Flow"; exit 1; }



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ jobs:
fi
done

echo "\nResolving effective value BEFORE override via mvn help:evaluate ..."
RESOLVED_BEFORE=$(mvn -q -DforceStdout help:evaluate -Dexpression=cds.services.version || true)
echo "\nResolving effective value BEFORE override via ./mvnw help:evaluate ..."
RESOLVED_BEFORE=$(./mvnw -q -DforceStdout help:evaluate -Dexpression=cds.services.version || true)
echo "Effective cds.services.version before override: '${RESOLVED_BEFORE}'"
if [ "${RESOLVED_BEFORE}" = "${TARGET_CDS_SERVICES_VERSION}" ]; then
echo "NOTE: Effective value already equals target; files will still be normalized to target string."
Expand All @@ -80,8 +80,8 @@ jobs:
echo "\nRaw occurrences AFTER override:"
grep -R "<cds.services.version>" $FILES || true

echo "\nResolving effective value AFTER override via mvn help:evaluate ..."
RESOLVED_AFTER=$(mvn -q -DforceStdout help:evaluate -Dexpression=cds.services.version || true)
echo "\nResolving effective value AFTER override via ./mvnw help:evaluate ..."
RESOLVED_AFTER=$(./mvnw -q -DforceStdout help:evaluate -Dexpression=cds.services.version || true)
echo "Effective cds.services.version after override: '${RESOLVED_AFTER}'"
if [ "${RESOLVED_AFTER}" != "${TARGET_CDS_SERVICES_VERSION}" ]; then
echo "WARNING: Resolved value does not match target (profiles or parent POM could be overriding it)." >&2
Expand Down Expand Up @@ -117,8 +117,8 @@ jobs:

# - name: Consume GitHub Packages (com.sap.cds.sdm-root and com.sap.cds.sdm)
# run: |
# mvn dependency:get -Dartifact=com.sap.cds:sdm-root:LATEST -DrepoUrl=https://maven.pkg.github.com/cap-java/sdm
# mvn dependency:get -Dartifact=com.sap.cds:sdm:LATEST -DrepoUrl=https://maven.pkg.github.com/cap-java/sdm
# ./mvnw dependency:get -Dartifact=com.sap.cds:sdm-root:LATEST -DrepoUrl=https://maven.pkg.github.com/cap-java/sdm
# ./mvnw dependency:get -Dartifact=com.sap.cds:sdm:LATEST -DrepoUrl=https://maven.pkg.github.com/cap-java/sdm

- name: Prepare and Deploy to Cloud Foundry
run: |
Expand Down Expand Up @@ -259,7 +259,7 @@ jobs:
noSDMRoleUserPassword=$noSDMRoleUserPassword
EOL
# Run Maven integration tests
mvn clean verify -P integration-tests -DtokenFlow=namedUser -DtenancyModel=single -DskipUnitTests || { echo "Maven tests failed for Technical User Flow"; exit 1; }
mvn clean verify -P integration-tests -DtokenFlow=technicalUser -DtenancyModel=single -DskipUnitTests || { echo "Maven tests failed for Named User Flow"; exit 1; }
./mvnw clean verify -P integration-tests -DtokenFlow=namedUser -DtenancyModel=single -DskipUnitTests || { echo "Maven tests failed for Technical User Flow"; exit 1; }
./mvnw clean verify -P integration-tests -DtokenFlow=technicalUser -DtenancyModel=single -DskipUnitTests || { echo "Maven tests failed for Named User Flow"; exit 1; }


4 changes: 2 additions & 2 deletions .github/workflows/singleTenant_integration_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,5 +129,5 @@ jobs:
EOL
echo "🎯 Running Maven integration tests..."
# Run Maven integration tests
mvn clean verify -P integration-tests -DtokenFlow=namedUser -DtenancyModel=single -DskipUnitTests || { echo "❌ Maven tests failed for Named User Flow"; exit 1; }
mvn clean verify -P integration-tests -DtokenFlow=technicalUser -DtenancyModel=single -DskipUnitTests || { echo "❌ Maven tests failed for Technical User Flow"; exit 1; }
./mvnw clean verify -P integration-tests -DtokenFlow=namedUser -DtenancyModel=single -DskipUnitTests || { echo "❌ Maven tests failed for Named User Flow"; exit 1; }
./mvnw clean verify -P integration-tests -DtokenFlow=technicalUser -DtenancyModel=single -DskipUnitTests || { echo "❌ Maven tests failed for Technical User Flow"; exit 1; }
2 changes: 1 addition & 1 deletion .github/workflows/sonarqube.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:

- name: Install dependencies
run: |
mvn clean install -P unit-tests -DskipIntegrationTests
./mvnw clean install -P unit-tests -DskipIntegrationTests

- name: Install SonarQube Scanner
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unit.tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:

- name: Install dependencies and run tests with coverage
run: |
mvn clean install -P unit-tests -DskipIntegrationTests
./mvnw clean install -P unit-tests -DskipIntegrationTests

- name: Upload code coverage report
uses: actions/upload-artifact@v4
Expand Down
8 changes: 6 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
sdm/target/
sdm/target/**
.flattened-pom.xml
node_modules/
.idea
/target/rewrite/**
/sdm-root.iml
/target/spotless-index

# Compiled class file
*.class
Expand Down Expand Up @@ -28,4 +32,4 @@ hs_err_pid*
replay_pid*

### Mac System File ###
*.DS_Store
*.DS_Store
3 changes: 3 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions .mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
wrapperVersion=3.3.4
distributionType=only-script
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.11/apache-maven-3.9.11-bin.zip
distributionSha256Sum=0d7125e8c91097b36edb990ea5934e6c68b4440eef4ea96510a0f6815e7eeadb
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ To use a development version of the SDM CAP plugin, follow these steps. This is
2. Install the plugin in the root folder after switiching to the branch you want to use:

```sh
mvn clean install
./mvnw clean install
```
The plugin is now added to your local .m2 repository, giving it priority over the version available in the central Maven repository during the application build.

Expand Down
Loading