本文整理汇总了Python中maven_artifact.MavenArtifact.getGA方法的典型用法代码示例。如果您正苦于以下问题:Python MavenArtifact.getGA方法的具体用法?Python MavenArtifact.getGA怎么用?Python MavenArtifact.getGA使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类maven_artifact.MavenArtifact
的用法示例。
在下文中一共展示了MavenArtifact.getGA方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _filterExcludedRepositories
# 需要导入模块: from maven_artifact import MavenArtifact [as 别名]
# 或者: from maven_artifact.MavenArtifact import getGA [as 别名]
def _filterExcludedRepositories(self, artifactList):
"""
Filter artifactList removing artifacts existing in specified repositories.
:param artifactList: artifactList to be filtered.
:returns: artifactList without artifacts that exists in specified repositories.
"""
logging.debug("Filtering artifacts contained in excluded repositories.")
pool = ThreadPool(maven_repo_util.MAX_THREADS)
# Contains artifact to be removed
delArtifacts = []
for ga in artifactList.keys():
groupId = ga.split(':')[0]
artifactId = ga.split(':')[1]
for priority in artifactList[ga].keys():
for version in artifactList[ga][priority].keys():
artifact = MavenArtifact(groupId, artifactId, "pom", version)
pool.apply_async(
_artifactInRepos,
[self.config.excludedRepositories, artifact, priority, delArtifacts]
)
# Close the pool and wait for the workers to finnish
pool.close()
pool.join()
for artifact, priority in delArtifacts:
ga = artifact.getGA()
logging.debug("Dropping GAV %s:%s from priority %i because it was found in an excluded repository.",
ga, artifact.version, priority)
del artifactList[ga][priority][artifact.version]
if not artifactList[ga][priority]:
logging.debug("Dropping GA %s from priority %i because of no version left.", ga, priority)
del artifactList[ga][priority]
if not artifactList[ga]:
logging.debug("Dropping GA %s because of no priority left.", ga)
del artifactList[ga]
return artifactList