use of org.jboss.shrinkwrap.resolver.api.maven.PomEquippedResolveStage in project jbpm by kiegroup.
the class EJBTransactions method buildArchive.
public EnterpriseArchive buildArchive() {
System.out.println("### Building archive '" + ARCHIVE_NAME + ".war'");
PomEquippedResolveStage resolver = IntegrationMavenResolver.get("jbpm", "jbpm-persistence");
File[] dependencies = resolver.importCompileAndRuntimeDependencies().resolve().withTransitivity().asFile();
LOGGER.debug("Archive dependencies:");
for (File d : dependencies) {
LOGGER.debug(d.getName());
}
JavaArchive jar = ShrinkWrap.create(JavaArchive.class, ARCHIVE_NAME + ".jar").addPackages(true, "org.jbpm.test.container.groups", EJB_TRANSACTIONS_PACKAGE).addClass(EJBTransactions.class).addClass(JbpmContainerTest.class).addClass(WebSphereFixedJtaPlatform.class).addClass(AbstractEJBTransactionsTest.class).addClass(EJBTransactionsTest.class).addClass(TrackingProcessEventListener.class).addClass(TrackingListenerAssert.class).addAsResource(getClass().getResource("ejbtransactions/" + BPMN_DOUBLE_HUMAN_TASKS), ArchivePaths.create(EJB_TRANSACTIONS_PATH + BPMN_DOUBLE_HUMAN_TASKS)).addAsResource(getClass().getResource("/persistence.xml"), ArchivePaths.create("META-INF/persistence.xml")).addAsResource(EmptyAsset.INSTANCE, ArchivePaths.create("META-INF/beans.xml"));
ear = ShrinkWrap.create(EnterpriseArchive.class, ARCHIVE_NAME + ".ear");
ear.addAsModule(jar).setApplicationXML(getClass().getResource("ejbtransactions/ejb-application.xml")).addAsLibraries(dependencies);
// META-INF resources
ear.addAsResource(getClass().getResource("/logback.xml"), ArchivePaths.create("logback.xml"));
return ear;
}
use of org.jboss.shrinkwrap.resolver.api.maven.PomEquippedResolveStage in project jbpm by kiegroup.
the class HelloWebService method buildArchive.
public WebArchive buildArchive() {
System.out.println("### Building archive '" + ARCHIVE_NAME + ".war'");
PomEquippedResolveStage resolver = IntegrationMavenResolver.get();
File[] dependencies = resolver.importCompileAndRuntimeDependencies().resolve().withTransitivity().asFile();
LOGGER.debug("Archive dependencies:");
for (File d : dependencies) {
LOGGER.debug(d.getName());
}
war = ShrinkWrap.create(WebArchive.class, ARCHIVE_NAME + ".war").addPackage(HELLO_WEB_SERVICE_PACKAGE).addClass(WebSphereFixedJtaPlatform.class).setWebXML(HELLO_WEB_SERVICE_PATH + "WEB-INF/web.xml").addAsLibraries(dependencies);
return war;
}
use of org.jboss.shrinkwrap.resolver.api.maven.PomEquippedResolveStage in project jbpm by kiegroup.
the class LocalTransactions method buildArchive.
public WebArchive buildArchive() {
System.out.println("### Building archive '" + ARCHIVE_NAME + ".war'");
PomEquippedResolveStage resolver = IntegrationMavenResolver.get("jbpm", "jbpm-persistence");
File[] dependencies = resolver.importCompileAndRuntimeDependencies().resolve().withTransitivity().asFile();
LOGGER.debug("Archive dependencies:");
for (File d : dependencies) {
LOGGER.debug(d.getName());
}
war = ShrinkWrap.create(WebArchive.class, ARCHIVE_NAME + ".war").addAsResource(LOCAL_TRANSACTIONS_PATH + BPMN_TRANSACTIONS).addAsResource(LOCAL_TRANSACTIONS_PATH + BPMN_HELLO_WORLD).addAsResource(LOCAL_TRANSACTIONS_PATH + RULES_TRANSACTIONS).addAsLibraries(dependencies);
war.addClass(LocalTransactions.class).addClass(WebSphereFixedJtaPlatform.class).addClass(ListWorkItemHandler.class).addClass(TrackingAgendaEventListener.class).addClass(TrackingProcessEventListener.class).addClass(KieUtils.class);
war.addPackages(true, "org.jbpm.test.container.groups");
// WEB-INF resources
war.addAsWebResource(getClass().getResource("/logback.xml"), ArchivePaths.create("logback.xml"));
// CDI beans.xml
war.addAsWebInfResource(EmptyAsset.INSTANCE, ArchivePaths.create("classes/META-INF/beans.xml"));
war.addAsResource(getClass().getResource("/persistence.xml"), ArchivePaths.create("META-INF/persistence.xml"));
war.addAsWebResource(getClass().getResource("localtransactions/tomcat-context.xml"), ArchivePaths.create("META-INF/context.xml"));
war.addAsResource(getClass().getResource("localtransactions/jbossts-properties.xml"), ArchivePaths.create("jbossts-properties.xml"));
return war;
}
use of org.jboss.shrinkwrap.resolver.api.maven.PomEquippedResolveStage in project jbpm by kiegroup.
the class RegisterRestService method buildArchive.
public Archive<?> buildArchive() {
System.out.println("### Building archive '" + ARCHIVE_NAME + ".war'");
PomEquippedResolveStage resolver = IntegrationMavenResolver.get("rest");
File[] dependencies = resolver.importCompileAndRuntimeDependencies().resolve().withTransitivity().asFile();
LOGGER.debug("Archive dependencies:");
for (File d : dependencies) {
LOGGER.debug(d.getName());
}
war = ShrinkWrap.create(WebArchive.class, ARCHIVE_NAME + ".war").addPackage(REGISTER_REST_SERVICE_PACKAGE).addClass(WebSphereFixedJtaPlatform.class).setWebXML(getClass().getResource("registerrestservice/WEB-INF/web.xml")).addAsWebInfResource(getClass().getResource("registerrestservice/WEB-INF/weblogic.xml"), ArchivePaths.create("weblogic.xml")).addAsLibraries(dependencies);
// If we are on a WebSphere
if (System.getProperty("container.port").equals("9080")) {
EnterpriseArchive ear = ShrinkWrap.create(EnterpriseArchive.class, ARCHIVE_NAME + ".ear");
ear.addAsModule(war).setApplicationXML(getClass().getResource("registerrestservice/application.xml")).addAsLibraries(resolver.importCompileAndRuntimeDependencies().resolve().withTransitivity().asFile());
// META-INF resources for WAS
ear.addAsApplicationResource(getClass().getResource("registerrestservice/ibm-application-bnd.xml"), ArchivePaths.create("ibm-application-bnd.xml"));
return ear;
}
return war;
}
Aggregations