Skip to content

Commit 28c23b9

Browse files
Merge branch 'eclipse-sw360:main' into feat/rest_edit_obligation
2 parents 387b82d + cb52c1a commit 28c23b9

File tree

21 files changed

+622
-30
lines changed

21 files changed

+622
-30
lines changed

.github/workflows/build_and_test.yml

+1-5
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,6 @@ name: SW360 Build and Test
1515
on:
1616
pull_request:
1717
branches: [main]
18-
paths-ignore:
19-
- "**.md"
20-
- ".github/workflows/docker_deploy.yml"
21-
- ".github/workflows/scorecard.yml"
2218
workflow_dispatch:
2319

2420
env:
@@ -70,7 +66,7 @@ jobs:
7066

7167
- name: Cache Thrift
7268
id: cache-thrift
73-
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
69+
uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
7470
with:
7571
path: |
7672
${{ github.workspace }}/dist/thrift-${{ env.THRIFT_VERSION }}

.github/workflows/codeql.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ jobs:
6868

6969
# Initializes the CodeQL tools for scanning.
7070
- name: Initialize CodeQL
71-
uses: github/codeql-action/init@9e8d0789d4a0fa9ceb6b1738f7e269594bdd67f0 # v3.28.9
71+
uses: github/codeql-action/init@b56ba49b26e50535fa1e7f7db0f4f7b4bf65d80d # v3.28.10
7272
with:
7373
languages: ${{ matrix.language }}
7474
build-mode: ${{ matrix.build-mode }}
@@ -96,6 +96,6 @@ jobs:
9696
exit 1
9797
9898
- name: Perform CodeQL Analysis
99-
uses: github/codeql-action/analyze@9e8d0789d4a0fa9ceb6b1738f7e269594bdd67f0 # v3.28.9
99+
uses: github/codeql-action/analyze@b56ba49b26e50535fa1e7f7db0f4f7b4bf65d80d # v3.28.10
100100
with:
101101
category: "/language:${{matrix.language}}"

.github/workflows/docker_deploy.yml

+5-4
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,10 @@ jobs:
5151
- name: Checkout main repository
5252
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
5353

54-
- name: Set up JDK 17
54+
- name: Set up JDK 21
5555
uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 # v4.7.0
5656
with:
57-
java-version: "17"
57+
java-version: "21"
5858
cache: "maven"
5959
distribution: "temurin"
6060

@@ -82,7 +82,7 @@ jobs:
8282
cat .versions >> $GITHUB_ENV
8383
8484
- name: Build thrift image
85-
uses: heliocastro/docker-build-control@944a0451eadb63cf4f45a8ca66dba07118740faf # v5.1
85+
uses: heliocastro/docker-build-control@923d1cff454145d261107495786218d712fb4799 # v6.0
8686
with:
8787
name: thrift
8888
target: localthrift
@@ -121,6 +121,7 @@ jobs:
121121
token: ${{ secrets.GITHUB_TOKEN }}
122122
invalidate-cache: ${{ inputs.invalidate-cache }}
123123
debug: ${{ inputs.debug }}
124+
platforms: "linux/amd64,linux/arm64"
124125
build-args: |
125126
THRIFT_VERSION=${{ env.THRIFT_VERSION }}
126127
SW360_VERSION=${{ env.SHORT_SHA }}
@@ -173,7 +174,7 @@ jobs:
173174
type=ref,event=tag
174175
175176
- name: Build image
176-
uses: docker/build-push-action@ca877d9245402d1537745e0e356eab47c3520991 # v6.13.0
177+
uses: docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4 # v6.15.0
177178
with:
178179
context: .
179180
target: sw360

.github/workflows/scorecard.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -41,20 +41,20 @@ jobs:
4141
persist-credentials: false
4242

4343
- name: "Run analysis"
44-
uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # v2.4.0
44+
uses: ossf/scorecard-action@f49aabe0b5af0936a0987cfb85d86b75731b0186 # v2.4.1
4545
with:
4646
results_file: results.sarif
4747
results_format: sarif
4848
publish_results: true
4949

5050
- name: "Upload artifact"
51-
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
51+
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
5252
with:
5353
name: SARIF file
5454
path: results.sarif
5555
retention-days: 5
5656

5757
- name: "Upload to code-scanning"
58-
uses: github/codeql-action/upload-sarif@9e8d0789d4a0fa9ceb6b1738f7e269594bdd67f0 # v3.28.9
58+
uses: github/codeql-action/upload-sarif@b56ba49b26e50535fa1e7f7db0f4f7b4bf65d80d # v3.28.10
5959
with:
6060
sarif_file: results.sarif

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ COPY --from=sw360build /sw360_tomcat_webapps /sw360_tomcat_webapps
124124
# Runtime image
125125

