Skip to content

Commit

Permalink
[Resolve #54] Examples run starts multiple wildfly instances
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Diesler committed Nov 7, 2014
1 parent bafcfe3 commit e9873f4
Show file tree
Hide file tree
Showing 4 changed files with 91 additions and 136 deletions.
63 changes: 17 additions & 46 deletions examples/camel-cdi/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -88,51 +88,22 @@
</dependencies>

<!-- Build -->
<build>
<plugins>
<plugin>
<groupId>org.wildfly.plugins</groupId>
<artifactId>wildfly-maven-plugin</artifactId>
<configuration>
<jbossHome>${jboss.home}</jbossHome>
<serverConfig>${server.config}</serverConfig>
</configuration>
<executions>
<execution>
<id>wildfly-start</id>
<phase>integration-test</phase>
<goals>
<goal>start</goal>
</goals>
</execution>
<execution>
<id>wildfly-deploy</id>
<phase>integration-test</phase>
<goals>
<goal>deploy</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
<executions>
<execution>
<phase>integration-test</phase>
<goals>
<goal>test</goal>
</goals>
<configuration>
<skip>false</skip>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<build>
<plugins>
<plugin>
<groupId>org.wildfly.plugins</groupId>
<artifactId>wildfly-maven-plugin</artifactId>
<executions>
<execution>
<id>wildfly-deploy</id>
<phase>integration-test</phase>
<goals>
<goal>deploy</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

</project>
33 changes: 2 additions & 31 deletions examples/camel-jpa/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@

<!-- Properties -->
<properties>
<jboss.home>${project.build.directory}/wildfly-${version.wildfly}</jboss.home>
<jboss.home>../target/wildfly-${version.wildfly}</jboss.home>
</properties>

<dependencies>

<!-- Provided -->
Expand Down Expand Up @@ -124,18 +124,7 @@
<plugin>
<groupId>org.wildfly.plugins</groupId>
<artifactId>wildfly-maven-plugin</artifactId>
<configuration>
<jbossHome>${jboss.home}</jbossHome>
<serverConfig>${server.config}</serverConfig>
</configuration>
<executions>
<execution>
<id>wildfly-start</id>
<phase>integration-test</phase>
<goals>
<goal>start</goal>
</goals>
</execution>
<execution>
<id>wildfly-deploy</id>
<phase>integration-test</phase>
Expand All @@ -145,24 +134,6 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
<executions>
<execution>
<phase>integration-test</phase>
<goals>
<goal>test</goal>
</goals>
<configuration>
<skip>false</skip>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

Expand Down
8 changes: 8 additions & 0 deletions examples/input/customers/.camel/customer.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<cus:customer xmlns:cus="http://org/wildfly/camel/examples/jpa/model/Customer"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://org/wildfly/camel/examples/jpa/model/Customer">
<cus:firstName>John</cus:firstName>
<cus:lastName>Doe</cus:lastName>
<cus:dateOfBirth>1975-12-25</cus:dateOfBirth>
</cus:customer>
123 changes: 64 additions & 59 deletions examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,12 @@
<module>camel-jpa</module>
</modules>

<!-- Dependencies -->
<dependencies>
</dependencies>
<!-- Properties -->
<properties>
<jboss.home>${project.build.directory}/wildfly-${version.wildfly}</jboss.home>
<server.config>standalone-camel.xml</server.config>
</properties>


<!-- Build -->
<build>
Expand All @@ -58,6 +61,7 @@
<goals>
<goal>unpack</goal>
</goals>
<inherited>false</inherited>
<configuration>
<artifactItems>
<artifactItem>
Expand All @@ -71,64 +75,65 @@
</artifactItems>
</configuration>
</execution>
<execution>
<id>unpack-wildfly-patch</id>
<phase>generate-test-sources</phase>
<goals>
<goal>unpack</goal>
</goals>
<inherited>false</inherited>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.wildfly.camel</groupId>
<artifactId>wildfly-camel-patch</artifactId>
<version>${project.version}</version>
<type>tar.gz</type>
<overWrite>false</overWrite>
<outputDirectory>${jboss.home}</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.wildfly.plugins</groupId>
<artifactId>wildfly-maven-plugin</artifactId>
<configuration>
<jbossHome>${jboss.home}</jbossHome>
<serverConfig>${server.config}</serverConfig>
</configuration>
<executions>
<execution>
<id>wildfly-start</id>
<phase>integration-test</phase>
<goals>
<goal>start</goal>
</goals>
<inherited>false</inherited>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
<executions>
<execution>
<phase>integration-test</phase>
<goals>
<goal>test</goal>
</goals>
<configuration>
<skip>false</skip>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

<!-- Profiles -->
<profiles>
<profile>
<id>no-camel-subsystem</id>
<activation>
<property>
<name>no-camel-subsystem</name>
</property>
</activation>
<properties>
<server.config>standalone.xml</server.config>
</properties>
</profile>
<profile>
<id>with-camel-subsystem</id>
<activation>
<property>
<name>!no-camel-subsystem</name>
</property>
</activation>
<properties>
<server.config>standalone-camel.xml</server.config>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>unpack-wildfly-patch</id>
<phase>generate-test-sources</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.wildfly.camel</groupId>
<artifactId>wildfly-camel-patch</artifactId>
<version>${project.version}</version>
<type>tar.gz</type>
<overWrite>false</overWrite>
<outputDirectory>${jboss.home}</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>


</project>

0 comments on commit e9873f4

Please sign in to comment.