felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clement escoffier <clement.escoff...@gmail.com>
Subject Re: Using junit4osgi with maven
Date Mon, 07 Jan 2013 08:32:51 GMT
Hi,

The maven-junit4osgi-plugin is already starting iPOJO (trunk version). I
never tried but you can check to configure the maven-junit-plugin with:

<plugin><groupid>org.apache.felix</groupid><artifactid>maven-junit4osgi-plugin</artifactid><executions><execution><goals>
      <goal>test</goal></goals></execution></executions>

<dependencies>


    <dependency>

        <groupId>org.apache.felix</groupId>


        <artifactId>org.apache.felix.ipojo</artifactId>

        <version>${ipojo.core.version}</version>

    </dependency>


</dependencies></plugin>


Regards,


Clement


2013/1/4 Pierre Rust <pierre.rust@gmail.com>

> Hi,
>
> I've been playing a bit with osgi (felix) and iPojo and found it to be a
> great combination. However it's a pain to test and I would like to use
> osgi4junit with my maven build.
>
> I've tried to use the maven plugin for osgi4juint but I've faced a strange
> problem : my build is not stable, one time the test pass and one time it
> fails with the following error :
> ERROR: Error starting
>
> file:/C:/Users/Pierre/Projets/Agora/maven-repository/org/apache/felix/org.apache.felix.ipojo/1.8.0/org.apache.felix.ipojo-1.8.0.jar
> (org.osgi.framework.BundleException: Activator start error in bundle
> org.apache.felix.ipojo [4].)
> java.lang.ClassCastException: org.apache.felix.ipojo.HandlerManagerFactory
> cannot be cast to org.apache.felix.ipojo.HandlerFactory
> [...]
> [ERROR] Bundle stability isn't reached after 500 tries
> [INFO] Bundles:
> [INFO] org.apache.felix.framework - 32
> [INFO] org.apache.felix.ipojo - 32
> [INFO] org.apache.felix.ipojo.handler.extender - 32
> [INFO] org.apache.felix.ipojo.junit4osgi - 32
> [INFO] org.apache.felix.ipojo - 4
> [INFO] org.apache.felix.ipojo.annotations - 32
> [INFO] Connector - 32
> [INFO] OsgiBundle - 32
> [INFO] OsgiTests - 32
>
>
> And from what I see it seems to deploy two ipojo bundle (which might
> certainly be the root of my problem.
>
> I suspect a version conflict , I'm currently using the following versions
> (I've tried other combinations with no success ) :
> <ipojo.core.version>1.8.0</ipojo.core.version>
> <ipojo.annotations.version>1.8.4</ipojo.annotations.version>
> <ipojo.maven.plugin.version>1.8.4</ipojo.maven.plugin.version>
> <junit4osgi.maven.plugin.version>1.0.0</junit4osgi.maven.plugin.version>
(I
> excluded explicitly the dependency to anotation and ipojo)
> <bundle.maven.plugin.version>2.3.7</bundle.maven.plugin.version>
> <android.maven.plugin.version>3.1.1</android.maven.plugin.version>
> Am I doing something wrong ?
>
> thanks for your help
>
> Pierre
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message