Add deploy profiles for standalone wildfly using cargo plugin and for runtime installed instance
This commit is contained in:
parent
2fd130e24b
commit
d1c2e042ce
|
@ -10,6 +10,12 @@
|
|||
<artifactId>ejb-client</artifactId>
|
||||
<name>EJB3 Client Maven</name>
|
||||
<description>EJB3 Client Maven</description>
|
||||
|
||||
<properties>
|
||||
<junit.version>4.12</junit.version>
|
||||
<maven-surefire-plugin.version>2.19</maven-surefire-plugin.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.wildfly</groupId>
|
||||
|
|
|
@ -1,16 +1,18 @@
|
|||
package com.baeldung.ejb.setup.test;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
import org.junit.Test;
|
||||
import com.baeldung.ejb.client.EJBClient;
|
||||
import com.baeldung.ejb.tutorial.HelloWorldBean;
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
public class EJBSetupTest {
|
||||
|
||||
@Test
|
||||
public void testEJBClient() {
|
||||
public void EJBClientTest() {
|
||||
EJBClient ejbClient = new EJBClient();
|
||||
HelloWorldBean bean = new HelloWorldBean();
|
||||
assertEquals(bean.getHelloWorld(), ejbClient.getEJBRemoteMessage());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -2,24 +2,69 @@
|
|||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<groupId>com.baeldung.ejb</groupId>
|
||||
<artifactId>ejb</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>ejb-remote</artifactId>
|
||||
<packaging>ejb</packaging>
|
||||
|
||||
<!-- <name>ejb-remote</name> -->
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>javax</groupId>
|
||||
<artifactId>javaee-api</artifactId>
|
||||
<version>7.0</version>
|
||||
<version>${javaee-api.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
||||
<profiles>
|
||||
<!-- mvn clean package cargo:run -->
|
||||
<profile>
|
||||
<id>wildfly-standalone</id>
|
||||
<activation>
|
||||
<activeByDefault>true</activeByDefault>
|
||||
</activation>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.cargo</groupId>
|
||||
<artifactId>cargo-maven2-plugin</artifactId>
|
||||
<version>${cargo-maven2-plugin.version}</version>
|
||||
|
||||
<configuration>
|
||||
|
||||
<container>
|
||||
<containerId>wildfly10x</containerId>
|
||||
<zipUrlInstaller>
|
||||
<url>http://download.jboss.org/wildfly/10.1.0.Final/wildfly-10.1.0.Final.zip</url>
|
||||
</zipUrlInstaller>
|
||||
</container>
|
||||
|
||||
<configuration>
|
||||
<properties>
|
||||
<cargo.hostname>127.0.0.1</cargo.hostname>
|
||||
<cargo.jboss.management-http.port>9990</cargo.jboss.management-http.port>
|
||||
<cargo.servlet.users>testUser:admin1234!</cargo.servlet.users>
|
||||
</properties>
|
||||
</configuration>
|
||||
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
|
||||
<!--mvn clean install wildfly:deploy -Pwildfly-runtime-->
|
||||
<profile>
|
||||
<id>wildfly-runtime</id>
|
||||
<activation>
|
||||
<activeByDefault>false</activeByDefault>
|
||||
</activation>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
|
@ -35,6 +80,16 @@
|
|||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
<!-- <finalName>ejb-remote</finalName> -->
|
||||
</build>
|
||||
</profile>
|
||||
|
||||
</profiles>
|
||||
|
||||
<properties>
|
||||
<javaee-api.version>7.0</javaee-api.version>
|
||||
<cargo-maven2-plugin.version>1.6.1</cargo-maven2-plugin.version>
|
||||
</properties>
|
||||
|
||||
</project>
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue