本文整理汇总了Python中maven_artifact.MavenArtifact.snapshotVersionSuffix方法的典型用法代码示例。如果您正苦于以下问题:Python MavenArtifact.snapshotVersionSuffix方法的具体用法?Python MavenArtifact.snapshotVersionSuffix怎么用?Python MavenArtifact.snapshotVersionSuffix使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类maven_artifact.MavenArtifact
的用法示例。
在下文中一共展示了MavenArtifact.snapshotVersionSuffix方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _addArtifact
# 需要导入模块: from maven_artifact import MavenArtifact [as 别名]
# 或者: from maven_artifact.MavenArtifact import snapshotVersionSuffix [as 别名]
def _addArtifact(self, artifacts, groupId, artifactId, version, extsAndClass, suffix, url):
pomMain = True
# The pom is main only if no other main artifact is available
if len(extsAndClass) > 1 and self._containsMainArtifact(extsAndClass) and "pom" in extsAndClass:
pomMain = False
artTypes = []
for ext, classifiers in extsAndClass.iteritems():
main = ext == "pom" and pomMain
if not main:
for classifier in classifiers:
extClassifier = "%s:%s" % (ext, classifier or "")
main = extClassifier not in self.notMainExtClassifiers
if main:
break
artTypes.append(ArtifactType(ext, main, classifiers))
mavenArtifact = MavenArtifact(groupId, artifactId, None, version)
if suffix is not None:
mavenArtifact.snapshotVersionSuffix = suffix
if mavenArtifact in artifacts:
artifacts[mavenArtifact].merge(ArtifactSpec(url, artTypes))
else:
logging.debug("Adding artifact %s", str(mavenArtifact))
artifacts[mavenArtifact] = ArtifactSpec(url, artTypes)
示例2: _addArtifact
# 需要导入模块: from maven_artifact import MavenArtifact [as 别名]
# 或者: from maven_artifact.MavenArtifact import snapshotVersionSuffix [as 别名]
def _addArtifact(self, artifacts, groupId, artifactId, version, extsAndClass, suffix, url):
if len(extsAndClass) > 1 and self._containsNonPomWithoutClassifier(extsAndClass) and "pom" in extsAndClass:
del extsAndClass["pom"]
for ext in extsAndClass:
mavenArtifact = MavenArtifact(groupId, artifactId, ext, version)
if suffix is not None:
mavenArtifact.snapshotVersionSuffix = suffix
logging.debug("Adding artifact %s", str(mavenArtifact))
artifacts[mavenArtifact] = ArtifactSpec(url, extsAndClass[ext])