Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cobertura fails to include interface compiled class #357

Open
RamyaR94 opened this issue Oct 31, 2017 · 0 comments
Open

cobertura fails to include interface compiled class #357

RamyaR94 opened this issue Oct 31, 2017 · 0 comments

Comments

@RamyaR94
Copy link

Hi,
Following is my war and instrument task in ant

    <target name="coberturacompile" >
        <javac destdir="build/classes" debug="true" srcdir="src">
            <classpath refid="compile.classpath"/>
            <classpath refid="cobertura.classpath" />
        </javac>
    </target>

    <target name="instrument" depends="coberturacompile">
            <cobertura-instrument datafile="cobertura.ser" todir="${instrumented.dir}">
                       <ignore regex="org.slf4j.*" />
                       <fileset dir="${classes.dir}">
                          <include name="**/*.class" />
                          <exclude name="**/*Test.class" />
                      </fileset>
            </cobertura-instrument>
    </target>
    <target name="warinst" depends="instrument">
        <war destfile="dist/cober.war" webxml="web/WEB-INF/web.xml">
            <fileset dir="web"/>
            <lib dir="web/WEB-INF/lib"/>
            <classes dir="build/instrumented"/>
        </war>
        <copy file="dist/cober.war" todir="${local.deploy}"/>
     </target>

I have a interface but i am not able to find that compiled class in my cober.war. So in runtime the server throws an exception and able to instrument the classes which implements an interface. The issue is only when an interface is implemented. please help me with a solution as soon as possible. Cobertura version is 2.1.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants
@jmrozanec @RamyaR94 and others