當前位置: 首頁>>代碼示例>>Python>>正文


Python MavenArtifact.snapshotVersionSuffix方法代碼示例

本文整理匯總了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)
開發者ID:jboss-eap,項目名稱:maven-repository-builder,代碼行數:27,代碼來源:artifact_list_builder.py

示例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])
開發者ID:wfkbuilder,項目名稱:maven-repository-builder,代碼行數:11,代碼來源:artifact_list_builder.py


注:本文中的maven_artifact.MavenArtifact.snapshotVersionSuffix方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。