use of io.quarkus.bootstrap.resolver.TsArtifact 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.TsArtifact in project quarkus by quarkusio.
the class DirectUserDepsOverrideTransitiveExtDepsTest method composeApplication.
@Override
protected TsArtifact composeApplication() {
final TsArtifact common1 = TsArtifact.jar("common", "1");
final TsQuarkusExt ext1 = new TsQuarkusExt("ext1");
ext1.getRuntime().addDependency(common1);
addToExpectedLib(ext1.getRuntime());
final TsArtifact common2 = TsArtifact.jar("common", "2");
final TsQuarkusExt ext2 = new TsQuarkusExt("ext2");
ext2.getRuntime().addDependency(common2);
addToExpectedLib(ext2.getRuntime());
final TsArtifact common3 = TsArtifact.jar("common", "3");
addToExpectedLib(common3);
final TsArtifact appJar = TsArtifact.jar("app").addManagedDependency(platformDescriptor()).addManagedDependency(platformProperties()).addDependency(ext1).addDependency(common3).addDependency(ext2);
return appJar;
}
use of io.quarkus.bootstrap.resolver.TsArtifact 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);
}
use of io.quarkus.bootstrap.resolver.TsArtifact in project quarkus by quarkusio.
the class ProvidedScopeDepsAreNotCollectedTestCase method setupDependencies.
@Override
protected void setupDependencies() {
final TsArtifact notCollected = new TsArtifact("not-collected");
// install(notCollected, false);
final TsArtifact common1 = new TsArtifact("common", "1").addDependency(new TsDependency(notCollected, "provided"));
install(common1, true);
installAsDep(new TsArtifact("required-dep").addDependency(common1), true);
installAsDep(new TsDependency(new TsArtifact("provided-dep").addDependency(new TsArtifact("common", "2")), "provided"), false);
}
use of io.quarkus.bootstrap.resolver.TsArtifact in project quarkus by quarkusio.
the class TestScopeIsNotAmongRuntimeDependenciesTestCase method setupDependencies.
@Override
protected void setupDependencies() {
installAsDep(new TsDependency(new TsArtifact("required-dep-a"), "compile"), true);
installAsDep(new TsDependency(new TsArtifact("required-dep-b"), "runtime"), true);
installAsDep(new TsDependency(new TsArtifact("direct-test-dep").addDependency(new TsArtifact("common", "1").addDependency(new TsDependency(new TsArtifact("not-collected"), "test"))), "test"), false);
final TsArtifact common = install(new TsArtifact("common", "2"), true);
installAsDep(new TsArtifact("required-dep-c").addDependency(common), true);
}
Aggregations