use of io.quarkus.maven.dependency.ResolvedDependency in project automatiko-engine by automatiko-io.
the class AutomatikoQuarkusProcessor method createApplicationGenerator.
private ApplicationGenerator createApplicationGenerator(AutomatikoBuildTimeConfig config, AppPaths appPaths, CompositeIndex archivesIndex, ApplicationModel appModel) throws IOException {
boolean usePersistence = archivesIndex.getClassByName(createDotName(persistenceFactoryClass)) != null;
GeneratorContext context = buildContext(config, appPaths, archivesIndex);
ApplicationGenerator appGen = new ApplicationGenerator(config.packageName().orElse(DEFAULT_PACKAGE_NAME), new File(appPaths.getFirstProjectPath().toFile(), "target")).withDependencyInjection(new CDIDependencyInjectionAnnotator()).withPersistence(usePersistence).withGeneratorContext(context);
List<String> dependencies = new ArrayList<>();
if (appModel != null) {
for (ResolvedDependency i : appModel.getRuntimeDependencies()) {
dependencies.add(i.getResolvedPaths().getSinglePath().toAbsolutePath().toString());
}
}
addProcessGenerator(appPaths, usePersistence, appGen, dependencies);
if (context.getBuildContext().isDmnSupported()) {
addDecisionGenerator(appPaths, appGen, false, dependencies);
}
return appGen;
}
use of io.quarkus.maven.dependency.ResolvedDependency in project camel-quarkus by apache.
the class XchangeProcessor method indexDependenciesAndResources.
@BuildStep
void indexDependenciesAndResources(BuildProducer<IndexDependencyBuildItem> indexedDependency, BuildProducer<NativeImageResourceBuildItem> nativeImageResource, CurateOutcomeBuildItem curateOutcome) {
ApplicationModel applicationModel = curateOutcome.getApplicationModel();
for (ResolvedDependency dependency : applicationModel.getDependencies()) {
if (dependency.getGroupId().equals("org.knowm.xchange")) {
// Index any org.knowm.xchange dependencies present on the classpath as they contain the APIs for interacting with each crypto exchange
String artifactId = dependency.getArtifactId();
indexedDependency.produce(new IndexDependencyBuildItem(dependency.getGroupId(), artifactId));
// Include crypto exchange metadata resources
String[] split = artifactId.split("-");
if (split.length > 1) {
String cryptoExchange = split[split.length - 1];
nativeImageResource.produce(new NativeImageResourceBuildItem(cryptoExchange + ".json"));
}
}
}
indexedDependency.produce(new IndexDependencyBuildItem("org.jboss.spec.javax.ws.rs", "jboss-jaxrs-api_2.1_spec"));
}
Aggregations