Search in sources :

Example 1 with TsQuarkusExt

use of io.quarkus.bootstrap.resolver.TsQuarkusExt in project quarkus by quarkusio.

the class ManagedReplacedDependencyTestCase method setupDependencies.

@Override
protected void setupDependencies() throws Exception {
    // install ext 1.0.X in the repo
    final TsQuarkusExt ext100 = new TsQuarkusExt("ext1", "100");
    install(ext100, false);
    final TsQuarkusExt ext101 = new TsQuarkusExt("ext1", "101");
    install(ext101, false);
    final TsQuarkusExt ext102 = new TsQuarkusExt("ext1", "102");
    install(ext102, false);
    final TsQuarkusExt ext103 = new TsQuarkusExt("ext1", "103");
    install(ext103, true);
    // install ext 2.0.0 and add it as a direct dependency
    final TsQuarkusExt ext200 = new TsQuarkusExt("ext2", "200");
    ext200.addDependency(ext100);
    installAsDep(ext200);
    // install ext 2.0.1 and add it to the dependency management
    final TsQuarkusExt ext201 = new TsQuarkusExt("ext2", "201");
    ext201.addDependency(ext101);
    install(ext201, false);
    // install ext 3.0.0
    final TsQuarkusExt ext300 = new TsQuarkusExt("ext3", "300");
    ext300.addDependency(ext200);
    install(ext300, false);
    // install ext 3.0.1
    final TsQuarkusExt ext301 = new TsQuarkusExt("ext3", "301");
    ext301.addDependency(ext201);
    install(ext301, false);
    // add a dependency on ext3 (no version)
    root.addDependency(TsArtifact.jar(ext300.getRuntime().getArtifactId(), null));
    // the dependency management
    addManagedDep(ext103);
    addManagedDep(ext201);
    addManagedDep(ext301);
    addCollectedDep(ext301.getRuntime(), DependencyFlags.DIRECT | DependencyFlags.RUNTIME_EXTENSION_ARTIFACT | DependencyFlags.TOP_LEVEL_RUNTIME_EXTENSION_ARTIFACT);
    addCollectedDeploymentDep(ext301.getDeployment());
}
Also used : TsQuarkusExt(io.quarkus.bootstrap.resolver.TsQuarkusExt)

Example 2 with TsQuarkusExt

use of io.quarkus.bootstrap.resolver.TsQuarkusExt in project quarkus by quarkusio.

the class ProvidedExtensionDepsTest method composeApplication.

@Override
protected TsArtifact composeApplication() {
    final TsArtifact extADep = TsArtifact.jar("ext-a-dep");
    addToExpectedLib(extADep);
    final TsArtifact extAProvidedDep = TsArtifact.jar("ext-a-provided-dep");
    final TsArtifact extADeploymentDep = TsArtifact.jar("ext-a-deployment-dep");
    final TsArtifact extAOptionalDeploymentDep = TsArtifact.jar("ext-a-provided-deployment-dep");
    final TsQuarkusExt extA = new TsQuarkusExt("ext-a");
    addToExpectedLib(extA.getRuntime());
    extA.getRuntime().addDependency(new TsDependency(extADep)).addDependency(new TsDependency(extAProvidedDep, "provided"));
    extA.getDeployment().addDependency(new TsDependency(extADeploymentDep)).addDependency(new TsDependency(extAOptionalDeploymentDep, "provided"));
    final TsQuarkusExt extB = new TsQuarkusExt("ext-b");
    this.install(extB);
    final TsArtifact someProvidedDep = TsArtifact.jar("some-provided-dep");
    return TsArtifact.jar("app").addManagedDependency(platformDescriptor()).addManagedDependency(platformProperties()).addDependency(extA).addDependency(extB, "provided").addDependency(new TsDependency(someProvidedDep, "provided"));
}
Also used : TsArtifact(io.quarkus.bootstrap.resolver.TsArtifact) TsQuarkusExt(io.quarkus.bootstrap.resolver.TsQuarkusExt) TsDependency(io.quarkus.bootstrap.resolver.TsDependency)

