Skip to content

Commit be3ec96

Browse files
devonfw#103: some fixes
fixed pom versions applied reformat
1 parent 2862e6b commit be3ec96

File tree

4 files changed

+65
-35
lines changed

4 files changed

+65
-35
lines changed

cli/pom.xml

-2
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,10 @@
5858
<dependency>
5959
<groupId>org.slf4j</groupId>
6060
<artifactId>slf4j-api</artifactId>
61-
<version>2.0.3</version>
6261
</dependency>
6362
<dependency>
6463
<groupId>ch.qos.logback</groupId>
6564
<artifactId>logback-classic</artifactId>
66-
<version>1.4.7</version>
6765
</dependency>
6866
<!-- Needed for WireMock test support -->
6967
<dependency>

pom.xml

+17
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,32 @@
2020
<github.repository>IDEasy</github.repository>
2121
<ide_version>${revision}</ide_version>
2222
<owasp.version>9.0.9</owasp.version>
23+
<slf4j.version>2.0.3</slf4j.version>
24+
<logback.version>1.4.7</logback.version>
2325
</properties>
2426

2527
<dependencyManagement>
2628
<dependencies>
29+
<dependency>
30+
<groupId>org.slf4j</groupId>
31+
<artifactId>slf4j-api</artifactId>
32+
<version>${slf4j.version}</version>
33+
</dependency>
34+
<dependency>
35+
<groupId>ch.qos.logback</groupId>
36+
<artifactId>logback-classic</artifactId>
37+
<version>${logback.version}</version>
38+
</dependency>
2739
<dependency>
2840
<groupId>org.owasp</groupId>
2941
<artifactId>dependency-check-core</artifactId>
3042
<version>${owasp.version}</version>
3143
</dependency>
44+
<dependency>
45+
<groupId>com.devonfw.tools.IDEasy</groupId>
46+
<artifactId>ide-cli</artifactId>
47+
<version>${revision}</version>
48+
</dependency>
3249
</dependencies>
3350
</dependencyManagement>
3451

security/pom.xml

+32-19
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,38 @@
22
<project xmlns="http://maven.apache.org/POM/4.0.0"
33
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
44
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5-
<modelVersion>4.0.0</modelVersion>
6-
<parent>
7-
<groupId>com.devonfw.tools.IDEasy.dev</groupId>
8-
<artifactId>ide</artifactId>
9-
<version>dev-SNAPSHOT</version>
10-
</parent>
11-
12-
<artifactId>ide-security</artifactId>
5+
<modelVersion>4.0.0</modelVersion>
6+
<parent>
7+
<groupId>com.devonfw.tools.IDEasy.dev</groupId>
8+
<artifactId>ide</artifactId>
9+
<version>dev-SNAPSHOT</version>
10+
</parent>
1311

14-
<dependencies>
15-
<!-- Other configurations and properties -->
16-
<dependency>
17-
<groupId>org.owasp</groupId>
18-
<artifactId>dependency-check-core</artifactId>
19-
</dependency>
20-
<dependency>
21-
<groupId>com.devonfw.tools.IDEasy</groupId>
22-
<artifactId>ide-cli</artifactId>
23-
</dependency>
24-
</dependencies>
12+
<artifactId>ide-security</artifactId>
13+
14+
<properties>
15+
<java.version>17</java.version>
16+
</properties>
17+
18+
<dependencies>
19+
<!-- Other configurations and properties -->
20+
<dependency>
21+
<groupId>org.slf4j</groupId>
22+
<artifactId>slf4j-api</artifactId>
23+
</dependency>
24+
<dependency>
25+
<groupId>ch.qos.logback</groupId>
26+
<artifactId>logback-classic</artifactId>
27+
</dependency>
28+
<dependency>
29+
<groupId>org.owasp</groupId>
30+
<artifactId>dependency-check-core</artifactId>
31+
</dependency>
32+
<dependency>
33+
<groupId>com.devonfw.tools.IDEasy</groupId>
34+
<artifactId>ide-cli</artifactId>
35+
<scope>compile</scope>
36+
</dependency>
37+
</dependencies>
2538

