本文整理汇总了Java中org.jboss.shrinkwrap.api.container.LibraryContainer类的典型用法代码示例。如果您正苦于以下问题:Java LibraryContainer类的具体用法?Java LibraryContainer怎么用?Java LibraryContainer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
LibraryContainer类属于org.jboss.shrinkwrap.api.container包,在下文中一共展示了LibraryContainer类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: munge
import org.jboss.shrinkwrap.api.container.LibraryContainer; //导入依赖的package包/类
private <C extends LibraryContainer<?> & ManifestContainer<?>> void munge(C container, DeclaredDependencies declaredDependencies) {
for (ArtifactSpec artifact : declaredDependencies.getRuntimeExplicitAndTransientDependencies()) {
assert artifact.file != null : "artifact.file cannot be null at this point: " + artifact;
container.addAsLibrary(artifact.file);
}
try {
MarkerContainer.addMarker(container, "org.wildfly.swarm.allDependencies.added");
} catch (Exception e) {
throw new RuntimeException(e);
}
}
开发者ID:wildfly-swarm,项目名称:wildfly-swarm,代码行数:13,代码来源:UberjarSimpleContainer.java
示例2: addMavenDependencies
import org.jboss.shrinkwrap.api.container.LibraryContainer; //导入依赖的package包/类
public static void addMavenDependencies(LibraryContainer<?> archive, String... dependencies) {
for (String dependency : dependencies) {
for (JavaArchive lib : Maven.resolver().resolve(dependency).withTransitivity().as(JavaArchive.class)) {
archive.addAsLibrary(lib);
}
}
}
开发者ID:gonmarques,项目名称:cdi-properties,代码行数:8,代码来源:IntegrationTestDeploymentUtils.java
示例3: addGaeAsLibrary
import org.jboss.shrinkwrap.api.container.LibraryContainer; //导入依赖的package包/类
public void addGaeAsLibrary(LibraryContainer deployment) {
addLibrary(deployment, "com.google.appengine:appengine-api-1.0-sdk");
}
开发者ID:GoogleCloudPlatform,项目名称:appengine-tck,代码行数:4,代码来源:LibUtils.java
示例4: addLibrary
import org.jboss.shrinkwrap.api.container.LibraryContainer; //导入依赖的package包/类
public void addLibrary(LibraryContainer deployment, String groupId, String artifactId) {
addLibrary(deployment, groupId + ":" + artifactId);
}
开发者ID:GoogleCloudPlatform,项目名称:appengine-tck,代码行数:4,代码来源:LibUtils.java
示例5: wrap
import org.jboss.shrinkwrap.api.container.LibraryContainer; //导入依赖的package包/类
public static LibraryContainer wrap(final org.jboss.shrinkwrap.api.Archive<?> archive) {
if (!(LibraryContainer.class.isInstance(archive))) {
throw new IllegalArgumentException("Unsupported archive type: " + archive.getClass().getName());
}
return (LibraryContainer) archive;
}
开发者ID:apache,项目名称:tomee,代码行数:7,代码来源:Enrichers.java
示例6: build
import org.jboss.shrinkwrap.api.container.LibraryContainer; //导入依赖的package包/类
public <T extends Archive<?>> T build(final Class<T> type) {
initDefaults();
final T webArchive = ShrinkWrap.create(type, name);
if (basePackage != null) {
if (ClassContainer.class.isInstance(webArchive)) {
final ClassContainer<?> container = ClassContainer.class.cast(webArchive);
if (filter != null) {
container.addPackages(true, filter, basePackage);
} else {
container.addPackages(true, basePackage);
}
}
}
final String root;
if (WebContainer.class.isInstance(webArchive)) {
root = "/WEB-INF/classes";
} else {
root = "/";
}
add(webArchive, classes, root)
.add(webArchive, resources, root)
.add(webArchive, webapp, "/");
for (final Map.Entry<File, String> additionalResource : additionalResources.entrySet()) {
add(webArchive, additionalResource.getKey(), additionalResource.getValue());
}
if (LibraryContainer.class.isInstance(webArchive)) {
try {
final File[] deps = Maven.configureResolver().workOffline().loadPomFromFile(new File(basedir, "pom.xml"))
.importDependencies(scopes).resolve().withTransitivity().asFile();
if (deps.length > 0) {
LibraryContainer.class.cast(webArchive).addAsLibraries(deps);
}
} catch (final Exception e) {
// no-op: no deps
}
}
return webArchive;
}
开发者ID:apache,项目名称:tomee,代码行数:45,代码来源:Mvn.java
注:本文中的org.jboss.shrinkwrap.api.container.LibraryContainer类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论