Example 3 with TsQuarkusExt

use of io.quarkus.bootstrap.resolver.TsQuarkusExt in project quarkus by quarkusio.

the class DependencyAddedInProfileTest method composeApplication.

@Override
protected TsArtifact composeApplication() {
    final TsQuarkusExt extA_100 = new TsQuarkusExt("ext-a", "1.0.0");
    addToExpectedLib(extA_100.getRuntime());
    final TsQuarkusExt extB_100 = new TsQuarkusExt("ext-b", "1.0.0");
    install(extB_100);
    final TsArtifact extB_100_rt = extB_100.getRuntime();
    addToExpectedLib(extB_100_rt);
    final TsArtifact appJar = TsArtifact.jar("app").addManagedDependency(platformDescriptor()).addManagedDependency(platformProperties()).addDependency(extA_100);
    final Profile profile = new Profile();
    profile.setId("extra");
    Activation activation = new Activation();
    ActivationProperty ap = new ActivationProperty();
    ap.setName("extra");
    activation.setProperty(ap);
    profile.setActivation(activation);
    final Dependency dep = new Dependency();
    dep.setGroupId(extB_100_rt.getGroupId());
    dep.setArtifactId(extB_100_rt.getArtifactId());
    dep.setVersion(extB_100_rt.getVersion());
    profile.addDependency(dep);
    appJar.addProfile(profile);
    createWorkspace();
    setSystemProperty("extra", "extra");
    return appJar;
}
Also used : TsArtifact(io.quarkus.bootstrap.resolver.TsArtifact) TsQuarkusExt(io.quarkus.bootstrap.resolver.TsQuarkusExt) Activation(org.apache.maven.model.Activation) Dependency(org.apache.maven.model.Dependency) ActivationProperty(org.apache.maven.model.ActivationProperty) Profile(org.apache.maven.model.Profile)

Example 4 with TsQuarkusExt

use of io.quarkus.bootstrap.resolver.TsQuarkusExt in project quarkus by quarkusio.

the class ExcludeLibDepsTest method composeApplication.

@Override
protected TsArtifact composeApplication() {
    final TsArtifact extADep1 = TsArtifact.jar("ext-a-dep-1");
    addToExpectedLib(extADep1);
    final TsArtifact extADep2 = TsArtifact.jar("ext-a-dep-2");
    addToExpectedLib(extADep2);
    final TsArtifact extADepTrans1 = TsArtifact.jar("ext-a-dep-trans-1");
    addToExpectedLib(extADepTrans1);
    final TsArtifact extADepTrans2 = TsArtifact.jar("ext-a-dep-trans-2");
    addToExpectedLib(extADepTrans2);
    final TsArtifact depToExclude1 = TsArtifact.jar("ext-dep-exclude-1");
    final TsArtifact depToExclude2 = TsArtifact.jar("ext-dep-exclude-2");
    final TsArtifact depToExclude3 = TsArtifact.jar("ext-dep-exclude-3");
    final TsArtifact depToExclude4 = TsArtifact.jar("ext-dep-exclude-4");
    final TsArtifact depToExclude5 = TsArtifact.jar("ext-dep-exclude-5");
    final TsArtifact depToExclude6 = TsArtifact.jar("ext-dep-exclude-6");
    extADepTrans2.addDependency(new TsDependency(extADep2));
    extADepTrans2.addDependency(new TsDependency(depToExclude6));
    extADepTrans1.addDependency(new TsDependency(extADepTrans2));
    extADepTrans1.addDependency(new TsDependency(depToExclude2));
    extADepTrans1.addDependency(new TsDependency(depToExclude5));
    extADep1.addDependency(extADepTrans1, depToExclude5);
    extADep1.addDependency(new TsDependency(depToExclude1));
    final TsQuarkusExt extA = new TsQuarkusExt("ext-a");
    addToExpectedLib(extA.getRuntime());
    extA.getRuntime().addDependency(extADep1, depToExclude6).addDependency(depToExclude3);
    extA.getDeployment().addDependency(depToExclude4);
    return TsArtifact.jar("app").addManagedDependency(platformDescriptor()).addManagedDependency(platformProperties()).addDependency(extA, depToExclude1, depToExclude2, depToExclude3, depToExclude4);
}
Also used : TsArtifact(io.quarkus.bootstrap.resolver.TsArtifact) TsQuarkusExt(io.quarkus.bootstrap.resolver.TsQuarkusExt) TsDependency(io.quarkus.bootstrap.resolver.TsDependency)

