Skip to content

Commit

Permalink
#529 Add comment on the new function and refine the code
Browse files Browse the repository at this point in the history
  • Loading branch information
Li committed Mar 15, 2017
1 parent aaac5fc commit c357ab6
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/packagedcode/maven.py
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,12 @@ def pom_version(location):


def replace_variables_in_pom(variable, pom):
"""
Return the mapped variable value from the passed pom dictionary.
The passing variable could be '${project.artifactId}', and it would be
mapped to maven_component_artifact_id first, and then search by key-value
from the dictionary pom.
"""
if not variable:
return variable
mapped_key = MAVEN_VARIABLES_MAP.get(variable)
Expand Down Expand Up @@ -536,8 +542,8 @@ def parse_pom(location, fields=MAVEN_FIELDS):
except Exception, e:
msg = ('Failed error:\n%(e)r' % locals())
logger.debug(' resolve_dependency: ' + msg)

pom['maven_dependencies'] = maven_dependencies

return pom


Expand Down

0 comments on commit c357ab6

Please sign in to comment.