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


Java PomEquippedResolveStage类代码示例

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


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

示例1: deployment

import org.jboss.shrinkwrap.resolver.api.maven.PomEquippedResolveStage; //导入依赖的package包/类
@Deployment
public static WebArchive deployment() {
  PomEquippedResolveStage pom = Maven.resolver().loadPomFromFile("pom.xml");

  String[] libraries = new String[]{"de.undercouch:actson", "commons-io:commons-io"};

  return ShrinkWrap.create(WebArchive.class)
    .addPackage(SingleItemPublisher.class.getPackage())
    .addPackage(Customer.class.getPackage())
    .addPackage(JsonConverter.class.getPackage())
    .addPackage(PublisherMessageBodyReader.class.getPackage())
    .addAsLibraries(pom.resolve(libraries).withTransitivity().asFile())
    .setWebXML(new StringAsset(Descriptors.create(WebAppDescriptor.class)
      .addDefaultNamespaces()
      .version("3.1")
      .exportAsString()));
}
 
开发者ID:openknowledge,项目名称:reactive-jax-rs,代码行数:18,代码来源:CustomerBatchUploadTest.java

示例2: create

import org.jboss.shrinkwrap.resolver.api.maven.PomEquippedResolveStage; //导入依赖的package包/类
@Deployment
public static WebArchive create()
{
    final PomEquippedResolveStage configureResolverViaPlugin = Maven.configureResolverViaPlugin();
    final File warFile = configureResolverViaPlugin.resolve("org.alfresco:alfresco:war:?").withoutTransitivity().asSingleFile();
    final File[] libraries = configureResolverViaPlugin
            .resolve(Arrays.asList("org.alfresco:alfresco-repository:jar:h2scripts:?", "com.h2database:h2:jar:?",
                    "de.acosix.alfresco.utility:de.acosix.alfresco.utility.common:jar:?",
                    "de.acosix.alfresco.utility:de.acosix.alfresco.utility.repo:jar:installable:?"))
            .withoutTransitivity().asFile();
    final WebArchive archive = ShrinkWrap.createFromZipFile(WebArchive.class, warFile);
    archive.addAsLibraries(libraries);

    archive.addAsLibrary("installable-de.acosix.alfresco.mtsupport.repo.jar");

    archive.addAsResource("configRoot/alfresco-global.properties", "alfresco-global.properties");
    archive.addAsResource("configRoot/log4j.properties", "log4j.properties");
    archive.addAsResource("configRoot/alfresco/extension/dev-log4j.properties", "alfresco/extension/dev-log4j.properties");
    archive.addAsResource("configRoot/alfresco/extension/subsystems/Authentication/mt-ldap/test/custom.properties",
            "alfresco/extension/subsystems/Authentication/mt-ldap/test/custom.properties");
    archive.addAsResource("configRoot/alfresco/extension/subsystems/Synchronization/default/default/custom.properties",
            "alfresco/extension/subsystems/Synchronization/default/default/custom.properties");
    return archive;
}
 
开发者ID:Acosix,项目名称:alfresco-mt-support,代码行数:25,代码来源:AuthenticationAndSynchronisationTests.java

示例3: resolveEjbs

import org.jboss.shrinkwrap.resolver.api.maven.PomEquippedResolveStage; //导入依赖的package包/类
private static Archive<?>[] resolveEjbs(PomEquippedResolveStage dependencies) {
   	List<Archive<?>> archives = new ArrayList<Archive<?>>();

   	MavenResolvedArtifact[] artifacts = dependencies.resolve().withTransitivity().asResolvedArtifact();

	for (MavenResolvedArtifact artifact : artifacts) {
		if (PackagingType.EJB.equals(artifact.getCoordinate().getType())) {
			String originalName = artifact.asFile().getName();
			String name = originalName.replace(".ejb", ".jar");
			JavaArchive ejbArchive = ShrinkWrap.createFromZipFile(JavaArchive.class, artifact.asFile());
			archives.add(ShrinkWrap.create(JavaArchive.class, name).merge(ejbArchive));
		} else {
			archives.add(ShrinkWrap.createFromZipFile(JavaArchive.class, artifact.asFile()));
		}
	}
   	
   	return archives.toArray(new Archive<?>[archives.size()]);
}
 