Example 5 with TsQuarkusExt

use of io.quarkus.bootstrap.resolver.TsQuarkusExt in project quarkus by quarkusio.

the class OptionalDepsTest method composeApplication.

@Override
protected TsArtifact composeApplication() {
    final TsArtifact extADep = TsArtifact.jar("ext-a-dep");
    addToExpectedLib(extADep);
    final TsArtifact extAOptionalDep = TsArtifact.jar("ext-a-optional-dep");
    final TsArtifact extAOptionalDeploymentDep = TsArtifact.jar("ext-a-optional-deployment-dep");
    final TsQuarkusExt extA = new TsQuarkusExt("ext-a");
    addToExpectedLib(extA.getRuntime());
    extA.getRuntime().addDependency(extADep).addDependency(new TsDependency(extAOptionalDep, true));
    extA.getDeployment().addDependency(new TsDependency(extAOptionalDeploymentDep, true));
    final TsArtifact extBOptionalDep = TsArtifact.jar("ext-b-optional-dep");
    final TsArtifact extBDeploymentDep = TsArtifact.jar("ext-b-deployment-dep");
    install(extBDeploymentDep);
    final TsArtifact extBOptionalDeploymentDep = TsArtifact.jar("ext-b-optional-deployment-dep");
    install(extBOptionalDeploymentDep);
    final TsQuarkusExt extB = new TsQuarkusExt("ext-b");
    extB.getRuntime().addDependency(new TsDependency(extBOptionalDep, true));
    addToExpectedLib(extB.getRuntime());
    extB.getDeployment().addDependency(new TsDependency(extBOptionalDeploymentDep, true));
    extB.getDeployment().addDependency(new TsDependency(extBDeploymentDep, false));
    install(extB);
    final TsArtifact appOptionalDep = TsArtifact.jar("app-optional-dep").addDependency(extB.getRuntime());
    addToExpectedLib(appOptionalDep);
    final TsQuarkusExt extC = new TsQuarkusExt("ext-c");
    install(extC);
    final TsQuarkusExt extD = new TsQuarkusExt("ext-d");
    extD.getRuntime().addDependency(new TsDependency(extC.getRuntime(), true));
    extD.getDeployment().addDependency(new TsDependency(extC.getDeployment(), true));
    install(extD);
    addToExpectedLib(extD.getRuntime());
    return TsArtifact.jar("app").addManagedDependency(platformDescriptor()).addManagedDependency(platformProperties()).addDependency(extA, true).addDependency(new TsDependency(appOptionalDep, true)).addDependency(extD.getRuntime());
}
Also used : TsArtifact(io.quarkus.bootstrap.resolver.TsArtifact) TsQuarkusExt(io.quarkus.bootstrap.resolver.TsQuarkusExt) TsDependency(io.quarkus.bootstrap.resolver.TsDependency)

Aggregations

TsQuarkusExt (io.quarkus.bootstrap.resolver.TsQuarkusExt)23 TsArtifact (io.quarkus.bootstrap.resolver.TsArtifact)13 TsDependency (io.quarkus.bootstrap.resolver.TsDependency)9 WorkspaceModule (io.quarkus.bootstrap.workspace.WorkspaceModule)1 Activation (org.apache.maven.model.Activation)1 ActivationProperty (org.apache.maven.model.ActivationProperty)1 Dependency (org.apache.maven.model.Dependency)1 Profile (org.apache.maven.model.Profile)1