Thanks Carolos but if you'd followed this thread you'd see that Brett has released the latest build as a snapshot, and that's the version I am useing - 2.0-SNAPSHOT.

If you know of an even more recent version please let me know.  I have until friday to get this to work or it's back to using ant for me.

Kind regards,
Dave Sag




 


[EMAIL PROTECTED] wrote on 31-01-2006 18:35:26:

> You need latest cobertura built from sources
>
>
> On 1/31/06, David Sag <[EMAIL PROTECTED]> wrote:
> >
> > Okay I have changed my build so that the checkstyle etc all happen
> on the verify phase, and have updated to use the latest snapshot
> version of cobertura plugin.
> >
> > [mvn install] works fine - all is as expected.
> >
> > but [mvn site] continues to break as follows:
> >
> > (disco-davesag) [15:59:16] ~/checkouts/EPO/cassius_service_Sis$ mvn site
> > [INFO] Scanning for projects...
> > [INFO]
> ----------------------------------------------------------------------------
> > [INFO] Building Search Information Service (redux)
> > [INFO]    task-segment: [site]
> > [INFO]
> ----------------------------------------------------------------------------
> > [INFO] Preparing cobertura:cobertura
> > [INFO] [resources:resources]
> > [INFO] [compiler:compile]
> > [INFO] Nothing to compile - all classes are up to date
> > [INFO] [cobertura:instrument {execution: instrument-classes}]
> > [INFO] Cobertura 1.7 - GNU GPL License (NO WARRANTY) - See COPYRIGHT file
> > Cobertura: Loaded information on 4 classes.
> > Instrumenting 6 classes to
> /Users/davesag/checkouts/EPO/cassius_service_Sis/target/generated-
> classes/cobertura
> > Cobertura: Saved information on 4 classes.
> > Instrument time: 244ms
> >
> > [INFO] Instrumentation was successful.
> > [INFO] [cobertura:instrument]
> > [INFO] Cobertura 1.7 - GNU GPL License (NO WARRANTY) - See COPYRIGHT file
> > Cobertura: Loaded information on 4 classes.
> > Instrumenting 6 classes to
> /Users/davesag/checkouts/EPO/cassius_service_Sis/target/generated-
> classes/cobertura
> > [cobertura] WARN  [main] net.sourceforge.cobertura.instrument.Main
> - Unable to instrument file
> /Users/davesag/checkouts/EPO/cassius_service_Sis/target/generated-
> classes/cobertura/org/epo/cassius/csp/DossierTranslationService.class
> > java.lang.ArrayIndexOutOfBoundsException: 8
> >         at org.objectweb.asm.ClassReader.readUnsignedShort(Unknown Source)
> >         at org.objectweb.asm.ClassReader.<init>(Unknown Source)
> >         at org.objectweb.asm.ClassReader.<init>(Unknown Source)
> >         at org.objectweb.asm.ClassReader.<init>(Unknown Source)
> >         at net.sourceforge.cobertura.instrument.Main.
> addInstrumentationToSingleClass(Main.java:286)
> >         at net.sourceforge.cobertura.instrument.Main.
> addInstrumentation(Main.java:364)
> >         at net.sourceforge.cobertura.instrument.Main.
> addInstrumentation(Main.java:382)
> >         at net.sourceforge.cobertura.instrument.Main.
> parseArguments(Main.java:440)
> >         at net.sourceforge.cobertura.instrument.Main.main(Main.java:462)
> > [cobertura] WARN  [main] net.sourceforge.cobertura.instrument.Main
> - Unable to instrument file
> /Users/davesag/checkouts/EPO/cassius_service_Sis/target/generated-
> classes/cobertura/org/epo/cassius/csp/SearchInformationService.class
> > java.lang.ArrayIndexOutOfBoundsException: 8
> >         at org.objectweb.asm.ClassReader.readUnsignedShort(Unknown Source)
> >         at org.objectweb.asm.ClassReader.<init>(Unknown Source)
> >         at org.objectweb.asm.ClassReader.<init>(Unknown Source)
> >         at org.objectweb.asm.ClassReader.<init>(Unknown Source)
> >         at net.sourceforge.cobertura.instrument.Main.
> addInstrumentationToSingleClass(Main.java:286)
> >         at net.sourceforge.cobertura.instrument.Main.
> addInstrumentation(Main.java:364)
> >         at net.sourceforge.cobertura.instrument.Main.
> addInstrumentation(Main.java:382)
> >         at net.sourceforge.cobertura.instrument.Main.
> parseArguments(Main.java:440)
> >         at net.sourceforge.cobertura.instrument.Main.main(Main.java:462)
> > [cobertura] WARN  [main] net.sourceforge.cobertura.instrument.Main
> - Unable to instrument file
> /Users/davesag/checkouts/EPO/cassius_service_Sis/target/generated-
> classes/cobertura/org/epo/cassius/csp/SearchInformationServiceDelegate.class
> > java.lang.ArrayIndexOutOfBoundsException: 8
> >         at org.objectweb.asm.ClassReader.readUnsignedShort(Unknown Source)
> >         at org.objectweb.asm.ClassReader.<init>(Unknown Source)
> >         at org.objectweb.asm.ClassReader.<init>(Unknown Source)
> >         at org.objectweb.asm.ClassReader.<init>(Unknown Source)
> >         at net.sourceforge.cobertura.instrument.Main.
> addInstrumentationToSingleClass(Main.java:286)
> >         at net.sourceforge.cobertura.instrument.Main.
> addInstrumentation(Main.java:364)
> >         at net.sourceforge.cobertura.instrument.Main.
> addInstrumentation(Main.java:382)
> >         at net.sourceforge.cobertura.instrument.Main.
> parseArguments(Main.java:440)
> >         at net.sourceforge.cobertura.instrument.Main.main(Main.java:462)
> > [cobertura] WARN  [main] net.sourceforge.cobertura.instrument.Main
> - Unable to instrument file
> /Users/davesag/checkouts/EPO/cassius_service_Sis/target/generated-
> classes/cobertura/org/epo/cassius/csp/SimpleSearchInformationServiceDelegate.
> class
> > java.lang.ArrayIndexOutOfBoundsException: 8
> >         at org.objectweb.asm.ClassReader.readUnsignedShort(Unknown Source)
> >         at org.objectweb.asm.ClassReader.<init>(Unknown Source)
> >         at org.objectweb.asm.ClassReader.<init>(Unknown Source)
> >         at org.objectweb.asm.ClassReader.<init>(Unknown Source)
> >         at net.sourceforge.cobertura.instrument.Main.
> addInstrumentationToSingleClass(Main.java:286)
> >         at net.sourceforge.cobertura.instrument.Main.
> addInstrumentation(Main.java:364)
> >         at net.sourceforge.cobertura.instrument.Main.
> addInstrumentation(Main.java:382)
> >         at net.sourceforge.cobertura.instrument.Main.
> parseArguments(Main.java:440)
> >         at net.sourceforge.cobertura.instrument.Main.main(Main.java:462)
> > Cobertura: Saved information on 4 classes.
> > Instrument time: 193ms
> >
> > [INFO] Instrumentation was successful.
> > [INFO] [resources:testResources]
> > [INFO] Using default encoding to copy filtered resources.
> > [INFO] [compiler:testCompile]
> > [INFO] Nothing to compile - all classes are up to date
> > [INFO] [surefire:test]
> > [INFO] Setting reports dir:
> /Users/davesag/checkouts/EPO/cassius_service_Sis/target/surefire-reports
> >
> > -------------------------------------------------------
> >  T E S T S
> > -------------------------------------------------------
> > java.lang.ClassFormatError:
> org/epo/cassius/csp/SearchInformationServiceDelegate (Truncated class file)
> >         at java.lang.ClassLoader.defineClass0(Native Method)
> >         at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
> >         at java.security.SecureClassLoader.
> defineClass(SecureClassLoader.java:123)
> >         at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
> >         at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
> >         at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
> >         at java.security.AccessController.doPrivileged(Native Method)
> >         at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
> >         at org.codehaus.surefire.IsolatedClassLoader.
> loadClass(IsolatedClassLoader.java:61)
> >         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
> >         at java.lang.Class.getDeclaredMethods0(Native Method)
> >         at java.lang.Class.privateGetDeclaredMethods(Class.java:1655)
> >         at java.lang.Class.getMethod0(Class.java:1901)
> >         at java.lang.Class.getMethod(Class.java:984)
> >         at org.codehaus.surefire.battery.JUnitBattery.
> <init>(JUnitBattery.java:126)
> >         at org.codehaus.surefire.Surefire.
> instantiateBatteries(Surefire.java:318)
> >         at org.codehaus.surefire.Surefire.run(Surefire.java:130)
> >         at org.codehaus.surefire.Surefire.run(Surefire.java:77)
> >         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >         at sun.reflect.NativeMethodAccessorImpl.
> invoke(NativeMethodAccessorImpl.java:39)
> >         at sun.reflect.DelegatingMethodAccessorImpl.
> invoke(DelegatingMethodAccessorImpl.java:25)
> >         at java.lang.reflect.Method.invoke(Method.java:324)
> >         at org.codehaus.surefire.SurefireBooter.run(SurefireBooter.java:104)
> >         at org.apache.maven.test.SurefirePlugin.
> execute(SurefirePlugin.java:303)
> >         at org.apache.maven.plugin.DefaultPluginManager.
> executeMojo(DefaultPluginManager.java:415)
> >         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.
> executeGoals(DefaultLifecycleExecutor.java:531)
> >         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.
> executeGoalWithLifecycle(DefaultLifecycleExecutor.java:472)
> >         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.
> forkProjectLifecycle(DefaultLifecycleExecutor.java:859)
> >         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.
> forkLifecycle(DefaultLifecycleExecutor.java:731)
> >         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.
> executeGoals(DefaultLifecycleExecutor.java:522)
> >         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.
> executeGoalWithLifecycle(DefaultLifecycleExecutor.java:472)
> >         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.
> executeGoal(DefaultLifecycleExecutor.java:451)
> >         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.
> executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:303)
> >         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.
> executeTaskSegments(DefaultLifecycleExecutor.java:270)
> >         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.
> execute(DefaultLifecycleExecutor.java:139)
> >         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
> >         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
> >         at org.apache.maven.cli.MavenCli.main(MavenCli.java:249)
> >         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >         at sun.reflect.NativeMethodAccessorImpl.
> invoke(NativeMethodAccessorImpl.java:39)
> >         at sun.reflect.DelegatingMethodAccessorImpl.
> invoke(DelegatingMethodAccessorImpl.java:25)
> >         at java.lang.reflect.Method.invoke(Method.java:324)
> >         at org.codehaus.classworlds.Launcher.
> launchEnhanced(Launcher.java:315)
> >         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
> >         at org.codehaus.classworlds.Launcher.
> mainWithExitCode(Launcher.java:430)
> >         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> > RUN ABORTED
> > java.lang.ClassFormatError
> > org.codehaus.surefire.Runner
> > An exception or error caused a run to abort.
> > org/epo/cassius/csp/SearchInformationServiceDelegate (Truncated class file)
> >
> > Results :
> > [surefire] Tests run: 0, Failures: 0, Errors: 1
> >
> > [INFO]
> ----------------------------------------------------------------------------
> > [ERROR] BUILD ERROR
> > [INFO]
> ----------------------------------------------------------------------------
> > [INFO] There are some test failure.
> >
> > I stress that this all used to work fine with maven 2.0 and the
> old cobertura plugin.  I suspected a bug in the surefire reporting
> rather than in cobertura, and so removed any references to surefire
> from my reporting but i get pretty much the exact same result.
> >
> > Does anyone out there have a working example of maven 2.0.2 using
> cobertura to instrument classes and generate a report?  If so please
> would you care to share your wisdom?  Or would you recommend rolling
> back to maven 2.0 until these issues are fixed?
> >
> > Kind regards,
> >  Dave Sag
> >
> >
> >
> >
> >
> >
> > Brett Porter <[EMAIL PROTECTED]> wrote on 31-01-2006 11:16:29:
> >
> >  > On 1/31/06, David Sag <[EMAIL PROTECTED]> wrote:
> >  > > the version jason sent me was 2.0-SNAPSHOT
> >  >
> >  > Yep, still a snapshot:
> >  > http://maven.apache.org/guides/development/guide-testing-
> >  > development-plugins.html
> >  >
> >  > > so site *does* invoke compile and test then.  for after all
> imho what use
> >  > > is the site without the surefire reports?
> >  >
> >  > Actually, I generally don't run the surefire reports, preferring to
> >  > fail the build if the tests don't pass and not generate the site. The
> >  > surefire report plugin needs some work, such as the effeciency you
> >  > mention.
> >  >
> >  > > Either way I probably need to bind checkstyle, pmd, findbugs etc to a
> >  > > phase other than compile then, perhaps verify.  Hmm will ponder this.
> >  >
> >  > The reports, or the checks? The reports should be part of the site
> >  > generation and not bound to any phases. The checks definitely belong
> >  > in verify if they don't require any extra steps such as compilation.
> >  >
> >  > HTH,
> >  > Brett
> >  >
> >  > ---------------------------------------------------------------------
> >  > To unsubscribe, e-mail: [EMAIL PROTECTED]
> >  > For additional commands, e-mail: [EMAIL PROTECTED]
> >  >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>

Reply via email to