Skip to content

Commit 79109dc

Browse files
committed
feat(build): improve dependency graph generation and CI integration
1 parent ebbb39b commit 79109dc

File tree

3 files changed

+44
-15
lines changed

3 files changed

+44
-15
lines changed

.github/workflows/maven.yml

+29-5
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,42 @@ on:
99
jobs:
1010
build:
1111
runs-on: ubuntu-latest
12+
1213
steps:
13-
- uses: actions/checkout@v4
14+
# Checkout the code
15+
- name: Checkout repository
16+
uses: actions/checkout@v4
17+
18+
# Set up JDK 21
1419
- name: Set up JDK 21
1520
uses: actions/setup-java@v4
1621
with:
1722
java-version: '21'
1823
distribution: 'temurin'
1924
cache: maven
25+
26+
# Build all modules
2027
- name: Build all modules
2128
run: mvn -B package
22-
- name: Generate dependency graph
23-
run: mvn com.github.ferstl:depgraph-maven-plugin:graph
24-
- name: Update dependency graph
25-
uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6
2629

30+
# Generate dependency graph in JSON format
31+
- name: Generate dependency graph in JSON
32+
run: mvn com.github.ferstl:depgraph-maven-plugin:aggregate -DoutputFormat=json
33+
34+
# Debug JSON Dependency Graph
35+
- name: Debug JSON Dependency Graph
36+
run: cat target/dependency-graph.json || echo "Dependency graph is empty"
37+
38+
# List target directory for debugging
39+
- name: List target directory
40+
run: ls -la target
41+
42+
# Submit dependencies to GitHub Advanced Security
43+
- name: Submit dependency graph
44+
uses: advanced-security/maven-dependency-submission-action@v1
45+
with:
46+
dependency-graph-path: target/dependency-graph.json
47+
48+
# Debug Environment Variables
49+
- name: Debug Environment
50+
run: env

pom.xml

+15-1
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,26 @@
4545
</plugin>
4646
</plugins>
4747
</pluginManagement>
48-
48+
4949
<plugins>
5050
<plugin>
5151
<groupId>com.github.ferstl</groupId>
5252
<artifactId>depgraph-maven-plugin</artifactId>
5353
<version>4.0.3</version>
54+
<executions>
55+
<execution>
56+
<goals>
57+
<goal>aggregate</goal>
58+
</goals>
59+
</execution>
60+
</executions>
61+
<configuration>
62+
<scope>compile</scope>
63+
<includeParentProjects>true</includeParentProjects>
64+
<includes>
65+
<include>com.jep:*</include>
66+
</includes>
67+
</configuration>
5468
</plugin>
5569
</plugins>
5670
</build>

target/dependency-graph.dot

-9
This file was deleted.

0 commit comments

Comments
 (0)