Skip to content

Commit 43dc447

Browse files
committed
fix(ci): build CodeQL analysis through package phase
iban-commons-junit depends on the iban-commons test-jar classifier, which the maven-jar-plugin only attaches during the package phase. The CodeQL build stopped at compile with tests skipped entirely, so the test-jar was never produced and the reactor build failed with a dependency resolution error. Build through package with -DskipTests instead, which still compiles the test sources.
1 parent 492c6dc commit 43dc447

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

.github/workflows/codeql.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,16 @@ jobs:
4444
languages: java-kotlin
4545
build-mode: manual
4646

47-
# Skip checkstyle/tests here: this build only needs to produce compiled
48-
# classes for CodeQL to analyze, not to enforce project lint rules.
47+
# Build up to package (not just compile): iban-commons-junit depends on
48+
# the iban-commons test-jar, which is only attached in the package phase.
49+
# Skip checkstyle and running the tests, but still compile them so the
50+
# test-jar gets built.
4951
- name: Build for CodeQL analysis
5052
run: >
5153
mvn --batch-mode --file pom.xml
5254
-Dcheckstyle.skip=true
53-
-Dmaven.test.skip=true
54-
clean compile
55+
-DskipTests
56+
clean package
5557
5658
- name: Perform CodeQL Analysis
5759
uses: github/codeql-action/analyze@v4

0 commit comments

Comments
 (0)