public void loadProvidedPropertiesIfAvailable ( File providedPropertiesFile , boolean replaceAllProperties ) throws MojoExecutionException { if ( providedPropertiesFile . exists ( ) ) { Properties providedPropertySet = loadPropertiesFile ( providedPropertiesFile ) ; if ( replaceAllProperties ) { this . properties = providedPropertySet ; } else { this . properties . putAll ( providedPropertySet ) ; } } }
Check if a file exists . If it does calculate if we need to merge it with existing properties or replace all existing properties .