本文整理匯總了Python中maven_artifact.MavenArtifact.getGAT方法的典型用法代碼示例。如果您正苦於以下問題:Python MavenArtifact.getGAT方法的具體用法?Python MavenArtifact.getGAT怎麽用?Python MavenArtifact.getGAT使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類maven_artifact.MavenArtifact
的用法示例。
在下文中一共展示了MavenArtifact.getGAT方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: _filterExcludedRepositories
# 需要導入模塊: from maven_artifact import MavenArtifact [as 別名]
# 或者: from maven_artifact.MavenArtifact import getGAT [as 別名]
def _filterExcludedRepositories(self, artifactList):
"""
Filter artifactList removing artifacts existing in specified repositories.
:param artifactList: artifactList to be filtered.
:returns: artifactList without arifacts 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 gat in artifactList.keys():
groupId = gat.split(':')[0]
artifactId = gat.split(':')[1]
artifactType = gat.split(':')[2]
for priority in artifactList[gat].keys():
for version in artifactList[gat][priority].keys():
artifact = MavenArtifact(groupId, artifactId, artifactType, version)
pool.apply_async(
_artifactInRepos,
[self.config.excludedRepositories, artifact, priority, delArtifacts]
)
if not artifactList[gat][priority]:
del artifactList[gat][priority]
if not artifactList[gat]:
del artifactList[gat]
# Close the pool and wait for the workers to finnish
pool.close()
pool.join()
for artifact, priority in delArtifacts:
del artifactList[artifact.getGAT()][priority][artifact.version]
return artifactList