That was going to be my next question :).  I was wondering whether it
would be better to make an emma bundle that exports the required classes,
or if I could do something like boot delegation and have the emma jar on
the classpath when I start sling.

On Thu, Jul 08, 2010 at 09:08:58PM -0400, Justin Edelson wrote:
> D. Stuart -
> 
> Question for you: once you get the bundles instrumented, how do you get
> them to resolve in Felix? I don't see an emma bundle which exports the
> right package.
> 
> Justin
> 
> On 7/8/10 2:39 PM, D. Stuart Freeman wrote:
> > I'm trying to instrument some bundles with emma so that I can run
> > integration tests against them and get coverage stats out.
> > 
> > I've added the following to my project's base pom:
> > 
> > <build>
> > ...
> >       <plugin>
> >         <groupId>org.codehaus.mojo</groupId>
> >         <artifactId>emma-maven-plugin</artifactId>
> >         <version>1.0-alpha-2</version>
> >         <inherited>true</inherited>
> >         <executions>
> >           <execution>
> >             <phase>prepare-package</phase>
> >             <goals>
> >               <goal>instrument</goal>
> >             </goals>
> >           </execution>
> >         </executions>
> >       </plugin>
> >       <plugin>
> >         <groupId>org.apache.maven.plugins</groupId>
> >         <artifactId>maven-jar-plugin</artifactId>
> >         <executions>
> >           <execution>
> >             <id>emma-jar</id>
> >             <phase>package</phase>
> >             <goals>
> >               <goal>jar</goal>
> >             </goals>
> >             <configuration>
> >               <classifier>emma</classifier>
> >               
> > <classesDirectory>${maven.build.dir}/generated-classes/emma/classes</classesDirectory>
> >             </configuration>
> >           </execution>
> >         </executions>
> >       </plugin>
> > ...
> > </build>
> > 
> > That seems to give me instrumented and uninstrumented artifacts, but the
> > bnd plugin seems to add emma as a bundle import even on the
> > uninstrumented artifacts.  Is there a way to configure it to only add the
> > emma dependency to the instrumented bundles?  Is there a better way to
> > build instrumented bundles?
> > 
> > In my search for ways to do this, I've found
> > http://www.eclemma.org/research/instrumentingosgi/index.html is there a
> > way to do something similar with Felix?
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 

-- 
D. Stuart Freeman
Georgia Institute of Technology

Attachment: signature.asc
Description: Digital signature

Reply via email to