Search in sources :

Example 1 with TsDependency

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

the class DirectOptionalOverridesTransitiveNonOptionalVersionTestCase method setupDependencies.

@Override
protected void setupDependencies() {
    installAsDep(new TsArtifact("required-a").addDependency(new TsArtifact("common", "1")), true);
    installAsDep(new TsDependency(new TsArtifact("common", "2"), true), true);
}
Also used : TsArtifact(io.quarkus.bootstrap.resolver.TsArtifact) TsDependency(io.quarkus.bootstrap.resolver.TsDependency)

Example 2 with TsDependency

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

the class OnlyDirectOptionalDepsAreCollectedTestCase 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);
    final TsArtifact nonOptionalCommon = new TsArtifact("non-optional-common");
    install(nonOptionalCommon, "compile", true);
    installAsDep(new TsDependency(new TsArtifact("optional-dep").addDependency(new TsDependency(new TsArtifact("common", "1"), true)).addDependency(new TsDependency(nonOptionalCommon, false)).addDependency(new TsDependency(new TsArtifact("other", "1"), true)), true), true);
    TsArtifact common2 = install(new TsArtifact("common", "2"), true);
    installAsDep(new TsArtifact("required-dep-c").addDependency(common2), true);
}
Also used : TsArtifact(io.quarkus.bootstrap.resolver.TsArtifact) TsDependency(io.quarkus.bootstrap.resolver.TsDependency)

Example 3 with TsDependency

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

the class DependencyPresentTwiceInTheGraphInCompileAndTestScopesTestCase method setupDependencies.

@Override
protected void setupDependencies() {
    final TsArtifact common1 = new TsArtifact("common", "1");
    installAsDep(new TsArtifact("required-dep1").addDependency(new TsDependency(common1, "test")), true);
    install(common1, true);
    installAsDep(new TsArtifact("required-dep2").addDependency(common1), true);
}
Also used : TsArtifact(io.quarkus.bootstrap.resolver.TsArtifact) TsDependency(io.quarkus.bootstrap.resolver.TsDependency)

Example 4 with TsDependency

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

the class ExclusionsTestCase method setupDependencies.

@Override
protected void setupDependencies() {
    final TsArtifact requiredTransitive = new TsArtifact("required-transitive").addDependency(new TsArtifact("excluded-dep", "2").addDependency(new TsArtifact("other-dep")));
    install(requiredTransitive, true);
    final TsArtifact otherDep2 = new TsArtifact("other-dep", "2");
    install(otherDep2, true);
    final TsArtifact otherRequiredTransitive = new TsArtifact("other-required-transitive").addDependency(otherDep2);
    install(otherRequiredTransitive, true);
    installAsDep(new TsArtifact("required-dep1").addDependency(new TsDependency(requiredTransitive).exclude("excluded-dep")).addDependency(otherRequiredTransitive));
}
Also used : TsArtifact(io.quarkus.bootstrap.resolver.TsArtifact) TsDependency(io.quarkus.bootstrap.resolver.TsDependency)

Example 5 with TsDependency

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

the class PackageAppTestBase method platformDescriptor.

protected TsDependency platformDescriptor() {
    if (platformDescriptor == null) {
        TsArtifact platformDescr = new TsArtifact("org.acme", "acme" + BootstrapConstants.PLATFORM_DESCRIPTOR_ARTIFACT_ID_SUFFIX, "1.0", "json", "1.0");
        platformDescr.setContent(new ContentProvider() {

            Path platformJson;

            @Override
            public Path getPath(Path workDir) throws IOException {
                if (platformJson == null) {
                    platformJson = workDir.resolve("platform-descriptor.json");
                    try (BufferedWriter writer = Files.newBufferedWriter(platformJson)) {
                        writer.write("platform descriptor");
                    }
                }
                return platformJson;
            }
        });
        platformDescr.install(repo);
        platformDescriptor = new TsDependency(platformDescr);
    }
    return platformDescriptor;
}
Also used : Path(java.nio.file.Path) TsArtifact(io.quarkus.bootstrap.resolver.TsArtifact) ContentProvider(io.quarkus.bootstrap.resolver.TsArtifact.ContentProvider) IOException(java.io.IOException) TsDependency(io.quarkus.bootstrap.resolver.TsDependency) BufferedWriter(java.io.BufferedWriter)

Aggregations

TsArtifact (io.quarkus.bootstrap.resolver.TsArtifact)18 TsDependency (io.quarkus.bootstrap.resolver.TsDependency)18 TsQuarkusExt (io.quarkus.bootstrap.resolver.TsQuarkusExt)9 ContentProvider (io.quarkus.bootstrap.resolver.TsArtifact.ContentProvider)2 IOException (java.io.IOException)2 Path (java.nio.file.Path)2 WorkspaceModule (io.quarkus.bootstrap.workspace.WorkspaceModule)1 BufferedWriter (java.io.BufferedWriter)1 OutputStream (java.io.OutputStream)1 Properties (java.util.Properties)1