当前位置: 首页>>代码示例>>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;未经允许,请勿转载。