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


Java MavenDependencyResolver类代码示例

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


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

示例1: createDeployment

import org.jboss.shrinkwrap.resolver.api.maven.MavenDependencyResolver; //导入依赖的package包/类
@Deployment
public static WebArchive createDeployment()
{
    MavenDependencyResolver resolver = DependencyResolvers.use( MavenDependencyResolver.class )
            .loadMetadataFromPom( "pom.xml" );

    return ShrinkWrap.create(WebArchive.class)
            .addClasses( HtmlSelectOneMenu.class, YAMLUtils.class, Converter.class, SettopInfo.class, DevRack.class)
            .addAsLibraries(resolver.artifact("org.yaml:snakeyaml:1.10").resolveAsFiles())
            .addAsLibraries(resolver.artifact("commons-lang:commons-lang:2.3").resolveAsFiles())
            .addAsLibraries(resolver.artifact("log4j:log4j:1.2.14").resolveAsFiles())
            .addAsLibraries(resolver.artifact("org.jboss.spec.javax.servlet:jboss-servlet-api_3.0_spec:1.0.0.Final").resolveAsFiles())
            .addAsLibraries(resolver.artifact("org.primefaces:primefaces:3.4.1").resolveAsFiles())
            .addAsLibraries(resolver.artifact("com.comcast.cats:ir-common:3.2.0.5").resolveAsFiles())
     /*     .addAsLibraries(resolver.artifact("org.jboss.spec.javax.faces:jboss-jsf-api_2.0_spec:1.0.0.Final").resolveAsFiles())*/
            .addPackage( SlotConnectionRepresenter.class.getPackage() )
            .addPackage( SettopSlotConfigServiceImpl.class.getPackage() )
            .addPackage( Slot.class.getPackage() )
            .addAsResource(new File("src/test/resources", "rackconfig.catsrack"))
            .addAsResource(new File("src/test/resources", "settops.catsrack"))
            .addAsResource(new File("src/test/resources", "settopTypes.catsrack"))
            .addPackage( SettopDesc.class.getPackage() )
            .addAsWebInfResource( new File("src/main/webapp/WEB-INF/beans.xml"))
            .addAsWebInfResource( new File("src/main/webapp/WEB-INF/faces-config.xml"))
            .setWebXML(new File("src/main/webapp/WEB-INF/web.xml"));
}
 
开发者ID:Comcast,项目名称:cats,代码行数:27,代码来源:RackControllerTest.java

示例2: createDeployment

import org.jboss.shrinkwrap.resolver.api.maven.MavenDependencyResolver; //导入依赖的package包/类
@Deployment
public static WebArchive createDeployment() {
    MavenDependencyResolver resolver = DependencyResolvers
            .use(MavenDependencyResolver.class)
            .loadMetadataFromPom("pom.xml");

    return ShrinkWrap.create(WebArchive.class)
                .addClasses( HtmlSelectOneMenu.class, YAMLUtils.class, Converter.class, SettopInfo.class, DevRack.class)
                .addAsLibraries(resolver.artifact("org.yaml:snakeyaml:1.10").resolveAsFiles())
                .addAsLibraries(resolver.artifact("commons-lang:commons-lang:2.3").resolveAsFiles())
                .addAsLibraries(resolver.artifact("log4j:log4j:1.2.14").resolveAsFiles())
                .addAsLibraries(resolver.artifact("org.jboss.spec.javax.servlet:jboss-servlet-api_3.0_spec:1.0.0.Final").resolveAsFiles())
                .addAsLibraries(resolver.artifact("org.primefaces:primefaces:3.4.1").resolveAsFiles())
                .addAsLibraries(resolver.artifact("com.comcast.cats:ir-common:3.2.0.5").resolveAsFiles())
         /*     .addAsLibraries(resolver.artifact("org.jboss.spec.javax.faces:jboss-jsf-api_2.0_spec:1.0.0.Final").resolveAsFiles())*/
                .addPackage( SlotConnectionRepresenter.class.getPackage() )
                .addPackage( SettopSlotConfigServiceImpl.class.getPackage() )
                .addPackage( Slot.class.getPackage() )
                .addAsResource(new File("src/test/resources", "rackconfig.catsrack"))
                .addAsResource(new File("src/test/resources", "settops.catsrack"))
                .addAsResource(new File("src/test/resources", "settopTypes.catsrack"))
                .addPackage( SettopDesc.class.getPackage() )
                .addAsWebInfResource( new File("src/main/webapp/WEB-INF/beans.xml"))
                .addAsWebInfResource( new File("src/main/webapp/WEB-INF/faces-config.xml"))
                .setWebXML(new File("src/main/webapp/WEB-INF/web.xml"));
}
 
