Permalink
Browse files

TEIID-1809, TEIID-1720: making the arquillian tests execute based on …

…given profile. This will download AS7 and install and overlay teiid binaries and execute any integration tests. Also, partially upgraded the build to use jboss-parent pom
  • Loading branch information...
1 parent 42cb8d6 commit 7ac26e8c21322cafe970a55773daeb242fb0c4e4 @rareddy rareddy committed Dec 9, 2011
@@ -88,13 +88,7 @@
<artifactId>jbosssx-client</artifactId>
<scope>provided</scope>
</dependency>
-
- <dependency>
- <groupId>org.jboss.as</groupId>
- <artifactId>jboss-as-security</artifactId>
- <scope>provided</scope>
- </dependency>
-
+
<dependency>
<groupId>org.jboss.as</groupId>
<artifactId>jboss-as-subsystem-test</artifactId>
View
85 pom.xml
@@ -1,6 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.jboss</groupId>
+ <artifactId>jboss-parent</artifactId>
+ <version>7</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
<groupId>org.jboss.teiid</groupId>
<artifactId>teiid-parent</artifactId>
<packaging>pom</packaging>
@@ -106,7 +111,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
- <version>2.8</version>
+ <version>${version.javadoc.plugin}</version>
<configuration>
<maxmemory>512m</maxmemory>
<excludePackageNames>*.internal,com.*,net.*,org.teiid.cache,org.teiid.common.*,org.teiid.core,org.teiid.deployers,org.teiid.dqp.*,org.teiid.jboss,org.teiid.netty.*,org.teiid.odbc,org.teiid.query,org.teiid.resource.*,org.teiid.rhq.*,org.teiid.runtime,org.teiid.security,org.teiid.services,org.teiid.templates,org.teiid.test.*,org.teiid.transport,org.teiid.vdb.*</excludePackageNames>
@@ -123,30 +128,14 @@
</build>
</profile>
<profile>
- <!--
+ <!--
This is to enable faster build for development time.
-->
<id>dev</id>
<modules>
<module>build</module>
</modules>
- </profile>
- <profile>
- <id>arquillian-tests</id>
- <dependencies>
- <dependency>
- <groupId>org.jboss.spec</groupId>
- <artifactId>jboss-javaee-6.0</artifactId>
- <version>1.0.0.Final</version>
- <type>pom</type>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.jboss.as</groupId>
- <artifactId>jboss-as-arquillian-container-managed</artifactId>
- </dependency>
- </dependencies>
- </profile>
+ </profile>
</profiles>
<build>
<!-- This section defines the default plugin settings inherited by child projects. -->
@@ -156,7 +145,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
- <version>2.2</version>
+ <version>${version.jar.plugin}</version>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
@@ -169,17 +158,17 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
- <version>2.3.2</version>
+ <version>${version.compiler.plugin}</version>
<configuration>
- <source>1.6</source>
- <target>1.6</target>
+ <source>${maven.compiler.source}</source>
+ <target>${maven.compiler.target}</target>
<showDeprecation>false</showDeprecation>
<showWarnings>false</showWarnings>
</configuration>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
- <version>2.9</version>
+ <version>${version.surefire.plugin}</version>
<configuration>
<includes>
<include>**/*TestCase.java</include>
@@ -191,16 +180,10 @@
<!-- hack to prevent anonymous inner classes in Tests from being run as tests -->
<include>**/Test*$*.java</include>
</excludes>
- <systemProperties>
- <property>
- <name>user.dir</name>
- <value>${basedir}/target</value>
- </property>
- <property>
- <name>java.io.tmpdir</name>
- <value>${basedir}/target</value>
- </property>
- </systemProperties>
+ <systemPropertyVariables>
+ <user.dir>${basedir}/target</user.dir>
+ <java.io.tmpdir>${basedir}/target</java.io.tmpdir>
+ </systemPropertyVariables>
</configuration>
</plugin>
<!--
@@ -232,7 +215,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
- <version>2.1.2</version>
+ <version>${version.source.plugin}</version>
<executions>
<execution>
<id>attach-sources</id>
@@ -244,13 +227,6 @@
</plugin>
</plugins>
</build>
- <repositories>
- <repository>
- <id>jboss-public-repository</id>
- <name>JBoss Public Maven Repository Group</name>
- <url>http://repository.jboss.org/nexus/content/groups/public/</url>
- </repository>
- </repositories>
<dependencies>
<dependency>
<groupId>junit</groupId>
@@ -610,17 +586,6 @@
<version>${version.javax.enterprise.cdi-api}</version>
</dependency>
<dependency>
- <groupId>org.jboss.arquillian.junit</groupId>
- <artifactId>arquillian-junit-container</artifactId>
- <version>${version.org.jboss.arquillian.core}</version>
- <exclusions>
- <exclusion>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-xjc</artifactId>
<version>${version.sun.jaxb}</version>
@@ -657,16 +622,4 @@
<module>client-jdk15</module>
<module>admin</module>
</modules>
- <distributionManagement>
- <repository>
- <id>jboss-releases-repository</id>
- <name>JBoss Releases Repository</name>
- <url>https://repository.jboss.org/nexus/service/local/staging/deploy/maven2/</url>
- </repository>
- <snapshotRepository>
- <id>jboss-snapshots-repository</id>
- <name>JBoss Snapshots Repository</name>
- <url>https://repository.jboss.org/nexus/content/repositories/snapshots/</url>
- </snapshotRepository>
- </distributionManagement>
</project>
View
@@ -0,0 +1,47 @@
+<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
+http://maven.apache.org/xsd/settings-1.0.0.xsd">
+ <profiles>
+ <profile>
+ <id>jboss-public-repository</id>
+ <repositories>
+ <repository>
+ <id>jboss-public-repository-group</id>
+ <name>JBoss Public Maven Repository Group</name>
+ <url>http://repository.jboss.org/nexus/content/groups/public/</url>
+ <layout>default</layout>
+ <releases>
+ <enabled>true</enabled>
+ <updatePolicy>never</updatePolicy>
+ </releases>
+ <snapshots>
+ <enabled>true</enabled>
+ <updatePolicy>never</updatePolicy>
+ </snapshots>
+ </repository>
+ </repositories>
+ <pluginRepositories>
+ <pluginRepository>
+ <id>jboss-public-repository-group</id>
+ <name>JBoss Public Maven Repository Group</name>
+ <url>http://repository.jboss.org/nexus/content/groups/public/</url>
+ <layout>default</layout>
+ <releases>
+ <enabled>true</enabled>
+ <updatePolicy>never</updatePolicy>
+ </releases>
+ <snapshots>
+ <enabled>true</enabled>
+ <updatePolicy>never</updatePolicy>
+ </snapshots>
+ </pluginRepository>
+ </pluginRepositories>
+ </profile>
+ </profiles>
+
+ <activeProfiles>
+ <activeProfile>jboss-public-repository</activeProfile>
+ </activeProfiles>
+
+</settings>
@@ -50,4 +50,94 @@
<scope>provided</scope>
</dependency>
</dependencies>
+
+ <profiles>
+ <profile>
+ <id>arquillian-tests</id>
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.spec</groupId>
+ <artifactId>jboss-javaee-6.0</artifactId>
+ <version>1.0.0.Final</version>
+ <type>pom</type>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.as</groupId>
+ <artifactId>jboss-as-arquillian-container-managed</artifactId>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <version>${version.dependency.plugin}</version>
+ <executions>
+ <execution>
+ <id>unpack</id>
+ <phase>process-test-classes</phase>
+ <goals>
+ <goal>unpack</goal>
+ </goals>
+ <configuration>
+ <artifactItems>
+ <artifactItem>
+ <groupId>org.jboss.as</groupId>
+ <artifactId>jboss-as-dist</artifactId>
+ <version>${jbossas-version}</version>
+ <type>zip</type>
+ <overWrite>false</overWrite>
+ <outputDirectory>${project.build.directory}</outputDirectory>
+ </artifactItem>
+ </artifactItems>
+ </configuration>
+ </execution>
+ <execution>
+ <id>unpack2</id>
+ <phase>process-test-classes</phase>
+ <goals>
+ <goal>unpack</goal>
+ </goals>
+ <configuration>
+ <artifactItems>
+ <artifactItem>
+ <groupId>org.jboss.teiid</groupId>
+ <artifactId>teiid</artifactId>
+ <version>${project.version}</version>
+ <classifier>jboss-dist</classifier>
+ <type>zip</type>
+ <overWrite>false</overWrite>
+ <outputDirectory>${project.build.directory}/jboss-as-${jbossas-version}</outputDirectory>
+ </artifactItem>
+ </artifactItems>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>default-test</id>
+ <goals>
+ <goal>test</goal>
+ </goals>
+ <configuration>
+ <systemPropertyVariables>
+ <jbossHome>${project.build.directory}/jboss-as-${jbossas-version}</jbossHome>
+ <serverConfig>standalone-teiid.xml</serverConfig>
+ </systemPropertyVariables>
+ <includes>
+ <include>**/IntegrationTest*</include>
+ </includes>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
</project>
@@ -26,7 +26,6 @@
import org.jboss.shrinkwrap.api.spec.JavaArchive;
import org.junit.After;
import org.junit.Before;
-import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.teiid.adminapi.Admin;
@@ -47,8 +46,7 @@
@RunWith(Arquillian.class)
@SuppressWarnings("nls")
-@Ignore
-public class TestDeployment {
+public class IntegrationTestDeployment {
private Admin admin;
@@ -8,10 +8,8 @@
<property name="executionType">REMOTE</property>
</protocol>
<configuration>
- <property name="jbossHome">/home/rareddy/testing/jboss-as-7.1.0.Beta1</property>
- <property name="serverConfig">standalone-teiid.xml</property>
- <property name="managementAddress">127.0.0.1</property>
- <property name="managementPort">9999</property>
+ <property name="jbossHome">${jbossHome}</property>
+ <property name="serverConfig">${serverConfig}</property>
<property name="javaVmArguments">-Xmx512m -XX:MaxPermSize=128m -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n</property>
</configuration>
</container>

0 comments on commit 7ac26e8

Please sign in to comment.