开发者ID:Blazebit,项目名称:blaze-storage,代码行数:19,代码来源:AbstractContainerTest.java

示例4: base

import org.jboss.shrinkwrap.resolver.api.maven.PomEquippedResolveStage; //导入依赖的package包/类
static WebArchive base(String warName) {
    PomEquippedResolveStage resolver = Maven.resolver().loadPomFromFile("pom.xml");
    return ShrinkWrap
            .create(WebArchive.class, warName + ".war")
            .addClasses(FRAMEWORK_CLASSES)
            .addAsLibraries(resolver.resolve("com.vaadin:vaadin-server:7.1.6").withoutTransitivity().asSingleFile())
            .addAsLibraries(resolver.resolve("com.vaadin:vaadin-shared:7.1.6").withoutTransitivity().asSingleFile())
            .addAsWebInfResource(new ByteArrayAsset(VaadinExtension.class.getName().getBytes()),
                    ArchivePaths.create("services/javax.enterprise.inject.spi.Extension"))
            .addAsWebInfResource(EmptyAsset.INSTANCE, ArchivePaths.create("beans.xml"));

    /*-
    MavenDependencyResolver resolver = DependencyResolvers.use(MavenDependencyResolver.class).loadMetadataFromPom(
            "pom.xml");
           
    return ShrinkWrap
            .create(WebArchive.class, warName + ".war")
            .addClasses(FRAMEWORK_CLASSES)
            .addAsLibraries(resolver.artifact("com.vaadin:vaadin-server:7.1.6").resolveAsFiles())
           .addAsLibraries(resolver.artifact("com.vaadin:vaadin-shared:7.1.6").resolveAsFiles())
            .addAsWebInfResource(new ByteArrayAsset(VaadinExtension.class.getName().getBytes()),
                    ArchivePaths.create("services/javax.enterprise.inject.spi.Extension"))
            .addAsWebInfResource(EmptyAsset.INSTANCE, ArchivePaths.create("beans.xml"));
     */

}
 
开发者ID:antoniomaria,项目名称:gazpachoquest,代码行数:27,代码来源:ArchiveProvider.java

示例5: buildArchive

import org.jboss.shrinkwrap.resolver.api.maven.PomEquippedResolveStage; //导入依赖的package包/类
public static WebArchive buildArchive(String clazz) {
    WebArchive war = ArquillianJUnitTransformer.createWar();
    ArquillianJUnitTransformer.addClasses(war, clazz, ExampleJUnitTransformer.class.getClassLoader());

    // Your test suite is most likely built separately from the TCK.  You would include all the
    // dependencies in the pom.xml, and then declare the packages and classes here.
    war.addPackage("com.google.appengine.sometests");

    // Include this even though you may not have an appengine-web.xml for your tests.
    war.addAsWebInfResource("appengine-web.xml");

    final PomEquippedResolveStage resolver = getResolver("pom.xml");

    // Necessary to run under App Engine.
    war.addAsLibraries(resolve(resolver, "com.google.appengine:appengine-api-1.0-sdk"));

    // GAE testing lib
    war.addAsLibraries(resolve(resolver, "com.google.appengine:appengine-testing"));

    // TCK Internals necessary for any tests to run under the TCK.
    war.addAsLibraries(resolve(resolver, "com.google.appengine.tck:appengine-tck-transformers")); // cleanup dep
    war.addAsLibraries(resolve(resolver, "com.google.appengine.tck:appengine-tck-base")); // lifecycle dep

    return war;
}
 
开发者ID:GoogleCloudPlatform,项目名称:appengine-tck,代码行数:26,代码来源:ExampleJUnitTransformer.java

示例6: deployment

