Skip to content

Commit 04ff345

Browse files
committed
Remove SBOM parsing from RebuiltDownloadCommand.
1 parent 265cb55 commit 04ff345

File tree

3 files changed

+0
-39
lines changed

3 files changed

+0
-39
lines changed

java-components/cli/pom.xml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,6 @@
6060
<groupId>io.github.redhat-appstudio.jvmbuild</groupId>
6161
<artifactId>hacbs-build-recipes-database</artifactId>
6262
</dependency>
63-
<dependency>
64-
<groupId>org.cyclonedx</groupId>
65-
<artifactId>cyclonedx-core-java</artifactId>
66-
</dependency>
6763
<dependency>
6864
<groupId>com.google.cloud.tools</groupId>
6965
<artifactId>jib-core</artifactId>

java-components/cli/src/main/java/com/redhat/hacbs/cli/rebuilt/RebuiltDownloadCommand.java

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@
1010
import java.util.Map;
1111
import java.util.Optional;
1212

13-
import org.cyclonedx.exception.ParseException;
14-
import org.cyclonedx.parsers.JsonParser;
15-
import org.cyclonedx.parsers.Parser;
16-
1713
import com.google.cloud.tools.jib.api.Credential;
1814
import com.google.cloud.tools.jib.api.ImageReference;
1915
import com.google.cloud.tools.jib.api.InvalidImageReferenceException;
@@ -52,9 +48,6 @@ enum DownloadSelection {
5248
@CommandLine.Option(names = "-a", description = "The build to view, specified by RebuiltArtifact name", completionCandidates = RebuildCompleter.class)
5349
String artifact;
5450

55-
@CommandLine.Option(names = "-s", description = "Path to an sbom to download all referenced artifacts", completionCandidates = RebuildCompleter.class)
56-
File sBom;
57-
5851
@CommandLine.Option(names = "-d", description = "Download directory to use. Defaults to current directory")
5952
File targetDirectory = new File(System.getProperty("user.dir"));
6053

@@ -86,30 +79,6 @@ public void run() {
8679
} else {
8780
System.out.println("Unable to find " + artifact + " in list of artifacts");
8881
}
89-
} else if (sBom != null) {
90-
if (!sBom.exists()) {
91-
System.out.println("Unable to find sbom " + sBom);
92-
} else {
93-
try {
94-
Parser parser = new JsonParser();
95-
parser.parse(sBom).getComponents().forEach(c -> {
96-
String gav = c.getGroup() + ":" + c.getName() + ":" + c.getVersion();
97-
Optional<RebuiltArtifact> rebuilt = builds.values().stream()
98-
.filter(b -> b.getSpec().getGav().equals(gav)).findFirst();
99-
if (rebuilt.isPresent()) {
100-
try {
101-
downloadImage(rebuilt.get().getSpec());
102-
} catch (IOException e) {
103-
throw new RuntimeException(e);
104-
}
105-
} else {
106-
System.out.println("Unable to find " + gav + " in list of artifacts");
107-
}
108-
});
109-
} catch (ParseException e) {
110-
throw new RuntimeException(e);
111-
}
112-
}
11382
}
11483
} catch (IOException e) {
11584
throw new RuntimeException(e);

java-components/common-tools/pom.xml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,6 @@
2727
<groupId>software.amazon.awssdk</groupId>
2828
<artifactId>url-connection-client</artifactId>
2929
</dependency>
30-
<dependency>
31-
<groupId>org.cyclonedx</groupId>
32-
<artifactId>cyclonedx-core-java</artifactId>
33-
</dependency>
3430
<dependency>
3531
<groupId>com.google.cloud.tools</groupId>
3632
<artifactId>jib-core</artifactId>

0 commit comments

Comments
 (0)