You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by rm...@apache.org on 2012/11/10 02:04:51 UTC
svn commit: r1407710 - in /openejb/trunk/openejb/arquillian:
arquillian-tomee-remote/
arquillian-tomee-remote/src/test/java/org/apache/openejb/arquillian/
arquillian-tomee-tests/
arquillian-tomee-tests/arquillian-tomee-codi-tests/src/test/java/org/apac...
Author: rmannibucau
Date: Sat Nov 10 01:04:49 2012
New Revision: 1407710
URL: http://svn.apache.org/viewvc?rev=1407710&view=rev
Log:
reworking a bit all-adapters arquillian profile
Added:
openejb/trunk/openejb/arquillian/arquillian-tomee-remote/src/test/java/org/apache/openejb/arquillian/CheckServerInfoTest.java
Modified:
openejb/trunk/openejb/arquillian/arquillian-tomee-remote/pom.xml
openejb/trunk/openejb/arquillian/arquillian-tomee-tests/arquillian-tomee-codi-tests/src/test/java/org/apache/openejb/arquillian/tests/myfaces/extcdi/start/MyFacesExtCdiDeploymentTest.java
openejb/trunk/openejb/arquillian/arquillian-tomee-tests/arquillian-tomee-jaxrs-tests/pom.xml
openejb/trunk/openejb/arquillian/arquillian-tomee-tests/arquillian-tomee-jaxws-tests/pom.xml
openejb/trunk/openejb/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/pom.xml
openejb/trunk/openejb/arquillian/arquillian-tomee-tests/pom.xml
Modified: openejb/trunk/openejb/arquillian/arquillian-tomee-remote/pom.xml
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/arquillian/arquillian-tomee-remote/pom.xml?rev=1407710&r1=1407709&r2=1407710&view=diff
==============================================================================
--- openejb/trunk/openejb/arquillian/arquillian-tomee-remote/pom.xml (original)
+++ openejb/trunk/openejb/arquillian/arquillian-tomee-remote/pom.xml Sat Nov 10 01:04:49 2012
@@ -56,6 +56,13 @@
</dependency>
<dependency>
+ <groupId>org.apache.tomcat</groupId>
+ <artifactId>tomcat-catalina</artifactId>
+ <version>${tomcat.version}</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
<groupId>org.apache.openejb</groupId>
<artifactId>apache-tomee</artifactId>
<type>zip</type>
Added: openejb/trunk/openejb/arquillian/arquillian-tomee-remote/src/test/java/org/apache/openejb/arquillian/CheckServerInfoTest.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/arquillian/arquillian-tomee-remote/src/test/java/org/apache/openejb/arquillian/CheckServerInfoTest.java?rev=1407710&view=auto
==============================================================================
--- openejb/trunk/openejb/arquillian/arquillian-tomee-remote/src/test/java/org/apache/openejb/arquillian/CheckServerInfoTest.java (added)
+++ openejb/trunk/openejb/arquillian/arquillian-tomee-remote/src/test/java/org/apache/openejb/arquillian/CheckServerInfoTest.java Sat Nov 10 01:04:49 2012
@@ -0,0 +1,42 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.openejb.arquillian;
+
+import org.apache.catalina.util.ServerInfo;
+import org.jboss.arquillian.container.test.api.Deployment;
+import org.jboss.arquillian.junit.Arquillian;
+import org.jboss.shrinkwrap.api.ArchivePaths;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
+import org.jboss.shrinkwrap.api.asset.EmptyAsset;
+import org.jboss.shrinkwrap.api.spec.WebArchive;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import static org.junit.Assert.assertTrue;
+
+@RunWith(Arquillian.class)
+public class CheckServerInfoTest {
+ @Deployment
+ public static WebArchive war() {
+ return ShrinkWrap.create(WebArchive.class).addAsWebInfResource(EmptyAsset.INSTANCE, ArchivePaths.create("foo.txt"));
+ }
+
+ @Test
+ public void checkServerInfo() {
+ assertTrue(ServerInfo.getServerInfo().startsWith("Apache Tomcat (TomEE)/"));
+ }
+}
Modified: openejb/trunk/openejb/arquillian/arquillian-tomee-tests/arquillian-tomee-codi-tests/src/test/java/org/apache/openejb/arquillian/tests/myfaces/extcdi/start/MyFacesExtCdiDeploymentTest.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/arquillian/arquillian-tomee-tests/arquillian-tomee-codi-tests/src/test/java/org/apache/openejb/arquillian/tests/myfaces/extcdi/start/MyFacesExtCdiDeploymentTest.java?rev=1407710&r1=1407709&r2=1407710&view=diff
==============================================================================
--- openejb/trunk/openejb/arquillian/arquillian-tomee-tests/arquillian-tomee-codi-tests/src/test/java/org/apache/openejb/arquillian/tests/myfaces/extcdi/start/MyFacesExtCdiDeploymentTest.java (original)
+++ openejb/trunk/openejb/arquillian/arquillian-tomee-tests/arquillian-tomee-codi-tests/src/test/java/org/apache/openejb/arquillian/tests/myfaces/extcdi/start/MyFacesExtCdiDeploymentTest.java Sat Nov 10 01:04:49 2012
@@ -49,7 +49,6 @@ public class MyFacesExtCdiDeploymentTest
// descriptor.contextParam(ProjectStage.PROJECT_STAGE_PARAM_NAME, ProjectStage.SystemTest.name());
return ShrinkWrap.create(WebArchive.class, "MyFacesExtCdiDeploymentTest.war")
- .addAsLibraries(JarLocation.jarLocation(Test.class)) // junit
.addAsLibraries(JarLocation.jarLocation(JsfProjectStageProducer.class)) // codi
.setWebXML(new StringAsset(descriptor.exportAsString()))
.addAsWebInfResource(EmptyAsset.INSTANCE, ArchivePaths.create("beans.xml"));
Modified: openejb/trunk/openejb/arquillian/arquillian-tomee-tests/arquillian-tomee-jaxrs-tests/pom.xml
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/arquillian/arquillian-tomee-tests/arquillian-tomee-jaxrs-tests/pom.xml?rev=1407710&r1=1407709&r2=1407710&view=diff
==============================================================================
--- openejb/trunk/openejb/arquillian/arquillian-tomee-tests/arquillian-tomee-jaxrs-tests/pom.xml (original)
+++ openejb/trunk/openejb/arquillian/arquillian-tomee-tests/arquillian-tomee-jaxrs-tests/pom.xml Sat Nov 10 01:04:49 2012
@@ -45,7 +45,6 @@
</dependencies>
<properties>
- <distribution.under.test>jaxrs</distribution.under.test>
- <webapp.under.test>${distribution.under.test}-</webapp.under.test>
+ <profile-under-test>jaxrs</profile-under-test>
</properties>
</project>
Modified: openejb/trunk/openejb/arquillian/arquillian-tomee-tests/arquillian-tomee-jaxws-tests/pom.xml
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/arquillian/arquillian-tomee-tests/arquillian-tomee-jaxws-tests/pom.xml?rev=1407710&r1=1407709&r2=1407710&view=diff
==============================================================================
--- openejb/trunk/openejb/arquillian/arquillian-tomee-tests/arquillian-tomee-jaxws-tests/pom.xml (original)
+++ openejb/trunk/openejb/arquillian/arquillian-tomee-tests/arquillian-tomee-jaxws-tests/pom.xml Sat Nov 10 01:04:49 2012
@@ -39,7 +39,6 @@
</dependencies>
<properties>
- <distribution.under.test>plus</distribution.under.test>
- <webapp.under.test>${distribution.under.test}-</webapp.under.test>
+ <profile-under-test>plus</profile-under-test>
</properties>
</project>
Modified: openejb/trunk/openejb/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/pom.xml
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/pom.xml?rev=1407710&r1=1407709&r2=1407710&view=diff
==============================================================================
--- openejb/trunk/openejb/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/pom.xml (original)
+++ openejb/trunk/openejb/arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/pom.xml Sat Nov 10 01:04:49 2012
@@ -30,7 +30,6 @@
<name>OpenEJB :: Arquillian Adaptors Parent :: Tests :: JMS</name>
<properties>
- <distribution.under.test>plus</distribution.under.test>
- <webapp.under.test>${distribution.under.test}-</webapp.under.test>
+ <profile-under-test>plus</profile-under-test>
</properties>
</project>
Modified: openejb/trunk/openejb/arquillian/arquillian-tomee-tests/pom.xml
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/arquillian/arquillian-tomee-tests/pom.xml?rev=1407710&r1=1407709&r2=1407710&view=diff
==============================================================================
--- openejb/trunk/openejb/arquillian/arquillian-tomee-tests/pom.xml (original)
+++ openejb/trunk/openejb/arquillian/arquillian-tomee-tests/pom.xml Sat Nov 10 01:04:49 2012
@@ -81,6 +81,41 @@
<version>${version.shrinkwrap.descriptor}</version>
</dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>arquillian-tomee-embedded</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>arquillian-tomee-remote</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>arquillian-tomee-webapp-remote</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency> <!-- tomee-embedded needs it + dependencies but tomee-*-remote doesn't need dependencies so to avoid conflicts bringing it back here -->
+ <groupId>org.apache.openejb</groupId>
+ <artifactId>openejb-core</artifactId>
+ <version>4.5.1-SNAPSHOT</version>
+ </dependency>
+
+ <!-- just to get it in the correct order -->
+ <dependency>
+ <groupId>org.apache.openejb</groupId>
+ <artifactId>apache-tomee</artifactId>
+ <version>${tomee.version}</version>
+ <classifier>webprofile</classifier>
+ <type>zip</type>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>apache-tomcat</artifactId>
+ <version>${tomcat.bundle.version}</version>
+ <type>zip</type>
+ </dependency>
</dependencies>
<profiles>
@@ -91,14 +126,6 @@
<activeByDefault>true</activeByDefault>
</activation>
- <dependencies>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>arquillian-tomee-embedded</artifactId>
- <version>${project.version}</version>
- </dependency>
- </dependencies>
-
<build>
<plugins>
<plugin>
@@ -134,88 +161,142 @@
<profile>
<id>all-adapters</id>
-
- <properties>
- <distribution.under.test>webprofile</distribution.under.test>
- <webapp.under.test />
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>arquillian-tomee-embedded</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>arquillian-tomee-remote</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>arquillian-tomee-webapp-remote</artifactId>
- <version>${project.version}</version>
- </dependency>
-
- <!-- just to get it in the correct order -->
- <dependency>
- <groupId>org.apache.openejb</groupId>
- <artifactId>apache-tomee</artifactId>
- <version>${tomee.version}</version>
- <classifier>${distribution.under.test}</classifier>
- <type>zip</type>
- </dependency>
- <dependency>
- <groupId>org.apache.openejb</groupId>
- <artifactId>tomee-${webapp.under.test}webapp</artifactId>
- <version>${tomee.version}</version>
- <type>war</type>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>apache-tomcat</artifactId>
- <version>${tomcat.bundle.version}</version>
- <type>zip</type>
- </dependency>
-
- </dependencies>
-
<build>
<plugins>
<plugin>
+ <groupId>org.codehaus.gmaven</groupId>
+ <artifactId>gmaven-plugin</artifactId>
+ <version>1.3</version>
+ <executions>
+ <execution>
+ <id>configure-adapters</id>
+ <phase>test</phase>
+ <goals>
+ <goal>execute</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <source>
+ // goal: manage the profile-under-test property
+ // -> set to webprofile use all distributions
+ // -> set to jaxrs just jaxrs and plus should be used
+ // -> set to plus use only plus
+
+ def props = project.properties
+
+ def skip = props['maven.test.skip']
+
+ props['skip.embedded'] = 'true'
+ props['skip.remote.webprofile'] = 'true'
+ props['skip.remote.jaxrs'] = 'true'
+ props['skip.remote.plus'] = 'true'
+ props['skip.webapp.webprofile'] = 'true'
+ props['skip.webapp.jaxrs'] = 'true'
+ props['skip.webapp.plus'] = 'true'
+
+ if ("true" != skip) {
+ def minProfile = props['profile-under-test']
+
+ if ("webprofile" == minProfile) {
+ props['skip.embedded'] = 'false'
+ props['skip.remote.webprofile'] = 'false'
+ props['skip.webapp.webprofile'] = 'false'
+ props['skip.remote.jaxrs'] = 'false'
+ props['skip.webapp.jaxrs'] = 'false'
+ props['skip.remote.plus'] = 'false'
+ props['skip.webapp.plus'] = 'false'
+ } else if ("jaxrs" == minProfile) {
+ props['skip.embedded'] = 'false'
+ props['skip.remote.jaxrs'] = 'false'
+ props['skip.webapp.jaxrs'] = 'false'
+ props['skip.remote.plus'] = 'false'
+ props['skip.webapp.plus'] = 'false'
+ } else if ("plus" == minProfile) {
+ props['skip.embedded'] = 'false'
+ props['skip.remote.plus'] = 'false'
+ props['skip.webapp.plus'] = 'false'
+ }
+ }
+
+ println("Embedded adapter activated ? " + !props['skip.embedded'])
+ println("Remote webprofile adapter activated ? " + !props['skip.remote.webprofile'])
+ println("Remote jaxrs adapter activated ? " + !props['skip.remote.jaxrs'])
+ println("Remote plus adapter activated ? " + !props['skip.remote.plus'])
+ println("Webapp weprofile adapter activated ? " + !props['skip.webapp.webprofile'])
+ println("Webapp jaxrs adapter activated ? " + !props['skip.webapp.jaxrs'])
+ println("Webapp plus adapter activated ? " + !props['skip.webapp.plus'])
+ </source>
+ </configuration>
+ </plugin>
+ <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.12</version>
<executions>
<execution>
+ <id>test-tomee-embedded</id>
+ <phase>test</phase>
+ <goals>
+ <goal>test</goal>
+ </goals>
+ <configuration>
+ <skip>${skip.embedded}</skip>
+ <systemPropertyVariables>
+ <tomee.version>${tomee.version}</tomee.version>
+ <arquillian.launch>tomee-embedded</arquillian.launch>
+ <openejb.arquillian.adapter>tomee-embedded</openejb.arquillian.adapter>
+ </systemPropertyVariables>
+ </configuration>
+ </execution>
+ <execution>
<id>test-tomee-remote</id>
<phase>test</phase>
<goals>
<goal>test</goal>
</goals>
<configuration>
- <skip>${maven.test.skip}</skip>
+ <skip>${skip.remote.webprofile}</skip>
<systemPropertyVariables>
<openejb.arquillian.debug>true</openejb.arquillian.debug>
<tomee.version>${tomee.version}</tomee.version>
- <tomee.classifier>${distribution.under.test}</tomee.classifier>
+ <tomee.classifier>webprofile</tomee.classifier>
<arquillian.launch>tomee-remote</arquillian.launch>
<openejb.arquillian.adapter>tomee-remote</openejb.arquillian.adapter>
</systemPropertyVariables>
</configuration>
</execution>
<execution>
- <id>test-tomee-embedded</id>
+ <id>test-tomee-remote-jaxrs</id>
<phase>test</phase>
<goals>
<goal>test</goal>
</goals>
<configuration>
- <skip>${maven.test.skip}</skip>
+ <skip>${skip.remote.jaxrs}</skip>
<systemPropertyVariables>
+ <openejb.arquillian.debug>true</openejb.arquillian.debug>
<tomee.version>${tomee.version}</tomee.version>
- <arquillian.launch>tomee-embedded</arquillian.launch>
- <openejb.arquillian.adapter>tomee-embedded</openejb.arquillian.adapter>
+ <tomee.classifier>jaxrs</tomee.classifier>
+ <arquillian.launch>tomee-remote</arquillian.launch>
+ <openejb.arquillian.adapter>tomee-remote</openejb.arquillian.adapter>
+ </systemPropertyVariables>
+ </configuration>
+ </execution>
+ <execution>
+ <id>test-tomee-remote-plus</id>
+ <phase>test</phase>
+ <goals>
+ <goal>test</goal>
+ </goals>
+ <configuration>
+ <skip>${skip.remote.plus}</skip>
+ <systemPropertyVariables>
+ <openejb.arquillian.debug>true</openejb.arquillian.debug>
+ <tomee.version>${tomee.version}</tomee.version>
+ <tomee.classifier>plus</tomee.classifier>
+ <arquillian.launch>tomee-remote</arquillian.launch>
+ <openejb.arquillian.adapter>tomee-remote</openejb.arquillian.adapter>
</systemPropertyVariables>
</configuration>
</execution>
@@ -226,11 +307,45 @@
<goal>test</goal>
</goals>
<configuration>
- <skip>${maven.test.skip}</skip>
+ <skip>${skip.webapp.webprofile}</skip>
+ <systemPropertyVariables>
+ <tomee.version>${tomee.version}</tomee.version>
+ <tomee.tomcatVersion>${tomcat.bundle.version}</tomee.tomcatVersion>
+ <tomee.artifactId>tomee-webapp</tomee.artifactId>
+ <arquillian.launch>tomee-webapp</arquillian.launch>
+ <openejb.arquillian.adapter>tomee-webapp</openejb.arquillian.adapter>
+ </systemPropertyVariables>
+ </configuration>
+ </execution>
+ <execution>
+ <id>test-tomee-webapp-remote-jaxrs</id>
+ <phase>test</phase>
+ <goals>
+ <goal>test</goal>
+ </goals>
+ <configuration>
+ <skip>${skip.webapp.jaxrs}</skip>
<systemPropertyVariables>
<tomee.version>${tomee.version}</tomee.version>
<tomee.tomcatVersion>${tomcat.bundle.version}</tomee.tomcatVersion>
- <tomee.artifactId>tomee-${webapp.under.test}webapp</tomee.artifactId>
+ <tomee.artifactId>tomee-jaxrs-webapp</tomee.artifactId>
+ <arquillian.launch>tomee-webapp</arquillian.launch>
+ <openejb.arquillian.adapter>tomee-webapp</openejb.arquillian.adapter>
+ </systemPropertyVariables>
+ </configuration>
+ </execution>
+ <execution>
+ <id>test-tomee-webapp-remote-plus</id>
+ <phase>test</phase>
+ <goals>
+ <goal>test</goal>
+ </goals>
+ <configuration>
+ <skip>${skip.webapp.plus}</skip>
+ <systemPropertyVariables>
+ <tomee.version>${tomee.version}</tomee.version>
+ <tomee.tomcatVersion>${tomcat.bundle.version}</tomee.tomcatVersion>
+ <tomee.artifactId>tomee-plus-webapp</tomee.artifactId>
<arquillian.launch>tomee-webapp</arquillian.launch>
<openejb.arquillian.adapter>tomee-webapp</openejb.arquillian.adapter>
</systemPropertyVariables>
@@ -498,4 +613,7 @@
</profile>
</profiles>
+ <properties>
+ <profile-under-test>webprofile</profile-under-test>
+ </properties>
</project>