import org.jboss.shrinkwrap.resolver.api.maven.PomEquippedResolveStage; //导入依赖的package包/类
@Deployment
public static WebArchive deployment() {
  PomEquippedResolveStage pom = Maven.resolver().loadPomFromFile("pom.xml");
  return ShrinkWrap.create(WebArchive.class)
    .addPackage(SingleItemPublisher.class.getPackage())
    .addPackage(Customer.class.getPackage())
    .addAsLibraries(pom.resolve("commons-io:commons-io").withTransitivity().asFile())
    .setWebXML(new StringAsset(Descriptors.create(WebAppDescriptor.class)
      .addDefaultNamespaces()
      .version("3.1")
      .exportAsString()));
}
 
开发者ID:openknowledge,项目名称:reactive-jax-rs,代码行数:13,代码来源:CustomerTest.java

示例7: getDeployment

import org.jboss.shrinkwrap.resolver.api.maven.PomEquippedResolveStage; //导入依赖的package包/类
@Deployment
public static Archive<?> getDeployment() {
    WebArchive war = ShrinkWrap.create(WebArchive.class);
    war.addPackage(EntityToModelMapper.class.getPackage());
    war.addClasses(GaeSearchRepository.class, SearchData.class, SearchConfiguration.class);
    war.addAsWebInfResource("appengine-web.xml");
    war.addAsResource("datastore-indexes.xml");

    PomEquippedResolveStage pom = Maven.resolver().loadPomFromFile("pom.xml");
    war.addAsLibraries(pom.resolve("com.google.appengine:appengine-api-1.0-sdk").withTransitivity().as(File.class));
    war.addAsLibraries(pom.resolve("me.snowdrop.data:spring-data-snowdrop-core").withTransitivity().as(File.class));

    return war;
}
 
开发者ID:snowdrop,项目名称:spring-data-snowdrop,代码行数:15,代码来源:SearchTest.java

示例8: resolveJar

import org.jboss.shrinkwrap.resolver.api.maven.PomEquippedResolveStage; //导入依赖的package包/类
static File[] resolveJar() {
  PomEquippedResolveStage pom = Maven.configureResolver()
                                    .workOffline()
                                    .withMavenCentralRepo(false)
                                    .withClassPathResolution(true)
                                    .loadPomFromFile("pom.xml");
  return pom.resolve(Helpers.SHADED_JAR).withTransitivity().asFile();
}
 
开发者ID:AmadeusITGroup,项目名称:HttpSessionReplacer,代码行数:9,代码来源:Helpers.java

示例9: deployment

import org.jboss.shrinkwrap.resolver.api.maven.PomEquippedResolveStage; //导入依赖的package包/类
@Deployment
public static WebArchive deployment() {
  PomEquippedResolveStage pom = Maven.resolver().loadPomFromFile("pom.xml");
  return ShrinkWrap.create(WebArchive.class)
      .addClasses(SampleApplication.class, VersionedMediaTypeAddressResource.class)
      .addPackage(AddressV1.class.getPackage())
      .addPackage(MovedFrom.class.getPackage())
      .addPackage(MessageBodyConverter.class.getPackage())
      .addAsLibraries(pom.resolve("org.apache.commons:commons-lang3").withTransitivity().asFile())
      .addAsLibraries(pom.resolve("org.json:json").withTransitivity().asFile())
      .setWebXML(new StringAsset(Descriptors.create(WebAppDescriptor.class)
        .addDefaultNamespaces()
        .version("3.0")
        .exportAsString()));
}
 
开发者ID:openknowledge,项目名称:jaxrs-versioning,代码行数:16,代码来源:VersionedMediaTypeFeatureTest.java

示例10: deployment

