Skip to content

Commit

Permalink
DELTASPIKE-1181 Added a Payara 4 profile to test.
Browse files Browse the repository at this point in the history
  • Loading branch information
johnament committed Jul 6, 2016
1 parent 5e6c6ab commit b9bc748
Showing 1 changed file with 116 additions and 0 deletions.
116 changes: 116 additions & 0 deletions deltaspike/parent/code/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
<wildfly.arquillian.version>1.0.2.Final</wildfly.arquillian.version>
<glassfish3.version>3.1.2.2</glassfish3.version>
<glassfish4.version>4.0</glassfish4.version>
<payara.version>4.1.1.162</payara.version>
<wls.version>12.1</wls.version>
</properties>

Expand Down Expand Up @@ -1732,6 +1733,121 @@
</build>
</profile>

<profile>
<!--
* Payara will be downloaded as maven dependency
*
* Start the build with:
* $> mvn clean install -Ppayara-build-managed-4
*
-->
<id>payara-build-managed-4</id>

<properties>
<cdicontainer.version>payara-${payara.version}</cdicontainer.version>
</properties>

<dependencies>
<dependency>
<groupId>javax.enterprise</groupId>
<artifactId>cdi-api</artifactId>
<version>1.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
<version>1</version>
<scope>provided</scope>
</dependency>
<!-- Also works fine with Payara -->
<dependency>
<groupId>org.jboss.arquillian.container</groupId>
<artifactId>arquillian-glassfish-managed-3.1</artifactId>
<version>1.0.0.CR4</version>
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<systemProperties>
<arquillian.launch>glassfish-build-managed-4</arquillian.launch>
<arquillian.glassfish4_home>${container.unpack.directory}/payara41</arquillian.glassfish4_home>
<org.apache.deltaspike.ProjectStage>UnitTest</org.apache.deltaspike.ProjectStage>
<cdicontainer.version>${cdicontainer.version}</cdicontainer.version>
</systemProperties>
<!-- we just use groups to mark that a test should be executed only
with specific environments. even though a java-ee6 application server has to be able to run
all tests in theory, we have to exclude some tests because there are e.g. packaging issues or
there are currently issues with arquillian. if a test isn't restricted to an environment,
no category is used for the test-class. -->
<excludedGroups>
org.apache.deltaspike.test.category.SeCategory
</excludedGroups>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>unpack-glassfish4</id>
<phase>generate-test-resources</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>fish.payara.blue.distributions</groupId>

This comment has been minimized.

Copy link
@bartoszmajsak

bartoszmajsak Jul 6, 2016

Are you testing against IBM JDK? If not remove .blue. and save yourself two hours :) I was just fighting with some odd xerces classloading issues without realizing that blue is for IBM JDK, as announced here, while being on OpenJDK.

I was basically hit in the face with

com.sun.org.apache.xerces.internal.impl.dv.DVFactoryException: Schema factory class com.sun.org.apache.xerces.internal.impl.dv.xs.SchemaDVFactoryImpl does not extend from SchemaDVFactory.

Which is not that helpful to start with :)

This comment has been minimized.

Copy link
@johnament

johnament Jul 6, 2016

Author Contributor

Ahhhh

<artifactId>payara</artifactId>
<version>${payara.version}</version>
<outputDirectory>${container.unpack.directory}</outputDirectory>
<type>zip</type>
<overWrite>false</overWrite>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>prepare-glassfish4</id>
<phase>process-test-resources</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>

<!-- Change all TCP ports from "xxxx" to "2xxxx" -->
<replaceregexp file="${container.unpack.directory}/payara41/glassfish/domains/domain1/config/domain.xml" match="port=&quot;(\d{4})&quot;" replace="port=&quot;2\1&quot;" flags="g" />
<replace file="${container.unpack.directory}/payara41/glassfish/domains/domain1/config/domain.xml" token="value=&quot;7676&quot;" value="value=&quot;27676&quot;" />

<!-- Replace the default datasource with an in-memory one -->
<replace file="${container.unpack.directory}/payara41/glassfish/domains/domain1/config/domain.xml" token="datasource-classname=&quot;org.apache.derby.jdbc.ClientDataSource&quot;" value="datasource-classname=&quot;org.apache.derby.jdbc.EmbeddedDataSource&quot;" />
<replace file="${container.unpack.directory}/payara41/glassfish/domains/domain1/config/domain.xml" token="value=&quot;sun-appserv-samples&quot;" value="value=&quot;memory:deltaspike&quot;" />

</target>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>

</profiles>

</project>

0 comments on commit b9bc748

Please sign in to comment.