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


Java ResourcesType類代碼示例

本文整理匯總了Java中org.jboss.shrinkwrap.descriptor.api.jbossmodule13.ResourcesType的典型用法代碼示例。如果您正苦於以下問題:Java ResourcesType類的具體用法?Java ResourcesType怎麽用?Java ResourcesType使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


ResourcesType類屬於org.jboss.shrinkwrap.descriptor.api.jbossmodule13包,在下文中一共展示了ResourcesType類的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getDependencies

import org.jboss.shrinkwrap.descriptor.api.jbossmodule13.ResourcesType; //導入依賴的package包/類
public List<ArtifactSpec> getDependencies() {
    if (this.module == null) {
        return Collections.emptyList();
    }

    List<ArtifactType<ResourcesType<ModuleDescriptor>>> artifacts = this.module.getOrCreateResources().getAllArtifact();

    List<ArtifactSpec> dependencies = new ArrayList<>();

    String localRepo = System.getProperty("maven.repo.local", DEFAULT_LOCAL_REPO);

    for (ArtifactType<ResourcesType<ModuleDescriptor>> artifact : artifacts) {
        ArtifactSpec dep = ArtifactSpec.fromMscGav(artifact.getName());

        File file = Paths.get(localRepo, dep.jarRepoPath()).toFile();
        if (!file.exists()) {
            dep.shouldGather = true;
        } else {
            dep.file = file;
            dep.shouldGather = false;
        }
        dependencies.add(dep);
    }

    return dependencies;
}
 
開發者ID:wildfly-swarm,項目名稱:wildfly-swarm,代碼行數:27,代碼來源:ModuleAnalyzer.java

示例2: getDependencies

import org.jboss.shrinkwrap.descriptor.api.jbossmodule13.ResourcesType; //導入依賴的package包/類
public List<DependencyMetadata> getDependencies() {
    if (this.module == null) {
        return Collections.emptyList();
    }

    List<ArtifactType<ResourcesType<ModuleDescriptor>>> artifacts = this.module.getOrCreateResources().getAllArtifact();

    List<DependencyMetadata> dependencies = new ArrayList<>();

    for (ArtifactType<ResourcesType<ModuleDescriptor>> artifact : artifacts) {
        String name = artifact.getName();
        if (!name.contains("$")) {
            DependencyMetadata dep = DependencyMetadata.fromMscGav(artifact.getName());
            dependencies.add(dep);
        }
    }

    return dependencies;
}
 
開發者ID:wildfly-swarm,項目名稱:wildfly-swarm-fraction-plugin,代碼行數:20,代碼來源:ModuleAnalyzer.java

示例3: getDependencies

import org.jboss.shrinkwrap.descriptor.api.jbossmodule13.ResourcesType; //導入依賴的package包/類
public List<ArtifactSpec> getDependencies() {
    if (this.module == null) {
        return Collections.emptyList();
    }

    List<ArtifactType<ResourcesType<ModuleDescriptor>>> artifacts = this.module.getOrCreateResources().getAllArtifact();

    List<ArtifactSpec> dependencies = new ArrayList<>();

    for (ArtifactType<ResourcesType<ModuleDescriptor>> artifact : artifacts) {
        ArtifactSpec dep = ArtifactSpec.fromMscGav(artifact.getName());
        dep.shouldGather = true;
        dependencies.add(dep);
    }

    return dependencies;
}
 
開發者ID:wildfly-swarm-archive,項目名稱:ARCHIVE-wildfly-swarm,代碼行數:18,代碼來源:ModuleAnalyzer.java


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