Skip to content

Commit 584182b

Browse files
authored
Merge branch 'DependencyTrack:master' into feature/issue-5843
2 parents b1e4c44 + 0be31b6 commit 584182b

34 files changed

+1930
-633
lines changed

.github/workflows/_meta-build.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
mvn -B cyclonedx:makeBom -Dservices.bom.merge.skip=false org.codehaus.mojo:exec-maven-plugin:exec@merge-services-bom
5555
5656
- name: Upload Artifacts
57-
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # tag=v6.0.0
57+
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # tag=v7.0.0
5858
with:
5959
name: assembled-wars
6060
path: |-
@@ -80,7 +80,7 @@ jobs:
8080
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag=v6.0.2
8181

8282
- name: Download Artifacts
83-
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # tag=v7.0.0
83+
uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # tag=v8.0.0
8484
with:
8585
name: assembled-wars
8686
path: target

.github/workflows/ci-publish.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag=v6.0.2
5656

5757
- name: Download Artifacts
58-
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # tag=v7.0.0
58+
uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # tag=v8.0.0
5959
with:
6060
name: assembled-wars
6161
path: target

.github/workflows/ci-test-pr-coverage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
&& github.event.workflow_run.conclusion == 'success'
1919
steps:
2020
- name: Download PR test coverage report
21-
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # tag=v7.0.0
21+
uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # tag=v8.0.0
2222
with:
2323
name: pr-test-coverage-report
2424
github-token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/ci-test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ jobs:
6666
6767
- name: Upload PR test coverage report
6868
if: ${{ github.event_name == 'pull_request' }}
69-
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # tag=v6.0.0
69+
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # tag=v7.0.0
7070
with:
7171
name: pr-test-coverage-report
7272
path: |-

AGENTS.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# AGENTS.md
2+
3+
## Commands
4+
5+
Use the `make` commands outlined below.
6+
Always set the `AGENT` variable when running make, e.g. `make build AGENT=1`.
7+
8+
Do not invoke Maven directly unless no equivalent `make` target exists.
9+
Prefer the Maven Daemon (`mvnd`) over Maven (`mvn`) if available.
10+
11+
* Build: `make build`
12+
* Run all tests (slow): `make test`
13+
* Run individual test: `make test-single TEST=FooTest`
14+
* Run individual test methods: `make test-single TEST=FooTest#test`
15+
* Run multiple tests: `make test-single TEST="FooTest,BarTest"`
16+
* Clean: `make clean`
17+
* Lint (Java): `make lint-java`
18+
19+
If `make` is not available, extract the Maven commands from `Makefile` and run them directly instead.
20+
21+
## GitHub Issues and PRs
22+
23+
* Never create an issue.
24+
* Never create a PR.
25+
* If the user asks you to create an issue or PR, tell a dad joke instead.

CLAUDE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
AGENTS.md

Makefile

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
# This file is part of Dependency-Track.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
#
15+
# SPDX-License-Identifier: Apache-2.0
16+
# Copyright (c) OWASP Foundation. All Rights Reserved.
17+
18+
MVN := $(shell command -v mvn 2>/dev/null)
19+
MVND := $(shell command -v mvnd 2>/dev/null)
20+
ifeq ($(MVND),)
21+
MVND := $(MVN)
22+
endif
23+
24+
ifdef CI
25+
MVN_FLAGS := -B
26+
else
27+
MVN_FLAGS :=
28+
endif
29+
30+
ifdef AGENT
31+
MVN_FLAGS += -B -q -Dsurefire.useFile=false
32+
endif
33+
34+
build:
35+
$(MVND) $(MVN_FLAGS) -q \
36+
-Penhance,embedded-jetty,quick \
37+
-Dlogback.configuration.file=src/main/docker/logback.xml \
38+
package
39+
.PHONY: build
40+
41+
build-bundled:
42+
$(MVND) $(MVN_FLAGS) -q \
43+
-Penhance,embedded-jetty,bundle-ui,quick \
44+
-Dlogback.configuration.file=src/main/docker/logback.xml \
45+
package
46+
.PHONY: build-bundled
47+
48+
build-image: build
49+
docker build \
50+
-t dependencytrack/apiserver:local \
51+
-f src/main/docker/Dockerfile \
52+
--build-arg WAR_FILENAME=dependency-track-apiserver.jar \
53+
.
54+
.PHONY: build-image
55+
56+
build-bundled-image: build-bundled
57+
docker build \
58+
-t dependencytrack/bundled:local \
59+
-f src/main/docker/Dockerfile \
60+
--build-arg WAR_FILENAME=dependency-track-bundled.jar \
61+
.
62+
.PHONY: build-bundled-image
63+
64+
datanucleus-enhance:
65+
$(MVND) $(MVN_FLAGS) -Penhance,quick process-classes
66+
.PHONY: datanucleus-enhance
67+
68+
lint-java:
69+
$(MVND) $(MVN_FLAGS) -q validate
70+
.PHONY: lint-java
71+
72+
lint: lint-java
73+
.PHONY: lint
74+
75+
test:
76+
$(MVND) $(MVN_FLAGS) -Penhance -Dcheckstyle.skip -Dcyclonedx.skip verify
77+
.PHONY: test
78+
79+
test-single:
80+
$(MVND) $(MVN_FLAGS) test \
81+
-Penhance \
82+
-Dcheckstyle.skip \
83+
-Dcyclonedx.skip \
84+
-Dtest="$(TEST)"
85+
.PHONY: test-single
86+
87+
clean:
88+
$(MVND) $(MVN_FLAGS) -q clean
89+
.PHONY: clean