import org.jboss.shrinkwrap.resolver.api.maven.PomEquippedResolveStage; //导入依赖的package包/类
@Deployment
public static WebArchive deployment() {
  PomEquippedResolveStage pom = Maven.resolver().loadPomFromFile("pom.xml");
  return ShrinkWrap.create(WebArchive.class)
      .addClasses(SampleApplication.class, AddressResource.class)
      .addPackage(AddressV1.class.getPackage())
      .addPackage(MovedFrom.class.getPackage())
      .addPackage(MessageBodyConverter.class.getPackage())
      .addAsLibraries(pom.resolve("org.apache.commons:commons-lang3").withTransitivity().asFile())
      .addAsLibraries(pom.resolve("org.json:json").withTransitivity().asFile())
      .setWebXML(new StringAsset(Descriptors.create(WebAppDescriptor.class)
        .addDefaultNamespaces()
        .version("3.0")
        .exportAsString()));
}
 
开发者ID:openknowledge,项目名称:jaxrs-versioning,代码行数:16,代码来源:AddressResourceTest.java

示例11: deployment

import org.jboss.shrinkwrap.resolver.api.maven.PomEquippedResolveStage; //导入依赖的package包/类
@Deployment
public static WebArchive deployment() {
  PomEquippedResolveStage pom = Maven.resolver().loadPomFromFile("pom.xml");
  return ShrinkWrap.create(WebArchive.class)
      .addClasses(SampleApplication.class, VersionQueryParameterAddressResource.class)
      .addPackage(AddressV1.class.getPackage())
      .addPackage(MovedFrom.class.getPackage())
      .addPackage(MessageBodyConverter.class.getPackage())
      .addAsLibraries(pom.resolve("org.apache.commons:commons-lang3").withTransitivity().asFile())
      .addAsLibraries(pom.resolve("org.json:json").withTransitivity().asFile())
      .setWebXML(new StringAsset(Descriptors.create(WebAppDescriptor.class)
        .addDefaultNamespaces()
        .version("3.0")
        .exportAsString()));
}
 
开发者ID:openknowledge,项目名称:jaxrs-versioning,代码行数:16,代码来源:VersionQueryParameterFeatureTest.java

示例12: deployment

import org.jboss.shrinkwrap.resolver.api.maven.PomEquippedResolveStage; //导入依赖的package包/类
@Deployment
public static WebArchive deployment() {
  PomEquippedResolveStage pom = Maven.resolver().loadPomFromFile("pom.xml");
  return ShrinkWrap.create(WebArchive.class)
      .addClasses(SampleApplication.class, VersionMediaTypeParameterAddressResource.class)
      .addPackage(AddressV1.class.getPackage())
      .addPackage(MovedFrom.class.getPackage())
      .addPackage(MessageBodyConverter.class.getPackage())
      .addAsLibraries(pom.resolve("org.apache.commons:commons-lang3").withTransitivity().asFile())
      .addAsLibraries(pom.resolve("org.json:json").withTransitivity().asFile())
      .setWebXML(new StringAsset(Descriptors.create(WebAppDescriptor.class)
        .addDefaultNamespaces()
        .version("3.0")
        .exportAsString()));
}
 
开发者ID:openknowledge,项目名称:jaxrs-versioning,代码行数:16,代码来源:VersionMediaTypeParameterFeatureTest.java

示例13: deployment

import org.jboss.shrinkwrap.resolver.api.maven.PomEquippedResolveStage; //导入依赖的package包/类
@Deployment
public static WebArchive deployment() {
  PomEquippedResolveStage pom = Maven.resolver().loadPomFromFile("pom.xml");
  return ShrinkWrap.create(WebArchive.class)
      .addClasses(SampleApplication.class, VersionHeaderAddressResource.class)
      .addPackage(AddressV1.class.getPackage())
      .addPackage(MovedFrom.class.getPackage())
      .addPackage(MessageBodyConverter.class.getPackage())
      .addAsLibraries(pom.resolve("org.apache.commons:commons-lang3").withTransitivity().asFile())
      .addAsLibraries(pom.resolve("org.json:json").withTransitivity().asFile())
      .setWebXML(new StringAsset(Descriptors.create(WebAppDescriptor.class)
        .addDefaultNamespaces()
        .version("3.0")
        .exportAsString()));
}
 
开发者ID:openknowledge,项目名称:jaxrs-versioning,代码行数:16,代码来源:VersionHeaderFeatureTest.java

示例14: createBaseDeployment