开发者ID:Comcast,项目名称:cats,代码行数:27,代码来源:SettopControllerTest.java

示例3: createAuxiliaryArchive

import org.jboss.shrinkwrap.resolver.api.maven.MavenDependencyResolver; //导入依赖的package包/类
@Override
public Archive<?> createAuxiliaryArchive() {
	Collection<JavaArchive> archives = DependencyResolvers
			.use(MavenDependencyResolver.class).goOffline()
			.loadMetadataFromPom("pom.xml")
			.artifacts("org.jbehave:jbehave-core:jar:3.8-SNAPSHOT")
			.resolveAs(JavaArchive.class);
	JavaArchive archive = ShrinkWrap.create(JavaArchive.class,
			"arquillian-jbehave.jar");
	for (Archive<JavaArchive> element : archives) {
		archive.merge(element);
	}

	archive.addClasses(JBehaveContainerExtension.class,
			ArquillianInstanceStepsFactory.class,
			StepEnricherProvider.class);
	archive.addAsServiceProvider(RemoteLoadableExtension.class,
			JBehaveContainerExtension.class);
	return archive;
}
 
开发者ID:andreiserea,项目名称:arquillian-jbehave,代码行数:21,代码来源:JBehaveCoreMavenDeploymentAppender.java

示例4: createDeployment

import org.jboss.shrinkwrap.resolver.api.maven.MavenDependencyResolver; //导入依赖的package包/类
@Deployment
public static WebArchive createDeployment() {
    MavenDependencyResolver resolver = DependencyResolvers.use(MavenDependencyResolver.class)
                                                          .loadMetadataFromPom("pom.xml");

    return ShrinkWrap.create(WebArchive.class, "process-smoke-test.war")
            .addAsLibraries(resolver.artifact("org.camunda.bpm:camunda-engine-cdi").resolveAsFiles())
            .addAsLibraries(resolver.artifact("org.camunda.bpm.javaee:camunda-ejb-client").resolveAsFiles())

            // prepare as process application archive for fox platform
            .addAsWebResource("META-INF/processes.xml", "WEB-INF/classes/META-INF/processes.xml")
            .addAsResource(JOBANNOUNCEMENT_PROCESS_RESOURCE)
            .addAsResource(JOBANNOUNCEMENT_PUBLICATION_PROCESS_RESOURCE)

            // add camunda BPM fluent testing dependency
            .addAsLibraries(resolver.artifact("org.camunda.bpm.incubation:camunda-bpm-fluent-engine-api").resolveAsFiles())
            .addAsLibraries(resolver.artifact("org.camunda.bpm.incubation:camunda-bpm-fluent-assertions").resolveAsFiles())
            ;
}
 
开发者ID:plexiti,项目名称:the-job-announcement,代码行数:20,代码来源:ProcessDeploymentAndStartIT.java

示例5: findClassworldsJar

import org.jboss.shrinkwrap.resolver.api.maven.MavenDependencyResolver; //导入依赖的package包/类
protected File findClassworldsJar() {
    File jar = null;
    String classPath = "/" + Launcher.class.getName().replace(".", "/") + ".class";
    URL classUrl = Launcher.class.getResource(classPath);
    String url = classUrl.toExternalForm();
    if(url.startsWith("jar:")) {
        url = url.substring(4);
        int sep = url.indexOf("!");
        if(sep > 0) {
            url = url.substring(0, sep);
            try {
                jar = toFile(new URL(url));
            } catch (MalformedURLException e) {
                ; // ignore
            }
        }
    }
    if(jar == null) {
        jar = use(MavenDependencyResolver.class).artifact("classworlds:classworlds:1.1").resolveAsFiles()[0];
    }
    return jar;
}
 
开发者ID:cedricvidal,项目名称:jforkr,代码行数:23,代码来源:JvmManager.java

示例6: createTestArchive

