當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。