-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added an option to record all direct dependencies of each component when
generating a manifest
- Loading branch information
1 parent
7f47d13
commit 3fd3494
Showing
13 changed files
with
380 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
domino/api/src/main/java/io/quarkus/domino/manifest/Playground.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
package io.quarkus.domino.manifest; | ||
|
||
import io.quarkus.bootstrap.resolver.maven.BootstrapMavenContext; | ||
import io.quarkus.bootstrap.resolver.maven.MavenArtifactResolver; | ||
import io.quarkus.domino.ProjectDependencyConfig; | ||
import io.quarkus.domino.ProjectDependencyResolver; | ||
import io.quarkus.maven.dependency.ArtifactCoords; | ||
import java.util.List; | ||
import java.util.Set; | ||
import org.eclipse.aether.DefaultRepositorySystemSession; | ||
import org.eclipse.aether.util.graph.manager.DependencyManagerUtils; | ||
import org.eclipse.aether.util.graph.transformer.ConflictResolver; | ||
|
||
public class Playground { | ||
|
||
public static void main(String[] args) throws Exception { | ||
|
||
var mvnCtx = new BootstrapMavenContext(BootstrapMavenContext.config().setWorkspaceDiscovery(false)); | ||
var session = new DefaultRepositorySystemSession(mvnCtx.getRepositorySystemSession()); | ||
if (true) { | ||
session.setConfigProperty(ConflictResolver.CONFIG_PROP_VERBOSE, true); | ||
session.setConfigProperty(DependencyManagerUtils.CONFIG_PROP_VERBOSE, true); | ||
} | ||
|
||
mvnCtx = new BootstrapMavenContext(BootstrapMavenContext.config() | ||
.setRepositorySystem(mvnCtx.getRepositorySystem()) | ||
.setRepositorySystemSession(session) | ||
.setRemoteRepositoryManager(mvnCtx.getRemoteRepositoryManager()) | ||
.setRemoteRepositories(mvnCtx.getRemoteRepositories())); | ||
|
||
var resolver = new MavenArtifactResolver(mvnCtx); | ||
|
||
ProjectDependencyResolver.builder() | ||
.setArtifactResolver(resolver) | ||
.setDependencyConfig(ProjectDependencyConfig.builder() | ||
/* @formatter:off | ||
.setProjectArtifacts(List.of( | ||
ArtifactCoords.jar("org.acme", "acme-lib-b", "1.0.0-SNAPSHOT"), | ||
ArtifactCoords.jar("org.acme", "acme-lib-a", "1.0.0-SNAPSHOT"))) | ||
@formatter:on */ | ||
.setProjectArtifacts(List.of( | ||
ArtifactCoords.jar("io.quarkus", "quarkus-core-deployment", "3.2.6.Final"), | ||
ArtifactCoords.jar("io.quarkus", "quarkus-core", "3.2.6.Final"))) | ||
//.setIncludeOptionalDeps(true) | ||
.setLegacyScmLocator(true) | ||
.setExcludeScopes(Set.of("test")) | ||
.build()) | ||
//.addDependencyTreeVisitor(new LoggingDependencyTreeVisitor(MessageWriter.info(), false, null)) | ||
.addDependencyTreeVisitor(new SbomGeneratingDependencyVisitor( | ||
SbomGenerator.builder() | ||
.setArtifactResolver(resolver))) | ||
.build() | ||
.resolveDependencies(); | ||
} | ||
} |
Oops, something went wrong.