import org.jboss.shrinkwrap.resolver.api.maven.MavenDependencyResolver; //导入依赖的package包/类
@Deployment
public static Archive<?> createTestArchive() {
    MavenDependencyResolver resolver = DependencyResolvers.use(
            MavenDependencyResolver.class).loadMetadataFromPom("pom.xml");

    return ShrinkWrap
            .create(WebArchive.class, "MTCManagerTest.war")
            .addPackage(ParameterString.class.getPackage())
            .addPackage(Resources.class.getPackage())
            .addPackage(DDBManager.class.getPackage())
            .addPackage(Utils.class.getPackage())
            .addAsResource("META-INF/test-persistence_h2.xml", "META-INF/persistence.xml")
            //.addAsResource("META-INF/test-persistence.xml", "META-INF/persistence.xml")
            .addAsResource("import.sql", "import.sql")
            .addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml")
            // Deploy our test datasource
             .addAsWebInfResource("test-ds_h2.xml", "test-ds.xml")
            //.addAsWebInfResource("test-ds.xml", "test-ds.xml")
            .addAsLibraries(
                    resolver.artifacts("org.apache.commons:commons-lang3"
                            ,"org.apache.ws.security:wss4j"
                            ,"org.apache.cxf:cxf-rt-frontend-jaxws"
                            ,"org.apache.cxf:cxf-rt-transports-http"
                            ,"org.apache.cxf:cxf-rt-ws-security"
                    // ,"eu.itesla_project:commons"
                    ).resolveAsFiles()

            );
}
 
开发者ID:itesla,项目名称:ipst,代码行数:30,代码来源:DDBManagerTest.java

示例7: createDeployment

import org.jboss.shrinkwrap.resolver.api.maven.MavenDependencyResolver; //导入依赖的package包/类
@Deployment
public static WebArchive createDeployment() {
    MavenDependencyResolver resolver = DependencyResolvers
            .use(MavenDependencyResolver.class)
            .loadMetadataFromPom("pom.xml");

    return ShrinkWrap.create(WebArchive.class)
        .addClasses(HtmlSelectOneMenu.class, DeviceSearchService.class, DeviceSearchServiceImpl.class, ConfigServiceConstants.class,AssertUtil.class,
                    DomainServiceException.class, DomainNotFoundException.class, SettopNotFoundException.class, YAMLUtils.class, Converter.class, SettopInfo.class, DevRack.class)
                    .addAsLibraries(resolver.artifact("org.yaml:snakeyaml:1.10").resolveAsFiles())
                    .addAsLibraries(resolver.artifact("commons-lang:commons-lang:2.3").resolveAsFiles())
                    .addAsLibraries(resolver.artifact("log4j:log4j:1.2.14").resolveAsFiles())
                    .addAsLibraries(resolver.artifact("org.jboss.spec.javax.servlet:jboss-servlet-api_3.0_spec:1.0.0.Final").resolveAsFiles())
                    .addAsLibraries(resolver.artifact("org.primefaces:primefaces:3.4.1").resolveAsFiles())
                    .addAsLibraries(resolver.artifact("com.comcast.cats:ir-common:3.2.0.5").resolveAsFiles())
             /*     .addAsLibraries(resolver.artifact("org.jboss.spec.javax.faces:jboss-jsf-api_2.0_spec:1.0.0.Final").resolveAsFiles())*/
                    .addPackage( SlotConnectionRepresenter.class.getPackage() )
                    .addPackage( SettopSlotConfigServiceImpl.class.getPackage() )
                    .addPackage( Slot.class.getPackage() )
                    .addAsResource(new File("src/test/resources", "rackconfig.catsrack"))
                    .addAsResource(new File("src/test/resources", "settops.catsrack"))
                    .addAsResource(new File("src/test/resources", "settopTypes.catsrack"))
                    .addPackage( SettopDesc.class.getPackage() )
                    .addAsWebInfResource( new File("src/main/webapp/WEB-INF/beans.xml"))
                    .addAsWebInfResource( new File("src/main/webapp/WEB-INF/faces-config.xml"))
                    .setWebXML(new File("src/main/webapp/WEB-INF/web.xml"));
}
 
开发者ID:Comcast,项目名称:cats,代码行数:28,代码来源:DeviceSearchServiceTest.java

示例8: prepareTestDeployment

