Skip to content

Commit

Permalink
Merge pull request #71 from pferraro/main
Browse files Browse the repository at this point in the history
Allow testing against arbitrary tomcat distribution.
  • Loading branch information
pferraro authored Mar 31, 2022
2 parents 04bc65f + 6511775 commit f7efa30
Show file tree
Hide file tree
Showing 4 changed files with 235 additions and 22 deletions.
65 changes: 60 additions & 5 deletions 10.0/hotrod/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
<properties>
<infinispan.server.home>${project.build.directory}/infinispan-server-${version.org.infinispan.server}</infinispan.server.home>
<infinispan.server.profile>${infinispan.server.home}/server/conf/infinispan.xml</infinispan.server.profile>
<catalina.home>${project.build.directory}/apache-tomcat-${version.org.apache.tomcat}</catalina.home>
</properties>

<dependencies>
Expand Down Expand Up @@ -120,7 +121,7 @@
</testResource>
<testResource>
<directory>src/test/resources/tomcat</directory>
<targetPath>${project.build.directory}/apache-tomcat-${version.org.apache.tomcat}/conf</targetPath>
<targetPath>${catalina.home}/conf</targetPath>
<includes>
<include>*</include>
</includes>
Expand Down Expand Up @@ -185,7 +186,7 @@
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/apache-tomcat-${version.org.apache.tomcat}/lib/</outputDirectory>
<outputDirectory>${catalina.home}/lib/</outputDirectory>
<includeScope>runtime</includeScope>
</configuration>
</execution>
Expand All @@ -205,7 +206,7 @@
<excludeDefaultDirectories>true</excludeDefaultDirectories>
<filesets>
<fileset>
<directory>${project.build.directory}/apache-tomcat-${version.org.apache.tomcat}/webapps</directory>
<directory>${catalina.home}/webapps</directory>
<includes>
<include>ROOT/**</include>
<include>docs/**</include>
Expand All @@ -231,7 +232,7 @@
<outputDirectory>${project.build.directory}/tomcat-1</outputDirectory>
<resources>
<resource>
<directory>${project.build.directory}/apache-tomcat-${version.org.apache.tomcat}</directory>
<directory>${catalina.home}</directory>
</resource>
</resources>
</configuration>
Expand All @@ -246,7 +247,7 @@
<outputDirectory>${project.build.directory}/tomcat-2</outputDirectory>
<resources>
<resource>
<directory>${project.build.directory}/apache-tomcat-${version.org.apache.tomcat}</directory>
<directory>${catalina.home}</directory>
</resource>
</resources>
</configuration>
Expand Down Expand Up @@ -333,6 +334,60 @@
</plugins>
</build>
</profile>
<profile>
<id>custom-tomcat</id>
<activation>
<property>
<name>catalina.home.override</name>
</property>
</activation>
<properties>
<catalina.home>${project.build.directory}/tomcat-custom</catalina.home>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<!-- Disable unpacking execution -->
<execution>
<id>unpack-tomcat</id>
<phase>generate-test-resources</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<skip>true</skip>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<!-- Copy over tomcat distribution from custom path -->
<execution>
<phase>generate-test-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${catalina.home}</outputDirectory>
<includeEmptyDirs>true</includeEmptyDirs>
<resources>
<resource>
<directory>${catalina.home.override}</directory>
<filtering>false</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>

</project>
65 changes: 60 additions & 5 deletions 8.5/hotrod/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
<properties>
<infinispan.server.home>${project.build.directory}/infinispan-server-${version.org.infinispan.server}</infinispan.server.home>
<infinispan.server.profile>${infinispan.server.home}/server/conf/infinispan.xml</infinispan.server.profile>
<catalina.home>${project.build.directory}/apache-tomcat-${version.org.apache.tomcat}</catalina.home>
</properties>

<dependencies>
Expand Down Expand Up @@ -120,7 +121,7 @@
</testResource>
<testResource>
<directory>src/test/resources/tomcat</directory>
<targetPath>${project.build.directory}/apache-tomcat-${version.org.apache.tomcat}/conf</targetPath>
<targetPath>${catalina.home}/conf</targetPath>
<includes>
<include>*</include>
</includes>
Expand Down Expand Up @@ -185,7 +186,7 @@
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/apache-tomcat-${version.org.apache.tomcat}/lib/</outputDirectory>
<outputDirectory>${catalina.home}/lib/</outputDirectory>
<includeScope>runtime</includeScope>
</configuration>
</execution>
Expand All @@ -205,7 +206,7 @@
<excludeDefaultDirectories>true</excludeDefaultDirectories>
<filesets>
<fileset>
<directory>${project.build.directory}/apache-tomcat-${version.org.apache.tomcat}/webapps</directory>
<directory>${catalina.home}/webapps</directory>
<includes>
<include>ROOT/**</include>
<include>docs/**</include>
Expand All @@ -231,7 +232,7 @@
<outputDirectory>${project.build.directory}/tomcat-1</outputDirectory>
<resources>
<resource>
<directory>${project.build.directory}/apache-tomcat-${version.org.apache.tomcat}</directory>
<directory>${catalina.home}</directory>
</resource>
</resources>
</configuration>
Expand All @@ -246,7 +247,7 @@
<outputDirectory>${project.build.directory}/tomcat-2</outputDirectory>
<resources>
<resource>
<directory>${project.build.directory}/apache-tomcat-${version.org.apache.tomcat}</directory>
<directory>${catalina.home}</directory>
</resource>
</resources>
</configuration>
Expand Down Expand Up @@ -333,6 +334,60 @@
</plugins>
</build>
</profile>
<profile>
<id>custom-tomcat</id>
<activation>
<property>
<name>catalina.home.override</name>
</property>
</activation>
<properties>
<catalina.home>${project.build.directory}/tomcat-custom</catalina.home>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<!-- Disable unpacking execution -->
<execution>
<id>unpack-tomcat</id>
<phase>generate-test-resources</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<skip>true</skip>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<!-- Copy over tomcat distribution from custom path -->
<execution>
<phase>generate-test-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${catalina.home}</outputDirectory>
<includeEmptyDirs>true</includeEmptyDirs>
<resources>
<resource>
<directory>${catalina.home.override}</directory>
<filtering>false</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>

</project>
65 changes: 60 additions & 5 deletions 9.0/hotrod/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
<properties>
<infinispan.server.home>${project.build.directory}/infinispan-server-${version.org.infinispan.server}</infinispan.server.home>
<infinispan.server.profile>${infinispan.server.home}/server/conf/infinispan.xml</infinispan.server.profile>
<catalina.home>${project.build.directory}/apache-tomcat-${version.org.apache.tomcat}</catalina.home>
</properties>

<dependencies>
Expand Down Expand Up @@ -120,7 +121,7 @@
</testResource>
<testResource>
<directory>src/test/resources/tomcat</directory>
<targetPath>${project.build.directory}/apache-tomcat-${version.org.apache.tomcat}/conf</targetPath>
<targetPath>${catalina.home}/conf</targetPath>
<includes>
<include>*</include>
</includes>
Expand Down Expand Up @@ -185,7 +186,7 @@
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/apache-tomcat-${version.org.apache.tomcat}/lib/</outputDirectory>
<outputDirectory>${catalina.home}/lib/</outputDirectory>
<includeScope>runtime</includeScope>
</configuration>
</execution>
Expand All @@ -205,7 +206,7 @@
<excludeDefaultDirectories>true</excludeDefaultDirectories>
<filesets>
<fileset>
<directory>${project.build.directory}/apache-tomcat-${version.org.apache.tomcat}/webapps</directory>
<directory>${catalina.home}/webapps</directory>
<includes>
<include>ROOT/**</include>
<include>docs/**</include>
Expand All @@ -231,7 +232,7 @@
<outputDirectory>${project.build.directory}/tomcat-1</outputDirectory>
<resources>
<resource>
<directory>${project.build.directory}/apache-tomcat-${version.org.apache.tomcat}</directory>
<directory>${catalina.home}</directory>
</resource>
</resources>
</configuration>
Expand All @@ -246,7 +247,7 @@
<outputDirectory>${project.build.directory}/tomcat-2</outputDirectory>
<resources>
<resource>
<directory>${project.build.directory}/apache-tomcat-${version.org.apache.tomcat}</directory>
<directory>${catalina.home}</directory>
</resource>
</resources>
</configuration>
Expand Down Expand Up @@ -333,6 +334,60 @@
</plugins>
</build>
</profile>
<profile>
<id>custom-tomcat</id>
<activation>
<property>
<name>catalina.home.override</name>
</property>
</activation>
<properties>
<catalina.home>${project.build.directory}/tomcat-custom</catalina.home>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<!-- Disable unpacking execution -->
<execution>
<id>unpack-tomcat</id>
<phase>generate-test-resources</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<skip>true</skip>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<!-- Copy over tomcat distribution from custom path -->
<execution>
<phase>generate-test-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${catalina.home}</outputDirectory>
<includeEmptyDirs>true</includeEmptyDirs>
<resources>
<resource>
<directory>${catalina.home.override}</directory>
<filtering>false</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>

</project>
Loading

0 comments on commit f7efa30

Please sign in to comment.