0 Replies Latest reply on Apr 3, 2013 6:56 AM by john-cook

    Missing Documentation for Arquillian + OSGi

    john-cook

      Hi guys,

      I just started with Arquillian as I like its idea and the way how its done but unfortunately I run into total lack of documentation for (remote) OSGI container. I've been trying to implement an integration test on real running OSGi framework (Equinox, in case it matters) but not much joy so far - I ran into JAR hell when trying to setup maven dependencies for OSGi remote container. I haven't found a single piece of docs or article anywhere on internet about this and lost almost on day on classpath setup issues .

      I use Maven (3.0.4) to get the setup done, followed the general instructions from the Getting started guide but didn't really get anywhere - all the time I've been getting ClassNotFound/MethodNotFound and other invalid-classpath-related exceptions. Please, somebody provide a working pom.xml and for Arquillian team - please document this somewhere as it is royal pain in the ass! This is how my pom.xml looks like:

       

      <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>com.orchestral.notification</groupId>
                <artifactId>notification.test.integration</artifactId>
                <version>0.0.1-SNAPSHOT</version>
                <name>Notifications Integration Tests</name>
      
      
                <properties>
                          <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
                </properties>
      
      
                <repositories>
                          <repository>
                                    <id>jboss-public-repository-group</id>
                                    <name>JBoss Public Repository Group</name>
                                    <url>http://repository.jboss.org/nexus/content/groups/public/</url>
                          </repository>
                          <repository>
                                    <releases>
                                              <enabled>true</enabled>
                                    </releases>
                                    <snapshots>
                                              <enabled>true</enabled>
                                    </snapshots>
                                    <id>jboss-central</id>
                                    <name>JBoss Central</name>
                                    <url>https://repository.jboss.org/nexus/content/repositories/central/</url>
                          </repository>
                          <repository>
                                    <releases>
                                              <enabled>true</enabled>
                                    </releases>
                                    <snapshots>
                                              <enabled>true</enabled>
                                    </snapshots>
                                    <id>jboss-public</id>
                                    <name>JBoss Public</name>
                                    <url>https://repository.jboss.org/nexus/content/repositories/public-jboss/</url>
                          </repository>
                </repositories>
      
      
                <dependencyManagement>
                          <dependencies>
                                    <dependency>
                                              <groupId>org.jboss.arquillian</groupId>
                                              <artifactId>arquillian-bom</artifactId>
                                              <version>1.0.3.Final</version>
                                              <scope>import</scope>
                                              <type>pom</type>
                                    </dependency>
                          </dependencies>
                </dependencyManagement>
      
      
                <dependencies>
                          <dependency>
                                    <groupId>org.jboss.arquillian.container</groupId>
                                    <artifactId>arquillian-container-osgi-remote</artifactId>
                                    <version>1.0.2.Final</version>
                          </dependency>
                          <dependency>
                                    <groupId>org.jboss.arquillian.junit</groupId>
                                    <artifactId>arquillian-junit-container</artifactId>
                                    <scope>test</scope>
                          </dependency>
      
      
                          <!-- <dependency> -->
                          <!-- <groupId>org.jboss.osgi.bundles</groupId> -->
                          <!-- <artifactId>jboss-osgi-jmx</artifactId> -->
                          <!-- <version>1.0.3</version> -->
                          <!-- </dependency> -->
      
      
                          <dependency>
                                    <groupId>javax.inject</groupId>
                                    <artifactId>javax.inject</artifactId>
                                    <version>1</version>
                          </dependency>
                          <dependency>
                                    <groupId>junit</groupId>
                                    <artifactId>junit</artifactId>
                                    <version>4.8.1</version>
                                    <scope>test</scope>
                          </dependency>
                </dependencies>
      
      
                <build>
                          <plugins>
                                    <plugin>
                                              <artifactId>maven-compiler-plugin</artifactId>
                                              <version>2.3.2</version>
                                              <configuration>
                                                        <source>1.7</source>
                                                        <target>1.7</target>
                                              </configuration>
                                    </plugin>
                                    <plugin>
                                              <artifactId>maven-surefire-plugin</artifactId>
                                              <version>2.12</version>
                                    </plugin>
                          </plugins>
                </build>
      </project>