DELTASPIKE-497 Added build-managed profile for Glassfish 4.0
Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/1550c887 Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/1550c887 Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/1550c887 Branch: refs/heads/master Commit: 1550c8870a6043253273ae176279de4951283e74 Parents: 2498256 Author: Christian Kaltepoth <[email protected]> Authored: Mon Jan 13 17:20:53 2014 +0100 Committer: Christian Kaltepoth <[email protected]> Committed: Mon Jan 13 17:20:53 2014 +0100 ---------------------------------------------------------------------- deltaspike/parent/code/pom.xml | 126 +++++++++++++++++++ .../src/main/resources/arquillian.xml | 7 ++ 2 files changed, 133 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/deltaspike/blob/1550c887/deltaspike/parent/code/pom.xml ---------------------------------------------------------------------- diff --git a/deltaspike/parent/code/pom.xml b/deltaspike/parent/code/pom.xml index b3c6259..25953fc 100644 --- a/deltaspike/parent/code/pom.xml +++ b/deltaspike/parent/code/pom.xml @@ -39,6 +39,7 @@ <jboss.as.version>7.1.1.Final</jboss.as.version> <wildfly.version>8.0.0.CR1</wildfly.version> <glassfish3.version>3.1.2.2</glassfish3.version> + <glassfish4.version>4.0</glassfish4.version> </properties> @@ -1119,6 +1120,131 @@ </build> </profile> + <profile> + <!-- + * Glassfish will be downloaded as maven dependency + * + * Start the build with: + * $> mvn clean install -Pglassfish-build-managed-4 + * + --> + <id>glassfish-build-managed-4</id> + + <properties> + <cdicontainer.version>weld-2.0.0.SP1</cdicontainer.version> + </properties> + + <dependencies> + <dependency> + <groupId>javax.enterprise</groupId> + <artifactId>cdi-api</artifactId> + <version>1.0-SP4</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 Glassfish 4.0 --> + <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}/glassfish4</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>org.glassfish.main.distributions</groupId> + <artifactId>glassfish</artifactId> + <version>${glassfish4.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" --> + <replace + file="${container.unpack.directory}/glassfish4/glassfish/domains/domain1/config/domain.xml" + token="port="3700"" value="port="23700"" /> + <replace + file="${container.unpack.directory}/glassfish4/glassfish/domains/domain1/config/domain.xml" + token="port="8181"" value="port="28181"" /> + <replace + file="${container.unpack.directory}/glassfish4/glassfish/domains/domain1/config/domain.xml" + token="port="8686"" value="port="28686"" /> + <replace + file="${container.unpack.directory}/glassfish4/glassfish/domains/domain1/config/domain.xml" + token="port="4848"" value="port="24848"" /> + <replace + file="${container.unpack.directory}/glassfish4/glassfish/domains/domain1/config/domain.xml" + token="port="8080"" value="port="28080"" /> + <replace + file="${container.unpack.directory}/glassfish4/glassfish/domains/domain1/config/domain.xml" + token="value="7676"" value="value="27676"" /> + </target> + </configuration> + </execution> + </executions> + </plugin> + </plugins> + </build> + </profile> + </profiles> </project> http://git-wip-us.apache.org/repos/asf/deltaspike/blob/1550c887/deltaspike/test-utils/src/main/resources/arquillian.xml ---------------------------------------------------------------------- diff --git a/deltaspike/test-utils/src/main/resources/arquillian.xml b/deltaspike/test-utils/src/main/resources/arquillian.xml index aca4120..574c594 100644 --- a/deltaspike/test-utils/src/main/resources/arquillian.xml +++ b/deltaspike/test-utils/src/main/resources/arquillian.xml @@ -103,4 +103,11 @@ </configuration> </container> + <container qualifier="glassfish-build-managed-4"> + <configuration> + <property name="glassFishHome">${arquillian.glassfish4_home}</property> + <property name="adminPort">24848</property> + </configuration> + </container> + </arquillian>
