use of io.quarkus.bootstrap.resolver.TsArtifact in project quarkus by quarkusio.
the class DependencyPresentTwiceInTheGraphWithDifferentClassifierAndTypeTestCase method setupDependencies.
@Override
protected void setupDependencies() {
final TsArtifact common1 = new TsArtifact("common", "1");
install(common1, true);
installAsDep(new TsArtifact("required-dep1").addDependency(common1), true);
final TsArtifact commonClient2 = new TsArtifact(TsArtifact.DEFAULT_GROUP_ID, "common", "client", "txt", "2");
install(commonClient2, true);
installAsDep(new TsArtifact("required-dep2").addDependency(commonClient2), true);
installAsDep(new TsArtifact(TsArtifact.DEFAULT_GROUP_ID, "common", "", "jar", "3"), true);
}
use of io.quarkus.bootstrap.resolver.TsArtifact in project quarkus by quarkusio.
the class DirectDependencyVersionOverridesTransitiveVersionTestCase method setupDependencies.
@Override
protected void setupDependencies() {
installAsDep(new TsArtifact("required-dep1").addDependency(new TsArtifact("common-b", "2")));
installAsDep(new TsArtifact("common-b", "1"));
}
use of io.quarkus.bootstrap.resolver.TsArtifact 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));
}
use of io.quarkus.bootstrap.resolver.TsArtifact 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;
}
use of io.quarkus.bootstrap.resolver.TsArtifact in project quarkus by quarkusio.
the class PackageAppTestBase method platformProperties.
protected TsDependency platformProperties() {
if (platformPropsDep == null) {
TsArtifact platformProps = new TsArtifact("org.acme", "acme" + BootstrapConstants.PLATFORM_PROPERTIES_ARTIFACT_ID_SUFFIX, null, "properties", "1.0");
platformProps.setContent(new ContentProvider() {
Path propsFile;
@Override
public Path getPath(Path workDir) throws IOException {
if (propsFile == null) {
Properties props = new Properties();
props.setProperty("platform.quarkus.native.builder-image", "builder-image-url");
propsFile = workDir.resolve("platform-properties.properties");
try (OutputStream os = Files.newOutputStream(propsFile)) {
props.store(os, "Test Quarkus platform properties");
}
}
return propsFile;
}
});
platformProps.install(repo);
platformPropsDep = new TsDependency(platformProps);
}
return platformPropsDep;
}
Aggregations