import org.jboss.shrinkwrap.resolver.api.maven.MavenDependencyResolver; //导入依赖的package包/类
protected static WebArchive prepareTestDeployment(String deploymentArchiveName,
                                                  String processDefinition) {
  MavenDependencyResolver resolver = DependencyResolvers.use(MavenDependencyResolver.class)
    .loadMetadataFromPom("pom.xml");

  WebArchive war = ShrinkWrap.create(WebArchive.class, deploymentArchiveName + ".war")
    .addAsLibraries(resolver.artifact("org.camunda.bpm:camunda-engine-cdi").resolveAsFiles())
    .addAsLibraries(resolver.artifact("org.camunda.bpm.extension.camel:camunda-bpm-camel-common").resolveAsFiles())
    .addAsLibraries(resolver.artifact("org.apache.camel:camel-core").resolveAsFiles())
    .addAsLibraries(resolver.artifact("org.apache.camel:camel-cdi").resolveAsFiles())
    .addAsLibraries(resolver.artifact("org.easytesting:fest-assert-core").resolveAsFiles())
    // FIXME: this does not work we need to add this project's resources one by one
    //.addAsLibraries(resolver.artifact("org.camunda.bpm.extension.camel:camunda-bpm-camel-cdi").resolveAsFiles())
    .addClass(CamelServiceImpl.class)
    .addClass(BaseArquillianIntegrationTest.class)
    .addClass(ArquillianTestsProcessApplication.class)
    .addClass(CamelContextBootstrap.class)

    .addClass(LogService.class)
    .addClass(LogServiceImpl.class)
    .addClass(LogServiceCdiImpl.class)

    //.addClass(camelRouteClass)
    .addAsWebInfResource(EmptyAsset.INSTANCE, ArchivePaths.create("beans.xml"))
    .addAsWebResource("META-INF/processes.xml", "WEB-INF/classes/META-INF/processes.xml")
    .addAsResource(processDefinition)
    ;

    /*
     * For troubleshooting purposes use the following two lines to export the WAR to the filesystem
     * to see if everything needed is there!
     */
    //File destinationDir = new File("/Users/rafa/dev/plexiti/vc/the-job-announcement-fox/target");
    //war.as(ExplodedExporter.class).exportExploded(destinationDir);

  return war;
}
 
开发者ID:camunda,项目名称:camunda-bpm-camel,代码行数:38,代码来源:BaseArquillianIntegrationTest.java

示例9: createDeployment

import org.jboss.shrinkwrap.resolver.api.maven.MavenDependencyResolver; //导入依赖的package包/类
@Deployment
public static WebArchive createDeployment() {
    MavenDependencyResolver resolver = DependencyResolvers.use(MavenDependencyResolver.class)
                                                          .loadMetadataFromPom("pom.xml");

    WebArchive war = ShrinkWrap.create(WebArchive.class, "camel-twitter-posting-test.war")
            .addAsLibraries(resolver.artifact("org.camunda.bpm:camunda-engine-cdi").resolveAsFiles())
            .addAsLibraries(resolver.artifact("org.camunda.bpm.javaee:camunda-ejb-client").resolveAsFiles())
            .addAsLibraries(resolver.artifact("org.apache.camel:camel-core").resolveAsFiles())
            .addAsLibraries(resolver.artifact("org.apache.camel:camel-cdi").resolveAsFiles())
            .addAsLibraries(resolver.artifact("org.apache.camel:camel-twitter").resolveAsFiles())
            .addAsLibraries(resolver.artifact("org.apache.commons:commons-email").resolveAsFiles())
            .addAsLibraries(resolver.artifact("com.restfb:restfb").resolveAsFiles())

            // add camunda BPM fluent testing dependency
            .addAsLibraries(resolver.artifact("org.camunda.bpm.incubation:camunda-bpm-fluent-engine-api").resolveAsFiles())
            .addAsLibraries(resolver.artifact("org.camunda.bpm.incubation:camunda-bpm-fluent-assertions").resolveAsFiles())

            .addAsWebInfResource(EmptyAsset.INSTANCE, ArchivePaths.create("beans.xml"))
            .addAsResource("META-INF/persistence.xml", "META-INF/persistence.xml")

            .addClass(ContextBootStrap.class)
            .addClass(TwitterPostingCamelRoute.class)

            .addClass(PostingService.class)
            .addClass(JobAnnouncementService.class)
            .addClass(JobAnnouncementServiceImpl.class)

            .addClass(FacebookPostingServiceImpl.class)
            .addClass(MailingServiceImpl.class)

            .addClass(ProcessAwareEntityService.class)
            .addClass(ProcessAwareJpaEntityServiceImpl.class)
            .addClass(EntityService.class)
            .addClass(JpaEntityServiceImpl.class)
            .addClass(TaskAware.class)
            .addClass(JobAnnouncement.class)
            .addClass(FacebookPosting.class)
            .addClass(Strings.class)
            .addClass(Objects.class)
            ;

    /*
     * For troubleshooting purposes use the following two lines to export the WAR to the filesystem
     * to see if everything needed is there!
     */
    //File destinationDir = new File("/Users/rafa/dev/plexiti/vc/the-job-announcement-fox/target");
    //war.as(ExplodedExporter.class).exportExploded(destinationDir);

    return war;
}
 
开发者ID:plexiti,项目名称:the-job-announcement,代码行数:52,代码来源:TwitterPostingCamelTestIT.java


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