Hello,

Has someone got something to write about this ?


---------- Forwarded message ----------
From: Thomas Recloux <[EMAIL PROTECTED]>
Date: Thu, 30 Sep 2004 16:35:18 +0200
Subject: Jcoverage instrumentation excludes and jcoverage.ser clean
To: Maven Developers List <[EMAIL PROTECTED]>


Hello,

In my project there are some classes that I do not want to see in the
jcoverage report but that are needed by my test classes.

If I add them in the ${maven.jcoverage.instrumentation.excludes}
property, they won't be in the classpath during the tests.

I had a look to the plugin.jelly file and I saw that after the
instrumentation, there is this instruction :

      <ant:copy todir="${maven.jcoverage.instrumentation}">
        <ant:fileset dir="${maven.build.dest}">
          <ant:exclude name="**/*.class" />
          <ant:exclude name="${maven.jcoverage.instrumentation.excludes}" />
        </ant:fileset>
      </ant:copy>

I did not undestand the goal of this instruction because :
- The plugin doc specifies that the
${maven.jcoverage.instrumentation.excludes} property is used for
"Specifies the pattern for the excluded classes of instrumentation."
Then it should only contain class patterns and will exclude anything
more than the "**/*.class" pattern
- The jcoverage:on goal is run juste after the java:compile goal and
before the java:jar-resources goal. Then the ${maven.build.dest}
folder should not contain anything else than classes.

I propose to replace this intruction by this one which copy
instrumentation excluded files into the
${maven.jcoverage.instrumentation} folder, then they will be included
in test classpath. But they were not instrumented so they will no
appear in the report.

      <ant:copy todir="${maven.jcoverage.instrumentation}">
        <ant:fileset dir="${maven.build.dest}"
            includes="${maven.jcoverage.instrumentation.excludes}"/>
      </ant:copy>

I have noted that the clean:clean goal does not delete the
jcoverage.ser file because it is not in the target folder,  I see
three solutions:
- add it in a preGoal of clean:clean in my project maven.xml file
- modify the clean plugin to accept dynamic list of files to delete.
- ask jcoverage to write this file in the target folder, the problem
is that the parameter does not seems to exist.

What do you think of all this stuff ?

--
Thomas Recloux


-- 
Thomas Recloux

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to