Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7001537
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T20:48:57+00:00 2026-05-27T20:48:57+00:00

Cobertura’s documentation gives the following example to show how instrumentation can be done on

  • 0

Cobertura’s documentation gives the following example to show how instrumentation can be done on classes inside a jar file that is on Cobertura’s classpath.

<cobertura-instrument todir="${instrumented.dir}">
    ...........       
    <fileset dir="../lib">
        <include name="myjar.jar" />
    </fileset>
    ...........
</cobertura-instrument>

This approach will instrument all the classes inside the specified jar.

How can I instrument only specified class files inside the jar?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T20:48:58+00:00Added an answer on May 27, 2026 at 8:48 pm

    The cobertura-instrument task has two sub-tasks which may do the trick (didn’t have the possibility to try it out):

    <cobertura-instrument todir="${instrumented.dir}">
      <includeClasses regex=".*" />
      <excludeClasses regex=".*\.Test.*" />
      <!-- ... -->
    </cobertura-instrument>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The steps that I followed to instrument the Cobertura instrumenting the sources with cobertura
I can invoke mvn cobertura:cobertura to instrument, run unit tests (using surefire ), and
when i instrument my classes using Maven 2 using the command mvn cobertura:instrument The
When i am running my ANT build script, Cobertura is complaining with the following
I've been using Cobertura plugin for report generation and instrumentation (with surefire). Here is
I tried to remove some classes from the cobertura report as <target name=voldemort-instrument description=Instrument
I have following information in cobertura.xml <method name=visitNode signature=(Lchs/cof/drawplus/IJoint;Lchs/cof/logical/schem/ISegment;Lchs/analysis/GraphServices$IGraphVisitor;I)Z The signature is java's mangled
I am using Maven site:run to generate a cobertura code coverage... The following is
i followed the steps that are given for cobertura report and i generated report
I am making a jar file of project1 and placing the jar file in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.