当前位置: 首页>>代码示例>>Java>>正文


Java RepositoryPolicy类代码示例

本文整理汇总了Java中org.netbeans.modules.maven.model.pom.RepositoryPolicy的典型用法代码示例。如果您正苦于以下问题:Java RepositoryPolicy类的具体用法?Java RepositoryPolicy怎么用?Java RepositoryPolicy使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


RepositoryPolicy类属于org.netbeans.modules.maven.model.pom包,在下文中一共展示了RepositoryPolicy类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: visit

import org.netbeans.modules.maven.model.pom.RepositoryPolicy; //导入依赖的package包/类
@Override
@Messages({"ENABLED=Enabled", "UPDATE_POLICY=Update Policy", "CHECKSUM_POLICY=Checksum Policy"})
public void visit(RepositoryPolicy target) {
    RepositoryPolicy t = target;
    assert t != null ? t.isInDocumentModel() : true;
    POMQNames names = parent.getPOMQNames();
    checkChildString(names.ENABLED, ENABLED(), t != null ? (t.isEnabled() != null ? t.isEnabled().toString() : null) : null);
    checkChildString(names.UPDATEPOLICY, UPDATE_POLICY(), t != null ? t.getUpdatePolicy() : null);
    checkChildString(names.CHECKSUMPOLICY, CHECKSUM_POLICY(), t != null ? t.getChecksumPolicy() : null);

    count++;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:13,代码来源:POMModelVisitor.java

示例2: registerRepository

import org.netbeans.modules.maven.model.pom.RepositoryPolicy; //导入依赖的package包/类
private void registerRepository() {
    if (sourceModel.getRepositories().size() > 0) {
        operations.add(pomModel -> {
            Set<String> existingRepositories = getPOMProject().getRepositories() != null ? 
                    getPOMProject().getRepositories()
                            .stream()
                            .map(Repository::getId)
                            .collect(toSet()) 
                    : Collections.EMPTY_SET;
            for (org.apache.maven.model.Repository repository : sourceModel.getRepositories()) {
                if (!existingRepositories.contains(repository.getId())) {
                    Repository repo = pomModel.getFactory().createRepository();
                    repo.setId(repository.getId());//isSnapshot ? MavenNbModuleImpl.NETBEANS_SNAPSHOT_REPO_ID : MavenNbModuleImpl.NETBEANS_REPO_ID);
                    repo.setName(repository.getName());
                    repo.setLayout(repository.getLayout());
                    repo.setUrl(repository.getUrl());
                    if (repository.getSnapshots() != null) {
                        RepositoryPolicy policy = pomModel.getFactory().createReleaseRepositoryPolicy();
                        policy.setEnabled(Boolean.valueOf(repository.getSnapshots().getEnabled()));
                        repo.setReleases(policy);
                    }
                    getPOMProject().addRepository(repo);
                }
            }
        });
    }
}
 
开发者ID:jeddict,项目名称:jCode,代码行数:28,代码来源:POMManager.java

示例3: fillRepository

import org.netbeans.modules.maven.model.pom.RepositoryPolicy; //导入依赖的package包/类
private void fillRepository(JsonNode depsMeta, String repoId, Repository repository) {
    JsonNode repoInfo = depsMeta.path("repositories").path(repoId);
    repository.setId(repoId);
    repository.setName(repoInfo.path("name").asText());
    repository.setUrl(repoInfo.path("url").asText());
    // set repository policies (release, snapshots)
    if (repoInfo.hasNonNull("snapshotEnabled")) {
        RepositoryPolicy snapshots = model.getFactory().createSnapshotRepositoryPolicy();
        snapshots.setEnabled(repoInfo.get("snapshotEnabled").asBoolean());
        repository.setSnapshots(snapshots);
    }
}
 
开发者ID:AlexFalappa,项目名称:nb-springboot,代码行数:13,代码来源:InjectSpringBootGenerator.java

示例4: visit

import org.netbeans.modules.maven.model.pom.RepositoryPolicy; //导入依赖的package包/类
@Override
public void visit(RepositoryPolicy target) {
    visitComponent(target);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:5,代码来源:DefaultVisitor.java


注:本文中的org.netbeans.modules.maven.model.pom.RepositoryPolicy类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。