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
4 changes: 2 additions & 2 deletions .github/workflows/snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
- name: Log tool versions
run: |
java --version
mvn --version
./mvnw --version

- name: Cache Maven dependencies
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
Expand All @@ -66,7 +66,7 @@ jobs:

- name: Build p2 update site
run: |
xvfb-run mvn clean verify \
xvfb-run ./mvnw clean verify \
checkstyle:check pmd:pmd pmd:cpd pmd:check pmd:cpd-check spotbugs:check \
-f ./ddk-parent/pom.xml \
--batch-mode --fail-at-end
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- name: Set up Workspace Environment Variable
run: echo "WORKSPACE=${{ github.workspace }}" >> $GITHUB_ENV
- name: PMD Check
run: mvn pmd:pmd pmd:cpd pmd:check pmd:cpd-check -f ./ddk-parent/pom.xml --batch-mode --fail-at-end
run: ./mvnw pmd:pmd pmd:cpd pmd:check pmd:cpd-check -f ./ddk-parent/pom.xml --batch-mode --fail-at-end
checkstyle:
runs-on: ubuntu-24.04
steps:
Expand All @@ -25,7 +25,7 @@ jobs:
- name: Set up Workspace Environment Variable
run: echo "WORKSPACE=${{ github.workspace }}" >> $GITHUB_ENV
- name: Checkstyle Check
run: mvn checkstyle:checkstyle checkstyle:check -f ./ddk-parent/pom.xml --batch-mode --fail-at-end
run: ./mvnw checkstyle:checkstyle checkstyle:check -f ./ddk-parent/pom.xml --batch-mode --fail-at-end
line-endings:
runs-on: ubuntu-24.04
steps:
Expand All @@ -49,7 +49,7 @@ jobs:
distribution: 'temurin'
java-version: '21'
- name: Log Maven version
run: mvn --version
run: ./mvnw --version
- name: Set up Workspace Environment Variable
run: echo "WORKSPACE=${{ github.workspace }}" >> $GITHUB_ENV
- name: Restore Maven dependency cache
Expand All @@ -76,7 +76,7 @@ jobs:
- name: Build with Maven within a virtual X Server Environment
# Run pmd:pmd and pmd:cpd first to generate reports for all modules, then run pmd:check and pmd:cpd-check
# This ensures all violations are collected and reported before the build fails
run: xvfb-run mvn clean verify checkstyle:check pmd:pmd pmd:cpd pmd:check pmd:cpd-check spotbugs:check -f ./ddk-parent/pom.xml --batch-mode --fail-at-end
run: xvfb-run ./mvnw clean verify checkstyle:check pmd:pmd pmd:cpd pmd:check pmd:cpd-check spotbugs:check -f ./ddk-parent/pom.xml --batch-mode --fail-at-end
- name: Fail on missing surefire reports
if: always()
run: bash .github/scripts/check-surefire-reports.sh
Expand Down
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.16/apache-maven-3.9.16-bin.zip
distributionSha256Sum=5af3b743dd8b876b5c45da33b676251e5f1687712644abb4ee519ca56e1d89ce
20 changes: 11 additions & 9 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,23 @@ This creates a local mirror of `.agents/skills/` at `.claude/skills/` (gitignore

## Build Commands

Use the Maven Wrapper (`./mvnw`, or `mvnw.cmd` on Windows). It pins Maven 3.9.x: Maven 3.10 cannot build this project yet (eclipse-tycho/tycho#6399).

```bash
# Full CI build (Linux - requires xvfb for UI tests)
xvfb-run mvn clean verify checkstyle:check pmd:pmd pmd:cpd pmd:check pmd:cpd-check spotbugs:check -f ./ddk-parent/pom.xml --batch-mode --fail-at-end
xvfb-run ./mvnw clean verify checkstyle:check pmd:pmd pmd:cpd pmd:check pmd:cpd-check spotbugs:check -f ./ddk-parent/pom.xml --batch-mode --fail-at-end

# Windows build
mvn clean verify -f ./ddk-parent/pom.xml
mvnw.cmd clean verify -f ./ddk-parent/pom.xml

# Quick build without tests
mvn clean verify -f ./ddk-parent/pom.xml -DskipTests
./mvnw clean verify -f ./ddk-parent/pom.xml -DskipTests

# Build specific module
mvn clean verify -f ./ddk-parent/pom.xml -pl :com.avaloq.tools.ddk.xtext
./mvnw clean verify -f ./ddk-parent/pom.xml -pl :com.avaloq.tools.ddk.xtext

# Run only quality checks (after initial build)
mvn checkstyle:check pmd:check spotbugs:check -f ./ddk-parent/pom.xml
./mvnw checkstyle:check pmd:check spotbugs:check -f ./ddk-parent/pom.xml
```

## Quality Tools
Expand Down Expand Up @@ -122,19 +124,19 @@ These directories contain generated code - do not edit manually:
### Fixing PMD Violations
1. Check ruleset at `ddk-configuration/pmd/ruleset.xml`
2. Violations in generated code (`src-gen/`) are excluded
3. Run `mvn pmd:check -f ./ddk-parent/pom.xml` to verify fixes
3. Run `./mvnw pmd:check -f ./ddk-parent/pom.xml` to verify fixes

### Fixing Checkstyle Violations
1. Check config at `ddk-configuration/checkstyle/avaloq.xml`
2. Run `mvn checkstyle:check -f ./ddk-parent/pom.xml` to verify fixes
2. Run `./mvnw checkstyle:check -f ./ddk-parent/pom.xml` to verify fixes

### Running Specific Tests
```bash
# Run tests for a specific module
mvn verify -f ./ddk-parent/pom.xml -pl :com.avaloq.tools.ddk.xtext.test
./mvnw verify -f ./ddk-parent/pom.xml -pl :com.avaloq.tools.ddk.xtext.test

# On Linux, wrap with xvfb for UI tests
xvfb-run mvn verify -f ./ddk-parent/pom.xml -pl :com.avaloq.tools.ddk.xtext.test
xvfb-run ./mvnw verify -f ./ddk-parent/pom.xml -pl :com.avaloq.tools.ddk.xtext.test
```

## CI/CD
Expand Down
5 changes: 3 additions & 2 deletions ddk-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
<test.timeout>1800</test.timeout>
<test.testClass>com.avaloq.tools.ddk.xtext.AllTests</test.testClass>

<!-- maven enforced version -->
<maven-enforcer-rule.version>[3.9.0,4)</maven-enforcer-rule.version>
<!-- maven enforced version: Maven 3.10 rejects the nested-jar dependencies Tycho injects (eclipse-tycho/tycho#6399) -->
<maven-enforcer-rule.version>[3.9.0,3.10)</maven-enforcer-rule.version>

<!-- maven plugin versions -->
<checkstyle.plugin.version>3.6.0</checkstyle.plugin.version>
Expand Down Expand Up @@ -157,6 +157,7 @@
<rules>
<requireMavenVersion>
<version>${maven-enforcer-rule.version}</version>
<message>Build with ./mvnw: Maven 3.10 cannot resolve bundles with nested jars yet (eclipse-tycho/tycho#6399).</message>
</requireMavenVersion>
</rules>
</configuration>
Expand Down
Loading