2639
</project>

security/src/main/java/com/devonfw/tools/security/BuildSecurityJsonFiles.java

+16-14
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,6 @@
1212
import java.util.Set;
1313
import java.util.stream.Collectors;
1414

15-
import com.devonfw.tools.ide.context.AbstractIdeContext;
16-
import com.devonfw.tools.ide.context.IdeContext;
17-
import com.devonfw.tools.ide.context.IdeContextConsole;
18-
import com.devonfw.tools.ide.log.IdeLogLevel;
19-
import com.devonfw.tools.ide.url.model.file.UrlSecurityJsonFile;
20-
import com.devonfw.tools.ide.url.model.file.json.UrlSecurityWarning;
21-
import com.devonfw.tools.ide.url.model.folder.UrlVersion;
22-
import com.devonfw.tools.ide.url.updater.AbstractUrlUpdater;
23-
import com.devonfw.tools.ide.url.updater.UpdateManager;
24-
import com.devonfw.tools.ide.util.MapUtil;
25-
import com.devonfw.tools.ide.version.BoundaryType;
26-
import com.devonfw.tools.ide.version.VersionIdentifier;
27-
import com.devonfw.tools.ide.version.VersionRange;
2815
import org.owasp.dependencycheck.Engine;
2916
import org.owasp.dependencycheck.analyzer.AbstractAnalyzer;
3017
import org.owasp.dependencycheck.analyzer.AnalysisPhase;
@@ -55,6 +42,20 @@
5542
import org.owasp.dependencycheck.utils.Pair;
5643
import org.owasp.dependencycheck.utils.Settings;
5744

45+
import com.devonfw.tools.ide.context.AbstractIdeContext;
46+
import com.devonfw.tools.ide.context.IdeContext;
47+
import com.devonfw.tools.ide.context.IdeContextConsole;
48+
import com.devonfw.tools.ide.log.IdeLogLevel;
49+
import com.devonfw.tools.ide.url.model.file.UrlSecurityJsonFile;
50+
import com.devonfw.tools.ide.url.model.file.json.UrlSecurityWarning;
51+
import com.devonfw.tools.ide.url.model.folder.UrlVersion;
52+
import com.devonfw.tools.ide.url.updater.AbstractUrlUpdater;
53+
import com.devonfw.tools.ide.url.updater.UpdateManager;
54+
import com.devonfw.tools.ide.util.MapUtil;
55+
import com.devonfw.tools.ide.version.BoundaryType;
56+
import com.devonfw.tools.ide.version.VersionIdentifier;
57+
import com.devonfw.tools.ide.version.VersionRange;
58+
5859
/**
5960
* This class is used to build the {@link UrlSecurityJsonFile} files for IDEasy. It scans the
6061
* {@link AbstractIdeContext#getUrlsPath() ide-url} folder for all tools, editions and versions and checks for
@@ -85,6 +86,7 @@ public class BuildSecurityJsonFiles {
8586
private static BigDecimal minV3Severity = new BigDecimal("0.0");
8687

8788
private static final Set<String> actuallyIgnoredCves = new HashSet<>();
89+
8890
private static final IdeContext context = new IdeContextConsole(IdeLogLevel.INFO, null, false);;
8991

9092
/**
@@ -342,7 +344,7 @@ private static String getUrlVersion(String cpeVersion, Map<String, String> cpeTo
342344

343345
String urlVersion = null;
344346
if (cpeVersion != null) {
345-
if (cpeToUrlVersion!= null && cpeToUrlVersion.containsKey(cpeVersion)) {
347+
if (cpeToUrlVersion != null && cpeToUrlVersion.containsKey(cpeVersion)) {
346348
urlVersion = cpeToUrlVersion.get(cpeVersion);
347349
} else {
348350
urlVersion = urlUpdater.mapCpeVersionToUrlVersion(cpeVersion);

0 commit comments

Comments
 (0)