@Override public void applyDependencies(DependencyCustomizer dependencies) { dependencies.ifAnyMissingClasses("org.springframework.jdbc.core.JdbcTemplate") .add("spring-boot-starter-jdbc"); }
public String getVersion(String artifactId) { return getVersion(artifactId, ""); }
@Override public void applyDependencies(DependencyCustomizer dependencies) throws CompilationFailedException { dependencies.add("spring-context-support"); }
/** * Add a single dependency with the specified classifier and type and, optionally, all * of its dependencies. The group ID and version of the dependency are resolved from * the module by using the customizer's {@link ArtifactCoordinatesResolver}. * @param module the module ID * @param classifier the classifier, may be {@code null} * @param type the type, may be {@code null} * @param transitive {@code true} if the transitive dependencies should also be added, * otherwise {@code false} * @return this {@link DependencyCustomizer} for continued use */ public DependencyCustomizer add(String module, String classifier, String type, boolean transitive) { if (canAdd()) { ArtifactCoordinatesResolver artifactCoordinatesResolver = this.dependencyResolutionContext .getArtifactCoordinatesResolver(); this.classNode.addAnnotation( createGrabAnnotation(artifactCoordinatesResolver.getGroupId(module), artifactCoordinatesResolver.getArtifactId(module), artifactCoordinatesResolver.getVersion(module), classifier, type, transitive)); } return this; }
@Override protected boolean canAdd() { for (String path : paths) { try { if (DependencyCustomizer.this.loader.getResource(path) == null) { return false; } return true; } catch (Exception ex) { // swallow exception and continue } } return DependencyCustomizer.this.canAdd(); } };
private void visitModule(ModuleNode module) { DependencyCustomizer dependencies = new DependencyCustomizer(this.loader, module, this.dependencyResolutionContext); for (ClassNode classNode : module.getClasses()) { for (CompilerAutoConfiguration autoConfiguration : this.compilerAutoConfigurations) { if (autoConfiguration.matches(classNode)) { autoConfiguration.applyDependencies(dependencies); } } } }
/** * Add dependencies and all of their dependencies. The group ID and version of the * dependencies are resolved from the modules using the customizer's * {@link ArtifactCoordinatesResolver}. * @param modules the module IDs * @return this {@link DependencyCustomizer} for continued use */ public DependencyCustomizer add(String... modules) { for (String module : modules) { add(module, null, null, true); } return this; }
@Override protected boolean canAdd() { for (String className : classNames) { try { DependencyCustomizer.this.loader.loadClass(className); return false; } catch (Exception ex) { // swallow exception and continue } } return DependencyCustomizer.this.canAdd(); } };
@Override public void applyDependencies(DependencyCustomizer dependencies) { dependencies .ifAnyMissingClasses( "org.springframework.cloud.stream.binder.kafka.config.KafkaServiceAutoConfiguration") .add("spring-cloud-starter-stream-kafka"); }
/** * Add a single dependency and, optionally, all of its dependencies. The group ID and * version of the dependency are resolved from the module using the customizer's * {@link ArtifactCoordinatesResolver}. * @param module the module ID * @param transitive {@code true} if the transitive dependencies should also be added, * otherwise {@code false} * @return this {@link DependencyCustomizer} for continued use */ public DependencyCustomizer add(String module, boolean transitive) { return add(module, null, null, transitive); }
@Override protected boolean canAdd() { for (String path : paths) { try { if (DependencyCustomizer.this.loader.getResource(path) != null) { return true; } return false; } catch (Exception ex) { // swallow exception and continue } } return DependencyCustomizer.this.canAdd(); } };
@Override public void applyDependencies(DependencyCustomizer dependencies) { dependencies .ifAnyMissingClasses( "org.springframework.transaction.annotation.Transactional") .add("spring-tx", "spring-boot-starter-aop"); }
@Override public void applyDependencies(DependencyCustomizer dependencies) throws CompilationFailedException { dependencies.add("spring-rabbit"); }
@Override public void applyDependencies(DependencyCustomizer dependencies) { dependencies.ifAnyMissingClasses("org.springframework.boot.SpringApplication") .add("spring-boot-starter"); }
@Override public void applyDependencies(DependencyCustomizer dependencies) throws CompilationFailedException { dependencies.add("spring-jms", "javax.jms-api"); }
@Override public void applyDependencies(DependencyCustomizer dependencies) { dependencies.ifAnyMissingClasses("org.springframework.batch.core.Job") .add("spring-boot-starter-batch"); dependencies.ifAnyMissingClasses("org.springframework.jdbc.core.JdbcTemplate") .add("spring-jdbc"); }
@Override public void applyDependencies(DependencyCustomizer dependencies) throws CompilationFailedException { dependencies.add("ratpack-groovy") .add("ratpack-core") // This one needs a full module spec including version ('spring-boot-*' is special) .add("org.springframework.boot:spring-boot-ratpack:" + RatpackVersionsAstTransformation.getVersion()); }
@Override public void applyDependencies(DependencyCustomizer dependencies) { dependencies.ifAnyMissingClasses( "org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker") .add("spring-cloud-starter-netflix-hystrix"); }
@Override public void applyDependencies(DependencyCustomizer dependencies) { dependencies .ifAnyMissingClasses("org.springframework.cloud.config.server.EnableConfigServer") .add("spring-cloud-config-server"); }
@Override public void applyDependencies(DependencyCustomizer dependencies) { dependencies.ifAnyMissingClasses("groovy.text.TemplateEngine") .add("groovy-templates"); }