本文整理匯總了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])