@Test public void testInterpolateWithEmptyProperties() { parser.interpolate(new Properties(), null); }
protected void interpolate(Properties properties, File baseDir) { if (properties.isEmpty()) { return; } MavenSession mavenSession = legacySupport.getSession(); if (mavenSession == null) { logger.warn("No maven session available, values in the build.properties will not be interpolated!"); return; } MavenProject mavenProject = MavenSessionUtils.getMavenProject(mavenSession, baseDir); if (mavenProject == null) { logger.warn("No maven project found for baseDir '" + baseDir.getAbsolutePath() + "', values in the build.properties will not be interpolated!"); return; } TychoInterpolator interpolator = new TychoInterpolator(mavenSession, mavenProject); for (Entry<Object, Object> entry : properties.entrySet()) { entry.setValue(interpolator.interpolate((String) entry.getValue())); } }
BuildPropertiesParserImpl implements BuildPropertiesParser, Disposable { protected void interpolate(Properties properties, File baseDir) { if (properties.isEmpty()) { return; } MavenSession mavenSession = legacySupport.getSession(); if (mavenSession == null) { logger.warn("No maven session available, values in the build.properties will not be interpolated!"); return; } MavenProject mavenProject = MavenSessionUtils.getMavenProject(mavenSession, baseDir); if (mavenProject == null) { logger.warn("No maven project found for baseDir '" + baseDir.getAbsolutePath() + "', values in the build.properties will not be interpolated!"); return; } TychoInterpolator interpolator = new TychoInterpolator(mavenSession, mavenProject); for (Entry<Object, Object> entry : properties.entrySet()) { entry.setValue(interpolator.interpolate((String) entry.getValue())); } } }
BuildPropertiesParserImpl implements BuildPropertiesParser, Disposable { protected void interpolate(Properties properties, File baseDir) { if (properties.isEmpty()) { return; } MavenSession mavenSession = legacySupport.getSession(); if (mavenSession == null) { logger.warn("No maven session available, values in the build.properties will not be interpolated!"); return; } MavenProject mavenProject = MavenSessionUtils.getMavenProject(mavenSession, baseDir); if (mavenProject == null) { logger.warn("No maven project found for baseDir '" + baseDir.getAbsolutePath() + "', values in the build.properties will not be interpolated!"); return; } TychoInterpolator interpolator = new TychoInterpolator(mavenSession, mavenProject); for (Entry<Object, Object> entry : properties.entrySet()) { entry.setValue(interpolator.interpolate((String) entry.getValue())); } } BuildPropertiesParserImpl(); protected  BuildPropertiesParserImpl(LegacySupport legacySupport, Logger logger); }
BuildPropertiesParserImpl implements BuildPropertiesParser, Disposable { protected void interpolate(Properties properties, File baseDir) { if (properties.isEmpty()) { return; } MavenSession mavenSession = legacySupport.getSession(); if (mavenSession == null) { logger.warn("No maven session available, values in the build.properties will not be interpolated!"); return; } MavenProject mavenProject = MavenSessionUtils.getMavenProject(mavenSession, baseDir); if (mavenProject == null) { logger.warn("No maven project found for baseDir '" + baseDir.getAbsolutePath() + "', values in the build.properties will not be interpolated!"); return; } TychoInterpolator interpolator = new TychoInterpolator(mavenSession, mavenProject); for (Entry<Object, Object> entry : properties.entrySet()) { entry.setValue(interpolator.interpolate((String) entry.getValue())); } } BuildPropertiesParserImpl(); protected  BuildPropertiesParserImpl(LegacySupport legacySupport, Logger logger); @Override BuildProperties parse(File baseDir); @Override void dispose(); }
BuildPropertiesParserImpl implements BuildPropertiesParser, Disposable { protected void interpolate(Properties properties, File baseDir) { if (properties.isEmpty()) { return; } MavenSession mavenSession = legacySupport.getSession(); if (mavenSession == null) { logger.warn("No maven session available, values in the build.properties will not be interpolated!"); return; } MavenProject mavenProject = MavenSessionUtils.getMavenProject(mavenSession, baseDir); if (mavenProject == null) { logger.warn("No maven project found for baseDir '" + baseDir.getAbsolutePath() + "', values in the build.properties will not be interpolated!"); return; } TychoInterpolator interpolator = new TychoInterpolator(mavenSession, mavenProject); for (Entry<Object, Object> entry : properties.entrySet()) { entry.setValue(interpolator.interpolate((String) entry.getValue())); } } BuildPropertiesParserImpl(); protected  BuildPropertiesParserImpl(LegacySupport legacySupport, Logger logger); @Override BuildProperties parse(File baseDir); @Override void dispose();  }