126126
# 11-jre21-temurin-noble
127-
FROM tomcat@sha256:46e15fe7d4656cbfdabda58ea67a5ab22a0be706821fcf8b96d0a5a583b2cd47 AS sw360
127+
FROM tomcat@sha256:0530899318f06ebb42f4452717d68bb4d87cc9eb971e2e8a4404816f8f6067d9 AS sw360
128128

129129
ARG TOMCAT_DIR=/usr/local/tomcat
130130

README.md

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
2+
<img width="1280" alt="homeImage" src="https://github.com/user-attachments/assets/3c2e6712-97a7-4637-80b5-915cdd3af1e8" />
3+
<br></br>
4+
5+
16
[![Eclipse Public License 2.0](https://img.shields.io/badge/license-EPL--2.0-green.svg "Eclipse Public License 2.0")](LICENSE)
27
[![SW360 Build and Test](https://github.com/eclipse-sw360/sw360/workflows/SW360%20Build%20and%20Test/badge.svg)](https://github.com/eclipse-sw360/sw360/actions?query=workflow:"SW360+Build+and+Test")
38
[![Slack Channel](https://img.shields.io/badge/slack-sw360chat-blue.svg?longCache=true&logo=slack)](https://join.slack.com/t/sw360chat/shared_invite/enQtNzg5NDQxMTQyNjA5LThiMjBlNTRmOWI0ZjJhYjc0OTk3ODM4MjBmOGRhMWRmN2QzOGVmMzQwYzAzN2JkMmVkZTI1ZjRhNmJlNTY4ZGI)
@@ -13,8 +18,7 @@ A software component catalogue application.
1318

1419
SW360 is a Backend server with a REST API to maintain your projects / products and the software components within.
1520

16-
It can manage SPDX files for maintaining the license conditions and maintain
17-
license information.
21+
It can manage SPDX files for maintaining the license conditions and maintain license information.
1822

1923
### Introduction
2024

backend/users/src/main/java/org/eclipse/sw360/users/db/UserDatabaseHandler.java

+1
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,7 @@ public RequestSummary importFileToDB(String pathFolder) {
221221
return requestSummary;
222222
}
223223

224+
224225
public Map<String, List<String>> readFileCsv(String filePath) {
225226
Map<String, List<String>> listMap = new HashMap<>();
226227
List<String> emailCsv = new ArrayList<>();

backend/users/src/main/java/org/eclipse/sw360/users/util/ReadFileDepartmentConfig.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ protected String getPathConfig() throws IOException {
3535
String pathFile = file.getPath();
3636
String[] parts = pathFile.split("/");
3737
for (int i = 0; i < parts.length; i++) {
38-
if (!parts[i+1].contains("liferay"))
38+
if (!parts[i+1].contains("tomcat"))
3939
path.append(parts[i+1]).append("/");
4040
else {
4141
path.append(parts[i+1]).append("/");
@@ -75,9 +75,9 @@ public DepartmentConfigDTO readFileJson() {
7575
}
7676

7777
public void writePathFolderConfig(String pathFolder) {
78-
DepartmentConfigDTO configDTO = readFileJson();
7978
BufferedWriter writer = null;
8079
try {
80+
DepartmentConfigDTO configDTO = readFileJson();
8181
writer = Files.newBufferedWriter(Paths.get(getPathConfig()));
8282
Map<String, Object> config = new HashMap<>();
8383
Map<String, Object> map = new HashMap<>();
@@ -125,4 +125,4 @@ public void writeLastRunningTimeConfig(String lastRunningTime) {
125125
}
126126
}
127127
}
128-
}
128+
}

libraries/datahandler/src/main/java/org/eclipse/sw360/datahandler/common/SW360Constants.java

+4
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,10 @@ public class SW360Constants {
134134
public static final String PROJECTS = "projects";
135135
public static final String LICENSES = "licenses";
136136
public static final String PROJECT_RELEASE_SPREADSHEET_WITH_ECCINFO = "projectReleaseSpreadSheetWithEcc";
137+
public static final String IMPORT_DEPARTMENT_MANUALLY = "importdepartmentmanually";
138+
public static final String ADD_LIST_EMAIL = "listEmail";
139+
public static final String DEPARTMENT_KEY = "departmentKey";
140+
public static final String DELETE_LIST_EMAIL = "deleteEmail";
137141

138142
/**
139143
* Hashmap containing the name field for each type.

pom.xml

+4-4
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@
108108
<commons-lang3.version>3.17.0</commons-lang3.version>
109109
<commons-text.version>1.13.0</commons-text.version>
110110
<dom4j.version>2.1.4</dom4j.version>
111-
<equalsverifier.version>3.18</equalsverifier.version>
111+
<equalsverifier.version>3.19.1</equalsverifier.version>
112112
<failureaccess.version>1.0.2</failureaccess.version>
113113
<findbugs-annotations.version>1.3.9-1</findbugs-annotations.version>
114114
<glassfish-jaxb.version>4.0.5</glassfish-jaxb.version>
@@ -151,16 +151,16 @@
151151
<spring-restdocs.version>3.0.1</spring-restdocs.version>
152152
<spring-security-jwt.version>1.1.1.RELEASE</spring-security-jwt.version>
153153
<spring-security-oauth2-authorization-server.version>1.4.1</spring-security-oauth2-authorization-server.version>
154-
<spring-security.version>6.4.2</spring-security.version>
154+
<spring-security.version>6.4.3</spring-security.version>
155155
<springdoc-openapi-stater-common.version>2.8.4</springdoc-openapi-stater-common.version>
156-
<springframework.version>6.2.2</springframework.version>
156+
<springframework.version>6.2.3</springframework.version>
157157
<thrift.version>0.20.0</thrift.version>
158158
<tika.version>1.28.5</tika.version>
159159
<wiremock.version>3.12.0</wiremock.version>
160160
<version.hibernate.javax.persistence>1.0.0.Final</version.hibernate.javax.persistence>
161161
<arquillian-graphene.version>2.5.4</arquillian-graphene.version>
162162
<version.jee.jaxb.api>2.3.1</version.jee.jaxb.api>
163-
<keycloak.version>26.1.1</keycloak.version>
163+
<keycloak.version>26.1.3</keycloak.version>
164164
<spring.security.crypto>6.3.3</spring.security.crypto>
165165
<org.owasp.encoder.version>1.3.1</org.owasp.encoder.version>
166166
</properties>

rest/resource-server/src/docs/asciidoc/api-guide.adoc

+1
Original file line numberDiff line numberDiff line change
@@ -312,3 +312,4 @@ include::importExport.adoc[]
312312
include::attachmentCleanUp.adoc[]
313313
include::databaseSanitation.adoc[]
314314
include::importExport.adoc[]
315+
include::department.adoc[]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
//
2+
// Copyright Siemens AG, 2025. Part of the SW360 Portal Project.
3+
//
4+
// This program and the accompanying materials are made
5+
// available under the terms of the Eclipse Public License 2.0
6+
// which is available at https://www.eclipse.org/legal/epl-2.0/
7+
//
8+
// SPDX-License-Identifier: EPL-2.0
9+
// SPDX-FileCopyrightText: 2025, Siemens AG. Part of the SW360 Portal Project.
10+
// SPDX-FileContributor: Nikesh kumar <[email protected]>
11+
//
12+
13+
[[resources-department]]
14+
=== Department
15+
16+
The department resource is used to upload a department and its members.
17+
18+
[[manually-active]]
19+
==== Manually Activating Department Import
20+
21+
A `GET` request is used to import department data.
22+
23+
===== Example Request
24+
include::{snippets}/should_document_import_department_manually/curl-request.adoc[]
25+
26+
===== Example Response
27+
include::{snippets}/should_document_import_department_manually/http-response.adoc[]
28+
29+
[[schedule-department]]
30+
==== Import Schedule Department.
31+
32+
A `POST` request is used to import schedule department.
33+
34+
===== Example Request
35+
include::{snippets}/should_document_import_schedule_department/curl-request.adoc[]
36+
37+
===== Example Response
38+
include::{snippets}/should_document_import_schedule_department/http-response.adoc[]
39+
40+
[[cancel-department]]
41+
==== Cancel Schedule Department.
42+
43+
A `POST` request is used to cancel import schedule department.
44+
45+
===== Example Request
46+
include::{snippets}/should_document_cancel_import_schedule_department/curl-request.adoc[]
47+
48+
===== Example Response
49+
include::{snippets}/should_document_cancel_import_schedule_department/http-response.adoc[]
50+
51+
[[update-folder-path]]
52+
==== Update Folder Path.
53+
54+
A POST request is used to update the folder path in the department.
55+
56+
===== Example Request
57+
include::{snippets}/should_document_update_folder_path/curl-request.adoc[]
58+
59+
===== Example Response
60+
include::{snippets}/should_document_update_folder_path/http-response.adoc[]

rest/resource-server/src/docs/asciidoc/vendors.adoc

+14
Original file line numberDiff line numberDiff line change
@@ -118,3 +118,17 @@ include::{snippets}/should_document_get_export_vendor/curl-request.adoc[]
118118

119119
===== Example response
120120
include::{snippets}/should_document_get_export_vendor/http-response.adoc[]
121+
122+
[[resources-vendor-merge]]
123+
==== Merge vendors
124+
125+
A `PATCH` request will merge the source vendor with the target vendor.
126+
127+
===== Request structure
128+
include::{snippets}/should_document_merge_vendor/request-fields.adoc[]
129+
130+
===== Example request
131+
include::{snippets}/should_document_merge_vendor/curl-request.adoc[]
132+
133+
===== Example response
134+
include::{snippets}/should_document_merge_vendor/http-response.adoc[]

0 commit comments

Comments
 (0)