Created
March 23, 2012 20:31
-
-
Save aslakknutsen/2174663 to your computer and use it in GitHub Desktop.
Arquillian + EAP 5.1 + Secured
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<arquillian xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xmlns="http://jboss.org/schema/arquillian" | |
xsi:schemaLocation="http://jboss.org/schema/arquillian http://jboss.org/schema/arquillian/arquillian_1_0.xsd"> | |
<container qualifier="jboss" default="true"> | |
<configuration> | |
<property name="contextFactory">org.jboss.security.jndi.LoginInitialContextFactory</property> | |
</configuration> | |
</container> | |
</arquillian> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jmx-console { | |
org.jboss.security.ClientLoginModule required; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
java.naming.security.principal=admin | |
java.naming.security.credentials=admin | |
java.naming.security.protocol=jmx-console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>test</groupId> | |
<artifactId>test</artifactId> | |
<version>0.0.1-SNAPSHOT</version> | |
<packaging>jar</packaging> | |
<name>test</name> | |
<url>http://arquillian.org</url> | |
<properties> | |
<version.arquillian_core>1.0.0.CR7</version.arquillian_core> | |
<version.arquillian_jbossas>1.0.0.CR3</version.arquillian_jbossas> | |
<version.junit>4.8.1</version.junit> | |
<version.jbossas_5>5.1.0.GA</version.jbossas_5> | |
<version.jbossas_6>6.0.0.Final</version.jbossas_6> | |
</properties> | |
<dependencyManagement> | |
<dependencies> | |
<dependency> | |
<groupId>org.jboss.arquillian</groupId> | |
<artifactId>arquillian-bom</artifactId> | |
<version>${version.arquillian_core}</version> | |
<scope>import</scope> | |
<type>pom</type> | |
</dependency> | |
</dependencies> | |
</dependencyManagement> | |
<dependencies> | |
<dependency> | |
<groupId>org.jboss.arquillian.junit</groupId> | |
<artifactId>arquillian-junit-container</artifactId> | |
<scope>test</scope> | |
</dependency> | |
<dependency> | |
<groupId>junit</groupId> | |
<artifactId>junit</artifactId> | |
<version>${version.junit}</version> | |
<scope>test</scope> | |
</dependency> | |
</dependencies> | |
<profiles> | |
<profile> | |
<id>arq-remote</id> | |
<activation> | |
<activeByDefault>true</activeByDefault> | |
</activation> | |
<dependencies> | |
<dependency> | |
<groupId>org.jboss.arquillian.container</groupId> | |
<artifactId>arquillian-jbossas-remote-5.1</artifactId> | |
<version>${version.arquillian_jbossas}</version> | |
<scope>test</scope> | |
</dependency> | |
<dependency> | |
<groupId>org.jboss.jbossas</groupId> | |
<artifactId>jboss-as-client</artifactId> | |
<version>${version.jbossas_5}</version> | |
<type>pom</type> | |
<scope>test</scope> | |
</dependency> | |
<dependency> | |
<groupId>org.jboss.jbossas</groupId> | |
<artifactId>jboss-as-profileservice-client</artifactId> | |
<version>${version.jbossas_6}</version> | |
<type>pom</type> | |
</dependency> | |
</dependencies> | |
</profile> | |
</profiles> | |
<build> | |
<plugins> | |
<plugin> | |
<artifactId>maven-surefire-plugin</artifactId> | |
<configuration> | |
<systemPropertyVariables> | |
<java.security.auth.login.config>src/test/resources/auth.conf</java.security.auth.login.config> | |
</systemPropertyVariables> | |
</configuration> | |
</plugin> | |
</plugins> | |
</build> | |
</project> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Note the contextFactory configuration in arquillian.xml, the jndi.properties and the use of -Djava.security.auth.login.config= in Maven Surefire configuration.
To run via internal JUnit runner in Eclipse, java.security.auth.login.config needs to be set in Run Configuration.
Run-As "Maven test" via M2Eclipse in Eclipse work as expected.