Search in sources :

Example 6 with ArtifactDependency

use of io.quarkus.maven.dependency.ArtifactDependency in project quarkus by quarkusio.

the class OptionalDepsTest method assertDeploymentDeps.

@Override
protected void assertDeploymentDeps(Set<Dependency> deploymentDeps) throws Exception {
    final Set<Dependency> expected = new HashSet<>();
    expected.add(new ArtifactDependency(new GACTV("io.quarkus.bootstrap.test", "ext-a-deployment", "1"), "compile", DependencyFlags.OPTIONAL, DependencyFlags.DEPLOYMENT_CP));
    expected.add(new ArtifactDependency(new GACTV("io.quarkus.bootstrap.test", "ext-b-deployment-dep", "1"), "compile", DependencyFlags.OPTIONAL, DependencyFlags.DEPLOYMENT_CP));
    expected.add(new ArtifactDependency(new GACTV("io.quarkus.bootstrap.test", "ext-b-deployment", "1"), "compile", DependencyFlags.OPTIONAL, DependencyFlags.DEPLOYMENT_CP));
    expected.add(new ArtifactDependency(new GACTV("io.quarkus.bootstrap.test", "ext-d-deployment", "1"), "compile", DependencyFlags.DEPLOYMENT_CP));
    assertEquals(expected, deploymentDeps);
}
Also used : ArtifactDependency(io.quarkus.maven.dependency.ArtifactDependency) TsDependency(io.quarkus.bootstrap.resolver.TsDependency) ArtifactDependency(io.quarkus.maven.dependency.ArtifactDependency) Dependency(io.quarkus.maven.dependency.Dependency) GACTV(io.quarkus.maven.dependency.GACTV) HashSet(java.util.HashSet)

Example 7 with ArtifactDependency

use of io.quarkus.maven.dependency.ArtifactDependency in project quarkus by quarkusio.

the class ProvidedExtensionDepsInTestModeTest method assertDeploymentDeps.

@Override
protected void assertDeploymentDeps(Set<Dependency> deploymentDeps) throws Exception {
    final Set<Dependency> expected = new HashSet<>();
    expected.add(new ArtifactDependency(new GACTV("io.quarkus.bootstrap.test", "ext-a-deployment", "1"), "compile", DependencyFlags.DEPLOYMENT_CP));
    expected.add(new ArtifactDependency(new GACTV("io.quarkus.bootstrap.test", "ext-a-deployment-dep", "1"), "compile", DependencyFlags.DEPLOYMENT_CP));
    expected.add(new ArtifactDependency(new GACTV("io.quarkus.bootstrap.test", "ext-b-deployment", "1"), "provided", DependencyFlags.DEPLOYMENT_CP));
    assertEquals(expected, deploymentDeps);
}
Also used : ArtifactDependency(io.quarkus.maven.dependency.ArtifactDependency) TsDependency(io.quarkus.bootstrap.resolver.TsDependency) ArtifactDependency(io.quarkus.maven.dependency.ArtifactDependency) Dependency(io.quarkus.maven.dependency.Dependency) GACTV(io.quarkus.maven.dependency.GACTV) HashSet(java.util.HashSet)

Example 8 with ArtifactDependency

use of io.quarkus.maven.dependency.ArtifactDependency in project quarkus by quarkusio.

the class ConditionalDependencyWithSingleConditionTest method assertAppModel.

