@Test public void shouldLoadFromSystemProperties() throws LifecycleExecutionException, URISyntaxException { System.setProperty(ExtensionSettings.DEPENDENCIES_SETTING_KEY, "org.foo:foo-artifact:1.0.0,org.bar:bar-artifact:1.5.0"); List<Dependency> dependencyList = loader.load(properties, logger); TestHelper.verifyDependencies(dependencyList); }
@Override public List<Dependency> load(Properties properties, Logger logger) throws LifecycleExecutionException { List<Dependency> dependencyList = new ArrayList<>(); String coordinates = System.getProperty(ExtensionSettings.DEPENDENCIES_SETTING_KEY, ""); if (coordinates.length() > 0) { for (String coordinate : coordinates.split(",")) { dependencyList.add(build(coordinate, properties, logger)); } if (!dependencyList.isEmpty()) { logger.info(String.format("Add %s dependencies found in system properties", dependencyList.size())); } } return dependencyList; }
SystemPropertyDependencyLoader implements DependencyLoader { @Override public List<Dependency> load(Properties properties, Logger logger) throws LifecycleExecutionException { List<Dependency> dependencyList = new ArrayList<>(); String coordinates = System.getProperty(ExtensionSettings.DEPENDENCIES_SETTING_KEY, ""); if (coordinates.length() > 0) { for (String coordinate : coordinates.split(",")) { dependencyList.add(build(coordinate, properties, logger)); } if (!dependencyList.isEmpty()) { logger.info(String.format("Add %s dependencies found in system properties", dependencyList.size())); } } return dependencyList; } }
SystemPropertyDependencyLoader implements DependencyLoader { @Override public List<Dependency> load(Properties properties, Logger logger) throws LifecycleExecutionException { List<Dependency> dependencyList = new ArrayList<>(); String coordinates = System.getProperty(ExtensionSettings.DEPENDENCIES_SETTING_KEY, ""); if (coordinates.length() > 0) { for (String coordinate : coordinates.split(",")) { dependencyList.add(build(coordinate, properties, logger)); } if (!dependencyList.isEmpty()) { logger.info(String.format("Add %s dependencies found in system properties", dependencyList.size())); } } return dependencyList; }  }
SystemPropertyDependencyLoader implements DependencyLoader { @Override public List<Dependency> load(Properties properties, Logger logger) throws LifecycleExecutionException { List<Dependency> dependencyList = new ArrayList<>(); String coordinates = System.getProperty(ExtensionSettings.DEPENDENCIES_SETTING_KEY, ""); if (coordinates.length() > 0) { for (String coordinate : coordinates.split(",")) { dependencyList.add(build(coordinate, properties, logger)); } if (!dependencyList.isEmpty()) { logger.info(String.format("Add %s dependencies found in system properties", dependencyList.size())); } } return dependencyList; }  @Override List<Dependency> load(Properties properties, Logger logger); }
SystemPropertyDependencyLoader implements DependencyLoader { @Override public List<Dependency> load(Properties properties, Logger logger) throws LifecycleExecutionException { List<Dependency> dependencyList = new ArrayList<>(); String coordinates = System.getProperty(ExtensionSettings.DEPENDENCIES_SETTING_KEY, ""); if (coordinates.length() > 0) { for (String coordinate : coordinates.split(",")) { dependencyList.add(build(coordinate, properties, logger)); } if (!dependencyList.isEmpty()) { logger.info(String.format("Add %s dependencies found in system properties", dependencyList.size())); } } return dependencyList; }  @Override List<Dependency> load(Properties properties, Logger logger);  }