Browse files

Add JBoss AS 7 Managed default profile

* disable Byteman
  • Loading branch information...
1 parent 6e03c41 commit e5186b308742519aaf557c4b85d4823a397a9307 @aslakknutsen aslakknutsen committed Mar 4, 2013
View
54 universe/pom.xml
@@ -154,7 +154,7 @@
<scope>test</scope>
</dependency>
- <!-- Arquillian Byteman -->
+ <!-- Arquillian Byteman
<dependency>
<groupId>org.jboss.arquillian.extension</groupId>
<artifactId>arquillian-extension-byteman</artifactId>
@@ -165,6 +165,7 @@
<artifactId>byteman-submit</artifactId>
<scope>test</scope>
</dependency>
+ -->
<!-- Others -->
<dependency>
@@ -218,6 +219,57 @@
</build>
</profile>
+ <profile>
+ <id>arq-jbossas-managed-7</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.as</groupId>
+ <artifactId>jboss-as-arquillian-container-managed</artifactId>
+ <version>${version.jbossas}</version>
+ </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.jboss.as</groupId>
+ <artifactId>jboss-as-dist</artifactId>
+ <version>${version.jbossas}</version>
+ <type>zip</type>
+ <overWrite>false</overWrite>
+ <outputDirectory>${project.build.directory}</outputDirectory>
+ </artifactItem>
+ </artifactItems>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <systemPropertyVariables>
+ <jbossHome>${project.build.directory}/jboss-as-${version.jbossas}</jbossHome>
+ </systemPropertyVariables>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+
<!-- Optional Extensions -->
<profile>
View
7 ...est/java/org/jboss/arquillian/showcase/universe/byteman/ConferenceRepositoryTestCase.java
@@ -22,20 +22,21 @@
import javax.persistence.EntityExistsException;
import org.jboss.arquillian.container.test.api.Deployment;
-import org.jboss.arquillian.extension.byteman.api.BMRule;
import org.jboss.arquillian.junit.Arquillian;
import org.jboss.arquillian.showcase.universe.Deployments;
import org.jboss.arquillian.showcase.universe.Models;
import org.jboss.arquillian.showcase.universe.model.Conference;
import org.jboss.arquillian.showcase.universe.repository.ConferenceRepository;
import org.jboss.shrinkwrap.api.spec.JavaArchive;
+import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
/**
* @author <a href="mailto:aslak@redhat.com">Aslak Knutsen</a>
* @version $Revision: $
*/
+@Ignore
@RunWith(Arquillian.class)
public class ConferenceRepositoryTestCase {
@@ -47,8 +48,8 @@ public static JavaArchive deploy() {
@EJB
private ConferenceRepository repository;
- @BMRule(name = "ForceEntityException", targetClass="ConferenceRepository", targetMethod="store",
- action = "throw new javax.persistence.EntityExistsException()")
+// @BMRule(name = "ForceEntityException", targetClass="ConferenceRepository", targetMethod="store",
+// action = "throw new javax.persistence.EntityExistsException()")
@Test(expected = EntityExistsException.class)
public void shouldBeAbleToPersistConference() throws Exception {
final Conference conference = Models.createConference();
View
7 universe/src/test/resources/arquillian.xml
@@ -5,9 +5,16 @@
<defaultProtocol type="Servlet 3.0" />
+<!--
<engine>
<property name="deploymentExportPath">target/</property>
</engine>
+-->
+ <container qualifier="jboss" default="true">
+ <configuration>
+ <property name="jbossHome">${jbossHome:target/jboss-as-7.1.1.Final}</property>
+ </configuration>
+ </container>
<extension qualifier="webdriver">
<property name="chromeDriverBinary">/home/aslak/dev/tools/chromedriver</property>

0 comments on commit e5186b3

Please sign in to comment.