@Override
protected void assertAppModel(ApplicationModel appModel) throws Exception {
    final Set<Dependency> deploymentDeps = appModel.getDependencies().stream().filter(d -> d.isDeploymentCp() && !d.isRuntimeCp()).map(d -> new ArtifactDependency(d)).collect(Collectors.toSet());
    final Set<Dependency> expected = new HashSet<>();
    expected.add(new ArtifactDependency(new GACTV(TsArtifact.DEFAULT_GROUP_ID, "ext-c-deployment", TsArtifact.DEFAULT_VERSION), "compile", DependencyFlags.DEPLOYMENT_CP));
    expected.add(new ArtifactDependency(new GACTV(TsArtifact.DEFAULT_GROUP_ID, "ext-a-deployment", TsArtifact.DEFAULT_VERSION), "compile", DependencyFlags.DEPLOYMENT_CP));
    expected.add(new ArtifactDependency(new GACTV(TsArtifact.DEFAULT_GROUP_ID, "ext-b-deployment", TsArtifact.DEFAULT_VERSION), "runtime", DependencyFlags.DEPLOYMENT_CP));
    assertEquals(expected, deploymentDeps);
}
Also used : HashSet(java.util.HashSet) DependencyFlags(io.quarkus.maven.dependency.DependencyFlags) ApplicationModel(io.quarkus.bootstrap.model.ApplicationModel) ArtifactDependency(io.quarkus.maven.dependency.ArtifactDependency) TsQuarkusExt(io.quarkus.bootstrap.resolver.TsQuarkusExt) Set(java.util.Set) BootstrapFromOriginalJarTestBase(io.quarkus.deployment.runnerjar.BootstrapFromOriginalJarTestBase) Dependency(io.quarkus.maven.dependency.Dependency) Assertions.assertEquals(org.junit.jupiter.api.Assertions.assertEquals) TsArtifact(io.quarkus.bootstrap.resolver.TsArtifact) Collectors(java.util.stream.Collectors) GACTV(io.quarkus.maven.dependency.GACTV) ArtifactDependency(io.quarkus.maven.dependency.ArtifactDependency) ArtifactDependency(io.quarkus.maven.dependency.ArtifactDependency) Dependency(io.quarkus.maven.dependency.Dependency) GACTV(io.quarkus.maven.dependency.GACTV) HashSet(java.util.HashSet)

Example 9 with ArtifactDependency

use of io.quarkus.maven.dependency.ArtifactDependency in project quarkus by quarkusio.

the class UnsatisfiedConditionalDependencyWithTwoConditionsTest method assertDeploymentDeps.

@Override
protected void assertDeploymentDeps(Set<Dependency> deploymentDeps) throws Exception {
    final Set<Dependency> expected = new HashSet<>();
    expected.add(new ArtifactDependency(new GACTV(TsArtifact.DEFAULT_GROUP_ID, "ext-c-deployment", TsArtifact.DEFAULT_VERSION), "compile", DependencyFlags.DEPLOYMENT_CP));
    expected.add(new ArtifactDependency(new GACTV(TsArtifact.DEFAULT_GROUP_ID, "ext-a-deployment", TsArtifact.DEFAULT_VERSION), "compile", DependencyFlags.DEPLOYMENT_CP));
    assertEquals(expected, deploymentDeps);
}
Also used : ArtifactDependency(io.quarkus.maven.dependency.ArtifactDependency) ArtifactDependency(io.quarkus.maven.dependency.ArtifactDependency) Dependency(io.quarkus.maven.dependency.Dependency) GACTV(io.quarkus.maven.dependency.GACTV) HashSet(java.util.HashSet)

Example 10 with ArtifactDependency

use of io.quarkus.maven.dependency.ArtifactDependency in project quarkus by quarkusio.

the class ExcludeExtensionDepsTest method assertAppModel.

