On Sat, Jul 10, 2010 at 09:38:08PM -0400, Justin Edelson wrote: > On 7/9/10 3:17 PM, D. Stuart Freeman wrote: > > On Fri, Jul 09, 2010 at 10:55:14AM -0400, Justin Edelson wrote: > >> I think the simplest thing would be to add the emma jar to the > >> classpath and then add the necessary package(s) to the packages > >> exported by the system bundle (i.e. via sling.system.packages). You > >> can do this by adding emma as a dependency to the > >> maven-launchpad-plugin and create a file called > >> src/test/config/sling.properties with this line in it: > >> > >> sling.system.packages.simple=com.vladium.emma.rt > >> > > > > That makes sense, but I can't seem to figure out where to put the > > dependency so that it actually works. > > Take a look at http://codereview.appspot.com/1807041, specifically > http://codereview.appspot.com/1807041/patch/1/5 > > Here I'm putting the emma stuff in a profile, so you'd run it like > > mvn -P emma clean verify > > I verified that when not using the instrumented bundles, I don't need > emma on the classpath, so I'm not sure how to explain what you were > seeing where the uninstrumented bundles still needed emma. >
I'm trying to have the launchpad start with my alternative bundle list, but have the build output a launchpad jar with the uninstrumented bundles. This might not be ideal, and I may have some configuration issue that's getting instrumented bundles into my launchpad jar. > I'm totally unsatisifed with the need here to specify an alternate > bundle list file. At least for Sling, this isn't going to work as it > means we need to maintain two bundle lists with essentially duplicate > information. This is just a recipe for failure. > I handled this by generating the "emmafied" bundle list using an xslt transform of the production bundle list using the mvn-xml-plugin. > So I'm thinking there needs to be something like this in the plugin > configuration: > > <bundleOverrides> > <bundleOverride> > <pattern>org.apache.sling:*</pattern> > <classifier>emma</classifier> > </bundleOverride> > </bundleOverrides> > > Which means... process the bundle list and for each bundle with a > groupId of org.apache.sling, set the classifier to "emma". > That would have been a lot easier to deal with than figuring out xslt :). > But I'm still at a loss for how to handle the .em files effectively. The > merge reference you sent still seems to require the assembly of the .em > file list. > > Justin -- D. Stuart Freeman Georgia Institute of Technology
signature.asc
Description: Digital signature