Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ There are 11 available container profiles, for 6 different servers:
* ``wildfly-managed-arquillian``

This profile will install a Wildfly server and start up the server per sample.
Useful for CI servers.
Useful for CI servers. The WildFly version that's used can be set via the ``wildfly.version`` property.

* ``wildfly-embedded-arquillian``

This profile is almost identical to wildfly-managed-arquillian. It will install the same Wildfly server and start up
that server per sample again, but instead uses the Arquillian embedded connector to run it in the same JVM.
Useful for CI servers.
Useful for CI servers. The WildFly version that's used can be set via the ``wildfly.version`` property.

* ``wildfly-remote-arquillian``

Expand Down Expand Up @@ -98,13 +98,15 @@ There are 11 available container profiles, for 6 different servers:
</featureManager>
```

For the JASPIC tests to even be attempted to be executed a cheat is needed that creates a group in Liberty's internal user registry:
For older versions of Liberty (pre 16.0.0.0) for the JASPIC tests to even be attempted to be executed a cheat is needed that creates a group in Liberty's internal user registry:

```xml
<basicRegistry id="basic">
<group name="architect"/>
</basicRegistry>
```

This cheat is not needed for the latest versions of Liberty (16.0.0.0/2016.7 and later)

* ``liberty-embedded-arquillian``

Expand Down Expand Up @@ -144,8 +146,16 @@ There are 11 available container profiles, for 6 different servers:
JAVA_OPTS="$JAVA_OPTS -Djava.rmi.server.hostname=localhost "
```

This profile also requires you to set a username (``tomcat``) and password (``manager``) for the management application in
``tomcat-users.xml``. See the file ``test-utils/src/main/resources/tomcat-users.xml`` in this repository for a full example.

Be aware that this should *only* be done for a Tomcat instance that's used exclusively for testing, as the above will make
the Tomcat installation **totally insecure!**

* ``tomcat-ci-managed``

This profile will install a Tomcat server and start up the server per sample.
Useful for CI servers. The Tomcat version that's used can be set via the ``tomcat.version`` property.



Expand Down
116 changes: 115 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
<liberty.version>16.0.0.3</liberty.version>
<wildfly.version>10.1.0.Final</wildfly.version>
<tomee.version>7.0.1</tomee.version>
<tomcat.version>8.5.6</tomcat.version>
</properties>

<prerequisites>
Expand Down Expand Up @@ -874,7 +875,7 @@
<!-- ### LIBERTY ### -->

<profile>
<id>liberty-managed-arquillian</id>
<id>liberty-managed-arquillian</id> <!-- Can also be used as remote -->

<dependencies>
<dependency>
Expand Down Expand Up @@ -1060,6 +1061,9 @@
</profile>



<!-- ### TOMCAT ### -->

<profile>
<id>tomcat-remote</id>

Expand Down Expand Up @@ -1091,10 +1095,120 @@
</plugin>
</plugins>
</build>
</profile>


<profile>
<id>tomcat-ci-managed</id>

<properties>
<skipEJB>true</skipEJB>
<skipCDI>true</skipCDI>
<skipJSF>true</skipJSF>
<skipJACC>true</skipJACC>
</properties>

<repositories>
<!-- Released versions of Tomcat -->
<repository>
<id>apache.public</id>
<url>https://repository.apache.org/content/repositories/public/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>

<!-- About to be released version of Tomcat -->
<repository>
<id>apache.staging</id>
<url>https://repository.apache.org/content/repositories/staging/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>

<dependencies>
<dependency>
<groupId>org.jboss.arquillian.container</groupId>
<artifactId>arquillian-tomcat-managed-7</artifactId>
<version>1.0.0.CR7</version>
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>unpack</id>
<phase>process-test-classes</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat</artifactId>
<version>${tomcat.version}</version>
<type>zip</type>
<overWrite>false</overWrite>
<outputDirectory>${project.build.directory}</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.1</version>
<executions>
<execution>
<phase>process-test-classes</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<echo>Copying server.xml</echo>
<copy
failonerror="false"
file="../../test-utils/src/main/resources/tomcat-users.xml"
tofile="${project.build.directory}/apache-tomcat-${tomcat.version}/conf/tomcat-users.xml"
/>
</tasks>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<systemPropertyVariables>
<arquillian.launch>tomcat-ci-managed</arquillian.launch>
<arquillian.tomcat.catalinaHome>${project.build.directory}/apache-tomcat-${tomcat.version}</arquillian.tomcat.catalinaHome>
</systemPropertyVariables>
</configuration>
</plugin>
</plugins>
</build>
</profile>



<!-- Browser profiles. Used for UI testing -->

<profile>
Expand Down
11 changes: 11 additions & 0 deletions test-utils/src/main/resources/arquillian.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,15 @@
</configuration>
</container>

<container qualifier="tomcat-ci-managed">
<configuration>
<property name="catalinaHome">${arquillian.tomcat.catalinaHome}</property>
<property name="catalinaBase">${arquillian.tomcat.catalinaHome}</property>
<property name="user">tomcat</property>
<property name="pass">manager</property>
</configuration>
</container>



</arquillian>
14 changes: 14 additions & 0 deletions test-utils/src/main/resources/tomcat-users.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<tomcat-users xmlns="http://tomcat.apache.org/xml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://tomcat.apache.org/xml tomcat-users.xsd"
version="1.0">

<role rolename="manager-gui" />
<role rolename="manager-jmx" />
<role rolename="manager-script" />

<user username="tomcat" password="manager"
roles="manager-gui,manager-jmx,manager-script"
/>

</tomcat-users>