@Override
protected void assertAppModel(ApplicationModel appModel) throws Exception {
    final Set<Dependency> expectedDeployDeps = new HashSet<>();
    expectedDeployDeps.add(new ArtifactDependency(new GACTV("io.quarkus.bootstrap.test", "ext-b-deployment", "1"), "compile", DependencyFlags.DEPLOYMENT_CP));
    assertEquals(expectedDeployDeps, appModel.getDependencies().stream().filter(d -> d.isDeploymentCp() && !d.isRuntimeCp()).map(d -> new ArtifactDependency(d)).collect(Collectors.toSet()));
    final Set<Dependency> expectedRuntimeDeps = new HashSet<>();
    expectedRuntimeDeps.add(new ArtifactDependency(new GACTV("io.quarkus.bootstrap.test", "ext-b", "1"), "compile", DependencyFlags.DIRECT, DependencyFlags.RUNTIME_EXTENSION_ARTIFACT, DependencyFlags.RUNTIME_CP, DependencyFlags.DEPLOYMENT_CP, DependencyFlags.TOP_LEVEL_RUNTIME_EXTENSION_ARTIFACT));
    expectedRuntimeDeps.add(new ArtifactDependency(new GACTV("io.quarkus.bootstrap.test", "ext-b-dep-1", "1"), "compile", DependencyFlags.RUNTIME_CP, DependencyFlags.DEPLOYMENT_CP));
    expectedRuntimeDeps.add(new ArtifactDependency(new GACTV("io.quarkus.bootstrap.test", "ext-b-dep-2", "1"), "compile", DependencyFlags.RUNTIME_CP, DependencyFlags.DEPLOYMENT_CP));
    expectedRuntimeDeps.add(new ArtifactDependency(new GACTV("io.quarkus.bootstrap.test", "ext-b-dep-trans-1", "1"), "compile", DependencyFlags.RUNTIME_CP, DependencyFlags.DEPLOYMENT_CP));
    expectedRuntimeDeps.add(new ArtifactDependency(new GACTV("io.quarkus.bootstrap.test", "ext-b-dep-trans-2", "1"), "compile", DependencyFlags.RUNTIME_CP, DependencyFlags.DEPLOYMENT_CP));
    assertEquals(expectedRuntimeDeps, appModel.getRuntimeDependencies().stream().map(d -> new ArtifactDependency(d)).collect(Collectors.toSet()));
    final Set<Dependency> expectedFullDeps = new HashSet<>();
    expectedFullDeps.addAll(expectedDeployDeps);
    expectedFullDeps.addAll(expectedRuntimeDeps);
    assertEquals(expectedFullDeps, appModel.getDependencies().stream().map(d -> new ArtifactDependency(d)).collect(Collectors.toSet()));
}
Also used : HashSet(java.util.HashSet) DependencyFlags(io.quarkus.maven.dependency.DependencyFlags) TsDependency(io.quarkus.bootstrap.resolver.TsDependency) ApplicationModel(io.quarkus.bootstrap.model.ApplicationModel) ArtifactDependency(io.quarkus.maven.dependency.ArtifactDependency) TsQuarkusExt(io.quarkus.bootstrap.resolver.TsQuarkusExt) Set(java.util.Set) Dependency(io.quarkus.maven.dependency.Dependency) Assertions.assertEquals(org.junit.jupiter.api.Assertions.assertEquals) TsArtifact(io.quarkus.bootstrap.resolver.TsArtifact) Collectors(java.util.stream.Collectors) GACTV(io.quarkus.maven.dependency.GACTV) ArtifactDependency(io.quarkus.maven.dependency.ArtifactDependency) TsDependency(io.quarkus.bootstrap.resolver.TsDependency) ArtifactDependency(io.quarkus.maven.dependency.ArtifactDependency) Dependency(io.quarkus.maven.dependency.Dependency) GACTV(io.quarkus.maven.dependency.GACTV) HashSet(java.util.HashSet)

Aggregations

ArtifactDependency (io.quarkus.maven.dependency.ArtifactDependency)15 Dependency (io.quarkus.maven.dependency.Dependency)13 GACTV (io.quarkus.maven.dependency.GACTV)12 HashSet (java.util.HashSet)11 TsDependency (io.quarkus.bootstrap.resolver.TsDependency)6 Collectors (java.util.stream.Collectors)6 ApplicationModel (io.quarkus.bootstrap.model.ApplicationModel)5 TsArtifact (io.quarkus.bootstrap.resolver.TsArtifact)5 TsQuarkusExt (io.quarkus.bootstrap.resolver.TsQuarkusExt)4 DependencyFlags (io.quarkus.maven.dependency.DependencyFlags)4 Set (java.util.Set)4 Assertions.assertEquals (org.junit.jupiter.api.Assertions.assertEquals)4 CuratedApplication (io.quarkus.bootstrap.app.CuratedApplication)3 QuarkusBootstrap (io.quarkus.bootstrap.app.QuarkusBootstrap)3 IOException (java.io.IOException)3 Path (java.nio.file.Path)3 BootstrapMavenContext (io.quarkus.bootstrap.resolver.maven.BootstrapMavenContext)2 MavenArtifactResolver (io.quarkus.bootstrap.resolver.maven.MavenArtifactResolver)2 BootstrapFromOriginalJarTestBase (io.quarkus.deployment.runnerjar.BootstrapFromOriginalJarTestBase)2 ArtifactCoords (io.quarkus.maven.dependency.ArtifactCoords)2