@Test public void initPluginTest() { InitContext initContext = mockInitContextForCore( Lists.newArrayList("META-INF/configuration/file.yaml", "bad.yaml"), Lists.newArrayList("META-INF/configuration/file.yml", "bad.yml"), Lists.newArrayList("META-INF/configuration/file.json", "bad.json"), Lists.newArrayList("META-INF/configuration/file.properties", "bad.properties") ); configurationPlugin.init(initContext); }
@SuppressWarnings("unchecked") @Override public InitState init(InitContext initContext) { Set<String> activeProfiles = ProfileProcessor.activeProfiles(); if (activeProfiles.isEmpty()) { LOGGER.info("No configuration profile is active"); } else { LOGGER.info("Active configuration profile(s): {}", String.join(", ", activeProfiles)); } detectKernelParamConfig(initContext); detectConfigurationFiles(initContext); CliContext cliContext = seedRuntime.contextAs(CliContext.class); application = new ApplicationImpl(coffig, initContext.kernelParams(), cliContext != null ? cliContext.getArgs() : new String[0]); configConfig = coffig.get(ConfigConfig.class); diagnosticManager.registerDiagnosticInfoCollector("application", new ApplicationDiagnosticCollector(application)); return InitState.INITIALIZED; }
ConfigurationPlugin extends AbstractPlugin implements ApplicationProvider { @SuppressWarnings("unchecked") @Override public InitState init(InitContext initContext) { Set<String> activeProfiles = ProfileProcessor.activeProfiles(); if (activeProfiles.isEmpty()) { LOGGER.info("No configuration profile is active"); } else { LOGGER.info("Active configuration profile(s): {}", String.join(", ", activeProfiles)); } detectKernelParamConfig(initContext); detectConfigurationFiles(initContext); CliContext cliContext = seedRuntime.contextAs(CliContext.class); application = new ApplicationImpl(coffig, initContext.kernelParams(), cliContext != null ? cliContext.getArgs() : new String[0]); configConfig = coffig.get(ConfigConfig.class); diagnosticManager.registerDiagnosticInfoCollector("application", new ApplicationDiagnosticCollector(application)); return InitState.INITIALIZED; } }
ConfigurationPlugin extends AbstractPlugin implements ApplicationProvider { @SuppressWarnings("unchecked") @Override public InitState init(InitContext initContext) { Set<String> activeProfiles = ProfileProcessor.activeProfiles(); if (activeProfiles.isEmpty()) { LOGGER.info("No configuration profile is active"); } else { LOGGER.info("Active configuration profile(s): {}", String.join(", ", activeProfiles)); } detectKernelParamConfig(initContext); detectConfigurationFiles(initContext); CliContext cliContext = seedRuntime.contextAs(CliContext.class); application = new ApplicationImpl(coffig, initContext.kernelParams(), cliContext != null ? cliContext.getArgs() : new String[0]); configConfig = coffig.get(ConfigConfig.class); diagnosticManager.registerDiagnosticInfoCollector("application", new ApplicationDiagnosticCollector(application)); return InitState.INITIALIZED; }  }
ConfigurationPlugin extends AbstractPlugin implements ApplicationProvider { @SuppressWarnings("unchecked") @Override public InitState init(InitContext initContext) { Set<String> activeProfiles = ProfileProcessor.activeProfiles(); if (activeProfiles.isEmpty()) { LOGGER.info("No configuration profile is active"); } else { LOGGER.info("Active configuration profile(s): {}", String.join(", ", activeProfiles)); } detectKernelParamConfig(initContext); detectConfigurationFiles(initContext); CliContext cliContext = seedRuntime.contextAs(CliContext.class); application = new ApplicationImpl(coffig, initContext.kernelParams(), cliContext != null ? cliContext.getArgs() : new String[0]); configConfig = coffig.get(ConfigConfig.class); diagnosticManager.registerDiagnosticInfoCollector("application", new ApplicationDiagnosticCollector(application)); return InitState.INITIALIZED; }  @Override String name(); @Override void provideContainerContext(Object containerContext); @Override String pluginPackageRoot(); @Override Collection<ClasspathScanRequest> classpathScanRequests(); @SuppressWarnings("unchecked") @Override InitState init(InitContext initContext); @Override void start(Context context); @Override void stop(); @Override Object nativeUnitModule(); @Override Application getApplication(); }
ConfigurationPlugin extends AbstractPlugin implements ApplicationProvider { @SuppressWarnings("unchecked") @Override public InitState init(InitContext initContext) { Set<String> activeProfiles = ProfileProcessor.activeProfiles(); if (activeProfiles.isEmpty()) { LOGGER.info("No configuration profile is active"); } else { LOGGER.info("Active configuration profile(s): {}", String.join(", ", activeProfiles)); } detectKernelParamConfig(initContext); detectConfigurationFiles(initContext); CliContext cliContext = seedRuntime.contextAs(CliContext.class); application = new ApplicationImpl(coffig, initContext.kernelParams(), cliContext != null ? cliContext.getArgs() : new String[0]); configConfig = coffig.get(ConfigConfig.class); diagnosticManager.registerDiagnosticInfoCollector("application", new ApplicationDiagnosticCollector(application)); return InitState.INITIALIZED; }  @Override String name(); @Override void provideContainerContext(Object containerContext); @Override String pluginPackageRoot(); @Override Collection<ClasspathScanRequest> classpathScanRequests(); @SuppressWarnings("unchecked") @Override InitState init(InitContext initContext); @Override void start(Context context); @Override void stop(); @Override Object nativeUnitModule(); @Override Application getApplication(); static final String NAME; }