title: How do I disable jacoco-agent after jacoco:report?
body: <p>I have a maven-project, using "test"-phase as well as "integration-test"-phase. In the test-phase, JUnit-Tests are executed, in integration-test there are HTMLUnit-tests. I am using Jacoco[1]-maven-plugin in purpose to measure the codecoverage done by the JUnit-tests of my project. When doing integration-test, I am using maven-embedded-glassfish-plugin to start a glassfish-server and deploy my app before executing the tests.</p>
  
  <p>Sad but true, I have to disable jacoco for time being, as it does not harmony with "integration-test"-phase.</p>
  
  <p>Jacoco's report goal is / should be exceucted at prepare-package-phase, so I assume that it should not influence integration-test-phase. But when I enable jacoco:report, my integration-tests do not run any more because of memory-size problems[2].</p>
  
  <p>How do I stop jacoco:report influencing the integration-test-phase?</p>
  
  <hr>
  
  <p>[1] <a href="http://www.eclemma.org/jacoco/" rel="nofollow">http://www.eclemma.org/jacoco/</a></p>
  
  <p>[2]</p>
  
  <pre><code>java.lang.instrument.IllegalClassFormatException: Error while instrumenting class com/steadystate/css/parser/SACParserCSS21TokenManager.
          at org.jacoco.agent.rt_6l8m50.CoverageTransformer.transform(CoverageTransformer.java:91)
          at sun.instrument.TransformerManager.transform(TransformerManager.java:188)
          at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:424)
          at java.lang.ClassLoader.defineClass1(Native Method)
          at java.lang.ClassLoader.defineClass(ClassLoader.java:791)
          at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
          at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
          at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
          at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
          at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
          at java.security.AccessController.doPrivileged(Native Method)
          at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
          at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
          at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
          at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
          at com.steadystate.css.parser.SACParserCSS21.&lt;init&gt;(SACParserCSS21.java:2196)
          at com.steadystate.css.parser.SACParserCSS21.&lt;init&gt;(SACParserCSS21.java:23)
          at com.gargoylesoftware.htmlunit.javascript.host.css.CSSStyleSheet.parseCSS(CSSStyleSheet.java:530)
          at com.gargoylesoftware.htmlunit.javascript.host.css.CSSStyleSheet.&lt;init&gt;(CSSStyleSheet.java:152)
          at com.gargoylesoftware.htmlunit.javascript.host.html.HTMLStyleElement.getSheet(HTMLStyleElement.java:73)
          at com.gargoylesoftware.htmlunit.javascript.host.css.StyleSheetList.item(StyleSheetList.java:129)
          at com.gargoylesoftware.htmlunit.javascript.host.Window.getComputedStyle(Window.java:1591)
          at com.gargoylesoftware.htmlunit.javascript.host.html.HTMLElement.getCurrentStyle(HTMLElement.java:2465)
          at com.gargoylesoftware.htmlunit.html.DomNode.isDisplayed(DomNode.java:688)
          at com.gargoylesoftware.htmlunit.html.HtmlSerializer.isVisible(HtmlSerializer.java:377)
          at com.gargoylesoftware.htmlunit.html.HtmlSerializer.appendText(HtmlSerializer.java:371)
          at com.gargoylesoftware.htmlunit.html.HtmlSerializer.appendNode(HtmlSerializer.java:126)
          at com.gargoylesoftware.htmlunit.html.HtmlSerializer.appendChildren(HtmlSerializer.java:249)
          at com.gargoylesoftware.htmlunit.html.HtmlSerializer.appendNode(HtmlSerializer.java:198)
          at com.gargoylesoftware.htmlunit.html.HtmlSerializer.appendChildren(HtmlSerializer.java:249)
          at com.gargoylesoftware.htmlunit.html.HtmlSerializer.appendNode(HtmlSerializer.java:198)
          at com.gargoylesoftware.htmlunit.html.HtmlSerializer.appendChildren(HtmlSerializer.java:249)
          at com.gargoylesoftware.htmlunit.html.HtmlSerializer.appendNode(HtmlSerializer.java:198)
          at com.gargoylesoftware.htmlunit.html.HtmlSerializer.appendChildren(HtmlSerializer.java:249)
          at com.gargoylesoftware.htmlunit.html.HtmlSerializer.appendNode(HtmlSerializer.java:198)
          at com.gargoylesoftware.htmlunit.html.HtmlSerializer.asText(HtmlSerializer.java:57)
          at com.gargoylesoftware.htmlunit.html.DomNode.asText(DomNode.java:740)
          at webappTest.IndexIT.index(IndexIT.java:24)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:601)
          at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
          at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
          at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
          at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
          at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
          at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
          at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
          at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
          at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
          at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
          at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
          at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
          at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
          at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
          at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:264)
          at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
          at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:601)
          at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray2(ReflectionUtils.java:208)
          at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:158)
          at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:86)
          at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)
          at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:95)
  Caused by: java.lang.RuntimeException: Method code too large!
          at org.jacoco.agent.rt_6l8m50.asm.MethodWriter.a(Unknown Source)
          at org.jacoco.agent.rt_6l8m50.asm.ClassWriter.toByteArray(Unknown Source)
          at org.jacoco.agent.rt_6l8m50.core.instr.Instrumenter.instrument(Instrumenter.java:70)
          at org.jacoco.agent.rt_6l8m50.core.instr.Instrumenter.instrument(Instrumenter.java:82)
          at org.jacoco.agent.rt_6l8m50.CoverageTransformer.transform(CoverageTransformer.java:89)
          ... 67 more
  Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 4.313 sec
  Exception in thread "ThreadedStreamConsumer" Exception in thread "Thread-25" Exception in thread "Thread-26" Exception in thread "DynamicReloader"
  </code></pre>