import org.jboss.shrinkwrap.resolver.api.maven.PomEquippedResolveStage; //导入依赖的package包/类
protected static WebArchive createBaseDeployment() {
 	boolean offline = true;
 	PomEquippedResolveStage resolver = Maven.configureResolver().workOffline(offline).loadPomFromFile("pom.xml");
 	
 	return ShrinkWrap.create(WebArchive.class)
.addAsWebInfResource("test-jboss-deployment-structure.xml", "jboss-deployment-structure.xml")
.addAsWebInfResource("META-INF/beans.xml", "beans.xml")

/* persistence */
.addAsWebInfResource("test-ds.xml")
.addAsResource("test-persistence.xml", "META-INF/persistence.xml")
.addAsLibraries(resolveEjbs(resolver.importDependencies(ScopeType.TEST, ScopeType.COMPILE, ScopeType.RUNTIME)))
;
 }
 
开发者ID:Blazebit,项目名称:blaze-storage,代码行数:15,代码来源:AbstractContainerTest.java

示例15: buildArchive

import org.jboss.shrinkwrap.resolver.api.maven.PomEquippedResolveStage; //导入依赖的package包/类
public static WebArchive buildArchive(String clazz) {
    WebArchive war = createWar();
    addClasses(war, clazz, AppEngineDataNucleusTransformer.class.getClassLoader());

    war.addPackage("com.google.appengine.datanucleus");

    war.addClass("com.google.appengine.datanucleus.jpa.JPATestCase$EntityManagerFactoryName");
    war.addClass("com.google.appengine.datanucleus.jdo.JDOTestCase$PersistenceManagerFactoryName");

    war.addPackage("com.google.appengine.datanucleus.query");

    war.addPackage("com.google.appengine.datanucleus.test.jdo");
    war.addPackage("com.google.appengine.datanucleus.test.jpa");

    war.setWebXML(new org.jboss.shrinkwrap.api.asset.StringAsset("<web/>"));
    war.addAsWebInfResource("appengine-web.xml");
    war.addAsWebInfResource("META-INF/persistence.xml", "classes/META-INF/persistence.xml");
    war.addAsWebInfResource("META-INF/jdoconfig.xml", "classes/META-INF/jdoconfig.xml");
    war.addAsResource(new StringAsset("ignore.logging=true\n"), "capedwarf-compatibility.properties");

    final PomEquippedResolveStage resolver = getResolver("pom.xml");
    // GAE DN libs
    war.addAsLibraries(resolve(resolver, "com.google.appengine.orm:datanucleus-appengine"));
    war.addAsLibraries(resolve(resolver, "com.google.appengine:appengine-api-1.0-sdk"));
    war.addAsLibraries(resolve(resolver, "com.google.appengine:appengine-testing"));
    war.addAsLibraries(resolve(resolver, "com.google.appengine:appengine-api-stubs"));
    war.addAsLibraries(resolve(resolver, "org.datanucleus:datanucleus-core"));
    war.addAsLibraries(resolve(resolver, "org.datanucleus:datanucleus-api-jdo"));
    war.addAsLibraries(resolve(resolver, "org.datanucleus:datanucleus-api-jpa"));
    war.addAsLibraries(resolve(resolver, "javax.jdo:jdo-api"));
    war.addAsLibraries(resolve(resolver, "org.apache.geronimo.specs:geronimo-jpa_2.0_spec"));
    war.addAsLibraries(resolve(resolver, "org.easymock:easymock"));
    war.addAsLibraries(resolve(resolver, "org.easymock:easymockclassextension"));
    // TCK Internals
    war.addAsLibraries(resolve(resolver, "com.google.appengine.tck:appengine-tck-transformers")); // cleanup dep
    war.addAsLibraries(resolve(resolver, "com.google.appengine.tck:appengine-tck-base")); // lifecycle dep

    return war;
}
 
开发者ID:GoogleCloudPlatform,项目名称:appengine-tck,代码行数:40,代码来源:AppEngineDataNucleusTransformer.java


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