use of io.quarkus.bootstrap.resolver.TsDependency in project quarkus by quarkusio.
the class BasicExecutableOutputOutcomeTest method composeApplication.
@Override
protected TsArtifact composeApplication() {
final TsQuarkusExt coreExt = new TsQuarkusExt("core-ext");
addToExpectedLib(coreExt.getRuntime());
final TsQuarkusExt ext1 = new TsQuarkusExt("ext1");
ext1.addDependency(coreExt);
addToExpectedLib(ext1.getRuntime());
final TsQuarkusExt ext2 = new TsQuarkusExt("ext2");
addToExpectedLib(ext2.getRuntime());
final TsArtifact transitiveDep1 = TsArtifact.jar("transitive1");
addToExpectedLib(transitiveDep1);
final TsArtifact optionalTransitiveDep = TsArtifact.jar("optional-transitive-dep");
final TsArtifact compileDep = TsArtifact.jar("compile-dep").addDependency(transitiveDep1).addDependency(new TsDependency(optionalTransitiveDep, true));
addToExpectedLib(compileDep);
final TsArtifact providedDep = TsArtifact.jar("provided-dep");
final TsArtifact optionalDep = TsArtifact.jar("optional-dep");
addToExpectedLib(optionalDep);
final TsArtifact directRtDep = TsArtifact.jar("runtime-dep");
addToExpectedLib(directRtDep);
final TsArtifact appJar = TsArtifact.jar("app").addManagedDependency(platformDescriptor()).addManagedDependency(platformProperties()).addDependency(ext1).addDependency(ext2).addDependency(compileDep).addDependency(new TsDependency(providedDep, "provided")).addDependency(new TsDependency(optionalDep, true)).addDependency(new TsDependency(directRtDep, "runtime"));
return appJar;
}
use of io.quarkus.bootstrap.resolver.TsDependency in project quarkus by quarkusio.
the class DependencyVersionOverridesManagedVersionTest method composeApplication.
@Override
protected TsArtifact composeApplication() {
final TsQuarkusExt extA_100 = new TsQuarkusExt("ext-a", "1.0.0");
install(extA_100);
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 bom = new TsArtifact("test.quarkus", "test-bom", null, "pom", "1.0.0");
bom.addManagedDependency(platformDescriptor());
bom.addManagedDependency(platformProperties());
bom.addManagedDependency(new TsDependency(extA_100.getRuntime()));
bom.addManagedDependency(new TsDependency(extB_100_rt));
install(bom);
final TsQuarkusExt extA_101 = new TsQuarkusExt("ext-a", "1.0.1");
install(extA_101);
addToExpectedLib(extA_101.getRuntime());
createWorkspace();
final TsArtifact appJar = TsArtifact.jar("app").addManagedDependency(new TsDependency(bom, "import")).addDependency(new TsDependency(new TsArtifact(extB_100_rt.getGroupId(), extB_100_rt.getArtifactId(), extB_100_rt.getClassifier(), extB_100_rt.getType(), null))).addDependency(extA_101.getRuntime());
return appJar;
}
use of io.quarkus.bootstrap.resolver.TsDependency in project quarkus by quarkusio.
the class ExcludeExtensionDepsTest method composeApplication.
@Override
protected TsArtifact composeApplication() {
final TsArtifact extADep1 = TsArtifact.jar("ext-a-dep-1");
final TsArtifact extADep2 = TsArtifact.jar("ext-a-dep-2");
final TsArtifact extBDep1 = TsArtifact.jar("ext-b-dep-1");
addToExpectedLib(extBDep1);
final TsArtifact extBDep2 = TsArtifact.jar("ext-b-dep-2");
addToExpectedLib(extBDep2);
final TsArtifact extBDepTrans1 = TsArtifact.jar("ext-b-dep-trans-1");
addToExpectedLib(extBDepTrans1);
final TsArtifact extBDepTrans2 = TsArtifact.jar("ext-b-dep-trans-2");
addToExpectedLib(extBDepTrans2);
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");
extBDepTrans2.addDependency(new TsDependency(extBDep2));
extBDepTrans2.addDependency(new TsDependency(depToExclude6));
extBDepTrans1.addDependency(new TsDependency(extBDepTrans2));
extBDepTrans1.addDependency(new TsDependency(depToExclude2));
extBDepTrans1.addDependency(new TsDependency(depToExclude5));
extBDep1.addDependency(extBDepTrans1, depToExclude5);
extBDep1.addDependency(new TsDependency(depToExclude1));
final TsQuarkusExt extA = new TsQuarkusExt("ext-a");
extA.getRuntime().addDependency(extADep1);
extA.getDeployment().addDependency(extADep2);
final TsQuarkusExt extB = new TsQuarkusExt("ext-b");
addToExpectedLib(extB.getRuntime());
extB.getRuntime().addDependency(extBDep1, depToExclude6).addDependency(extA).addDependency(depToExclude4);
extB.getDeployment().addDependency(depToExclude3);
return TsArtifact.jar("app").addManagedDependency(platformDescriptor()).addManagedDependency(platformProperties()).addDependency(extB, extA.getRuntime(), depToExclude1, depToExclude2, depToExclude3, depToExclude4);
}
use of io.quarkus.bootstrap.resolver.TsDependency in project quarkus by quarkusio.
the class BasicBuildFromWorkspaceModuleTest method composeApplication.
@Override
protected WorkspaceModule composeApplication() throws Exception {
// Acme Quarkus extension
final TsQuarkusExt acmeExt = new TsQuarkusExt("acme-ext");
install(acmeExt);
addToExpectedLib(acmeExt.getRuntime());
// Acme Quarkus platform BOM
final TsArtifact acmeBom = TsArtifact.pom("org.acme", "acme-bom", "1.0");
acmeBom.addManagedDependency(platformDescriptor());
acmeBom.addManagedDependency(platformProperties());
acmeBom.addManagedDependency(new TsDependency(acmeExt.getRuntime()));
install(acmeBom);
final WorkspaceModule module = WorkspaceModule.builder().setModuleId(WorkspaceModuleId.of("org.acme", "acme-app", "1")).setModuleDir(mkdir("app-module")).setBuildDir(mkdir("target")).addArtifactSources(ArtifactSources.main(SourceDir.of(mkdir("app-module/main/java"), mkdir("main/classes")), SourceDir.of(mkdir("app-module/main/resources"), mkdir("main/classes")))).addArtifactSources(ArtifactSources.test(SourceDir.of(mkdir("app-module/test/java"), mkdir("test/classes")), SourceDir.of(mkdir("app-module/test/resources"), mkdir("test/classes")))).addDependencyConstraint(Dependency.pomImport(acmeBom.getGroupId(), acmeBom.getArtifactId(), acmeBom.getVersion())).addDependency(Dependency.of(acmeExt.getRuntime().getGroupId(), acmeExt.getRuntime().getArtifactId())).build();
return module;
}
use of io.quarkus.bootstrap.resolver.TsDependency in project quarkus by quarkusio.
the class DependencyTreeMojoTestBase method initRepo.
protected void initRepo() throws Exception {
final TsQuarkusExt coreExt = new TsQuarkusExt("test-core-ext");
app = TsArtifact.jar("test-app").addDependency(new TsArtifact(TsArtifact.DEFAULT_GROUP_ID, "artifact-with-classifier", "classifier", "jar", TsArtifact.DEFAULT_VERSION)).addDependency(new TsQuarkusExt("test-ext2").addDependency(new TsQuarkusExt("test-ext1").addDependency(coreExt))).addDependency(new TsDependency(TsArtifact.jar("optional"), true)).addDependency(new TsQuarkusExt("test-ext3").addDependency(coreExt)).addDependency(new TsDependency(TsArtifact.jar("provided"), "provided")).addDependency(new TsDependency(TsArtifact.jar("runtime"), "runtime")).addDependency(new TsDependency(TsArtifact.jar("test"), "test"));
appModel = app.getPomModel();
app.install(repoBuilder);
}
Aggregations