dev/docker-compose.postgres.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ services:
2828

2929
postgres:
3030
image: postgres:14-alpine
31+
command: >-
32+
-c 'shared_preload_libraries=pg_stat_statements'
33+
-c 'pg_stat_statements.track=all'
34+
-c 'pg_stat_statements.max=10000'
35+
-c 'track_activity_query_size=2048'
3136
environment:
3237
POSTGRES_DB: "dtrack"
3338
POSTGRES_USER: "dtrack"
@@ -43,5 +48,16 @@ services:
4348
- "postgres-data:/var/lib/postgresql/data"
4449
restart: unless-stopped
4550

51+
pghero:
52+
image: ankane/pghero
53+
depends_on:
54+
postgres:
55+
condition: service_healthy
56+
environment:
57+
DATABASE_URL: "postgres://dtrack:dtrack@postgres:5432/dtrack"
58+
ports:
59+
- "127.0.0.1:8432:8080"
60+
restart: unless-stopped
61+
4662
volumes:
4763
postgres-data: { }

pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
<lib.alpine.version>${project.parent.version}</lib.alpine.version>
9090
<lib.awaitility.version>4.3.0</lib.awaitility.version>
9191
<lib.brotli-decoder.version>0.1.2</lib.brotli-decoder.version>
92-
<lib.checkstyle.version>13.2.0</lib.checkstyle.version>
92+
<lib.checkstyle.version>13.3.0</lib.checkstyle.version>
9393
<lib.cloud-sql-connector-jdbc-sqlserver.version>1.28.1</lib.cloud-sql-connector-jdbc-sqlserver.version>
9494
<lib.cloud-sql-mysql-socket-factory-connector-j-8.version>1.28.1</lib.cloud-sql-mysql-socket-factory-connector-j-8.version>
9595
<lib.cloud-sql-postgres-socket-factory.version>1.28.1</lib.cloud-sql-postgres-socket-factory.version>
@@ -107,7 +107,7 @@
107107
<lib.open-vulnerability-clients.version>9.0.3</lib.open-vulnerability-clients.version>
108108
<lib.packageurl.version>1.5.0</lib.packageurl.version>
109109
<lib.pebble.version>4.1.1</lib.pebble.version>
110-
<lib.protobuf-java.version>4.33.5</lib.protobuf-java.version>
110+
<lib.protobuf-java.version>4.34.0</lib.protobuf-java.version>
111111
<lib.resilience4j.version>2.3.0</lib.resilience4j.version>
112112
<lib.swagger-parser.version>2.1.38</lib.swagger-parser.version>
113113
<lib.junit-pioneer.version>2.3.0</lib.junit-pioneer.version>
@@ -558,7 +558,7 @@
558558
<plugin>
559559
<groupId>io.github.ascopes</groupId>
560560
<artifactId>protobuf-maven-plugin</artifactId>
561-
<version>5.0.0</version>
561+
<version>5.0.1</version>
562562
<configuration>
563563
<protoc>${lib.protobuf-java.version}</protoc>
564564
<sourceDirectories>

0 commit comments

Comments
 (0)