Closed AlexeySanko closed 6 years ago
Plugin uses method project.expand for placeholders. But this method works only with project.properties, which doesn't inlcude name and version (it's attributes).
filter_resource
uses next wrapper which could be used
class ProjectDictWrapper(object):
def __init__(self, project, logger):
self.project = project
self.logger = logger
def __getitem__(self, key):
fallback_when_no_substitution_possible = "${%s}" % key
if hasattr(self.project, key):
return getattr(self.project, key)
if self.project.has_property(key):
return self.project.get_property(key)
self.logger.warn(
"Skipping impossible substitution for '{0}' - there is no matching project attribute or property.".format(key))
return fallback_when_no_substitution_possible
Merged in #9.